rcrewai 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +133 -23
  4. data/ROADMAP.md +1 -1
  5. data/docs/api/agent.md +5 -2
  6. data/docs/api/configuration.md +36 -41
  7. data/docs/api/crew.md +34 -48
  8. data/docs/api/index.md +7 -0
  9. data/docs/api/task.md +10 -91
  10. data/docs/api/tools.md +19 -0
  11. data/docs/examples/api-integration.md +4 -4
  12. data/docs/examples/async-execution.md +4 -4
  13. data/docs/examples/code-review-crew.md +1 -1
  14. data/docs/examples/content-marketing-pipeline.md +3 -3
  15. data/docs/examples/custom-tools.md +8 -8
  16. data/docs/examples/customer-support.md +5 -5
  17. data/docs/examples/data-analysis-team.md +4 -4
  18. data/docs/examples/database-operations.md +4 -4
  19. data/docs/examples/ecommerce-operations.md +4 -4
  20. data/docs/examples/financial-analysis.md +3 -3
  21. data/docs/examples/hierarchical-crew.md +3 -2
  22. data/docs/examples/production-ready-crew.md +16 -10
  23. data/docs/examples/research-development.md +5 -5
  24. data/docs/examples/simple-research-crew.md +2 -2
  25. data/docs/examples/social-media.md +4 -4
  26. data/docs/examples/task-automation.md +2 -2
  27. data/docs/examples/tool-composition.md +42 -27
  28. data/docs/examples/web-scraping.md +6 -6
  29. data/docs/index.md +61 -44
  30. data/docs/tutorials/advanced-agents.md +194 -917
  31. data/docs/tutorials/agent-options.md +1 -1
  32. data/docs/tutorials/checkpointing.md +65 -0
  33. data/docs/tutorials/concurrency.md +57 -0
  34. data/docs/tutorials/custom-tools.md +198 -1143
  35. data/docs/tutorials/deployment.md +156 -155
  36. data/docs/tutorials/getting-started.md +69 -81
  37. data/docs/tutorials/index.md +19 -0
  38. data/docs/tutorials/interceptors-and-events.md +84 -0
  39. data/docs/tutorials/live-streaming.md +52 -0
  40. data/docs/tutorials/multiple-crews.md +70 -51
  41. data/docs/tutorials/providers.md +115 -0
  42. data/docs/upgrading-to-0.11.md +55 -0
  43. data/lib/rcrewai/agent.rb +0 -2
  44. data/lib/rcrewai/configuration.rb +64 -29
  45. data/lib/rcrewai/context_window.rb +12 -2
  46. data/lib/rcrewai/llm_clients/anthropic.rb +60 -9
  47. data/lib/rcrewai/llm_clients/base.rb +7 -0
  48. data/lib/rcrewai/llm_clients/bedrock.rb +29 -2
  49. data/lib/rcrewai/llm_clients/google.rb +36 -4
  50. data/lib/rcrewai/llm_clients/ollama.rb +17 -3
  51. data/lib/rcrewai/llm_clients/openai.rb +14 -1
  52. data/lib/rcrewai/llm_clients/openai_responses.rb +21 -2
  53. data/lib/rcrewai/pricing.rb +13 -3
  54. data/lib/rcrewai/tool_runner.rb +5 -1
  55. data/lib/rcrewai/version.rb +1 -1
  56. metadata +7 -1
data/docs/api/crew.md CHANGED
@@ -24,6 +24,8 @@ Creates a new crew instance.
24
24
  - `knowledge_sources` (Array, optional) - Sources the crew wraps in a shared base (see [Knowledge (RAG)]({{ site.baseurl }}/tutorials/knowledge))
25
25
  - `verbose` (Boolean, optional) - Detailed logging (default: false)
26
26
  - `max_iterations` (Integer, optional) - Max iterations per agent (default: 10)
27
+ - `consensus_max_concurrency` (Integer, optional) - For `:consensual`, limits concurrent proposal and scoring calls (default: 8)
28
+ - `checkpoint` (store, optional) - Default store for checkpointing. See [Checkpointing]({{ site.baseurl }}/tutorials/checkpointing)
27
29
 
28
30
  **Returns:** `RCrewAI::Crew` instance
29
31
 
@@ -34,6 +36,8 @@ crew = RCrewAI::Crew.new("research_team", process: :consensual, consensus_agents
34
36
 
35
37
  ### `.create(name)`
36
38
 
39
+ **Placeholder:** crews aren't persisted yet, so this only builds a new, empty crew.
40
+
37
41
  Creates and saves a new crew.
38
42
 
39
43
  **Parameters:**
@@ -48,6 +52,8 @@ crew = RCrewAI::Crew.create("marketing_crew")
48
52
 
49
53
  ### `.load(name)`
50
54
 
55
+ **Placeholder:** crews aren't persisted yet, so this only builds a new, empty crew.
56
+
51
57
  Loads an existing crew from storage.
52
58
 
53
59
  **Parameters:**
@@ -62,6 +68,8 @@ crew = RCrewAI::Crew.load("existing_crew")
62
68
 
63
69
  ### `.list`
64
70
 
71
+ **Placeholder:** returns sample names, not saved crews.
72
+
65
73
  Lists all available crews.
66
74
 
67
75
  **Returns:** Array of crew names
@@ -132,6 +140,8 @@ results = future.value # Block until complete
132
140
 
133
141
  ### `#save`
134
142
 
143
+ **Placeholder:** returns `true` without saving anything.
144
+
135
145
  Saves the crew configuration to storage.
136
146
 
137
147
  **Returns:** Boolean indicating success
@@ -169,26 +179,17 @@ crew.tasks.each do |task|
169
179
  end
170
180
  ```
171
181
 
172
- ### `#clear_agents`
173
-
174
- Removes all agents from the crew.
175
-
176
- **Returns:** `self`
177
-
178
- **Example:**
179
- ```ruby
180
- crew.clear_agents
181
- ```
182
-
183
- ### `#clear_tasks`
182
+ ### `#resume(run_id, checkpoint: nil, **options)`
184
183
 
185
- Removes all tasks from the crew's workflow.
184
+ Resumes a checkpointed run. Completed tasks replay their stored results and the rest execute. Takes the same options as `#execute`. See [Checkpointing]({{ site.baseurl }}/tutorials/checkpointing).
186
185
 
187
- **Returns:** `self`
186
+ **Raises:** `RCrewAI::Checkpoint::CheckpointError` if there's no store or no checkpoint for `run_id`
188
187
 
189
188
  **Example:**
190
189
  ```ruby
191
- crew.clear_tasks
190
+ crew.resume(run_id, checkpoint: store)
191
+ crew.run_id # the new run's id
192
+ crew.restored_task_names # tasks replayed from the checkpoint
192
193
  ```
193
194
 
194
195
  ## Attributes
@@ -204,9 +205,9 @@ The name of the crew.
204
205
  puts crew.name # => "research_team"
205
206
  ```
206
207
 
207
- ### `process`
208
+ ### `process=` and `process_type`
208
209
 
209
- The execution process type for the crew.
210
+ Sets and reads the execution process. The writer takes a Symbol; `process_type` is the reader.
210
211
 
211
212
  **Type:** Symbol (`:sequential`, `:hierarchical`, `:consensual`)
212
213
 
@@ -215,6 +216,7 @@ The execution process type for the crew.
215
216
  **Example:**
216
217
  ```ruby
217
218
  crew.process = :hierarchical
219
+ crew.process_type # => :hierarchical
218
220
  ```
219
221
 
220
222
  ### `verbose`
@@ -243,52 +245,36 @@ Maximum number of iterations for task execution.
243
245
  crew.max_iterations = 20
244
246
  ```
245
247
 
246
- ## Configuration Options
248
+ ## Events
247
249
 
248
- Crews can be configured with various options:
250
+ Pass a block or `stream:` to `#execute` to receive events as the crew runs. See [Interceptors and Events]({{ site.baseurl }}/tutorials/interceptors-and-events).
249
251
 
250
252
  ```ruby
251
- crew = RCrewAI::Crew.new("advanced_crew") do |c|
252
- c.process = :hierarchical
253
- c.verbose = true
254
- c.max_iterations = 15
255
- c.memory = true # Enable memory between tasks
256
- c.cache = true # Enable result caching
253
+ crew.execute do |event|
254
+ print event.text if event.is_a?(RCrewAI::Events::TextDelta)
257
255
  end
258
256
  ```
259
257
 
260
- ## Events
261
-
262
- Crews emit events during execution that can be hooked into:
258
+ ## Kickoff Hooks
263
259
 
264
260
  ```ruby
265
- crew.on(:task_started) do |task|
266
- puts "Starting task: #{task.name}"
267
- end
268
-
269
- crew.on(:task_completed) do |task, result|
270
- puts "Completed task: #{task.name}"
271
- puts "Result: #{result}"
272
- end
273
-
274
- crew.on(:execution_complete) do |results|
275
- puts "All tasks completed!"
276
- end
261
+ crew.before_kickoff { |inputs| inputs.merge(date: Date.today) }
262
+ crew.after_kickoff { |result| result }
277
263
  ```
278
264
 
279
265
  ## Error Handling
280
266
 
267
+ A failed task doesn't raise out of `#execute`. Check the returned summary:
268
+
281
269
  ```ruby
282
- begin
283
- results = crew.execute
284
- rescue RCrewAI::ExecutionError => e
285
- puts "Execution failed: #{e.message}"
286
- puts "Failed task: #{e.task.name}"
287
- rescue RCrewAI::ConfigurationError => e
288
- puts "Configuration error: #{e.message}"
289
- end
270
+ result = crew.execute
271
+ puts "#{result[:completed_tasks]}/#{result[:total_tasks]} tasks completed"
272
+ puts "Success rate: #{result[:success_rate]}%"
273
+ warn "#{result[:failed_tasks]} tasks failed" if result[:failed_tasks].positive?
290
274
  ```
291
275
 
276
+ Invalid configuration raises `RCrewAI::ConfigurationError`, and an unknown process type raises when the crew is created.
277
+
292
278
  ## Examples
293
279
 
294
280
  ### Basic Crew Setup
data/docs/api/index.md CHANGED
@@ -19,6 +19,13 @@ Individual AI agents with specific roles and capabilities.
19
19
  ### [RCrewAI::Task]({{ site.baseurl }}/api/task)
20
20
  Tasks that agents execute to achieve goals.
21
21
 
22
+ ## Production Controls (0.8 – 0.10)
23
+
24
+ - **`RCrewAI::Checkpoint`** — save and resume runs. See [Checkpointing]({{ site.baseurl }}/tutorials/checkpointing)
25
+ - **`before_request` / `after_response`, `RCrewAI::Events`** — hooks and tracing. See [Interceptors and Events]({{ site.baseurl }}/tutorials/interceptors-and-events)
26
+ - **`parallel_tools`, `consensus_max_concurrency`, `max_concurrency`** — fan-out limits. See [Concurrency]({{ site.baseurl }}/tutorials/concurrency)
27
+ - **`RCrewAI::CancelToken`, `RCrewAI::StreamCancelled`** — real-time Anthropic calls. See [Live Streaming]({{ site.baseurl }}/tutorials/live-streaming)
28
+
22
29
  ## Capabilities (0.4 – 0.7)
23
30
 
24
31
  These subsystems are covered in depth by the tutorials (with runnable examples):
data/docs/api/task.md CHANGED
@@ -81,7 +81,6 @@ begin
81
81
  puts "Task completed successfully: #{result[0..100]}..."
82
82
  rescue RCrewAI::TaskExecutionError => e
83
83
  puts "Task failed: #{e.message}"
84
- puts "Retry count: #{task.retry_count}"
85
84
  rescue RCrewAI::TaskDependencyError => e
86
85
  puts "Dependencies not met: #{e.message}"
87
86
  end
@@ -131,7 +130,7 @@ Checks if all dependency tasks are completed.
131
130
  if task.dependencies_met?
132
131
  result = task.execute
133
132
  else
134
- puts "Waiting for dependencies: #{task.pending_dependencies.map(&:name)}"
133
+ puts "Waiting for dependencies: #{task.context.reject(&:completed?).map(&:name)}"
135
134
  end
136
135
  ```
137
136
 
@@ -230,21 +229,6 @@ Total execution time in seconds.
230
229
 
231
230
  **Type:** Float
232
231
 
233
- ### `retry_count`
234
- Number of retry attempts made.
235
-
236
- **Type:** Integer
237
-
238
- ### `error_message`
239
- Error message if task failed.
240
-
241
- **Type:** String
242
-
243
- ### `human_input`
244
- Whether human input is enabled.
245
-
246
- **Type:** Boolean
247
-
248
232
  ### `async`
249
233
  Whether task supports async execution.
250
234
 
@@ -271,8 +255,7 @@ when :completed
271
255
  puts "Result: #{task.result}"
272
256
  puts "Execution time: #{task.execution_time}s"
273
257
  when :failed
274
- puts "Task failed: #{task.error_message}"
275
- puts "Retry attempts: #{task.retry_count}"
258
+ puts "Task failed: #{task.result}"
276
259
  end
277
260
  ```
278
261
 
@@ -395,96 +378,33 @@ crew.add_task(parallel_tasks)
395
378
  results = crew.execute(async: true, max_concurrency: 3)
396
379
  ```
397
380
 
398
- ## Task Callbacks and Events
381
+ ## Task Callbacks
399
382
 
400
- Tasks can execute callbacks at various lifecycle events:
383
+ `callback:` runs once when the task completes. Use `crew.execute` events for finer-grained progress.
401
384
 
402
385
  ```ruby
403
386
  task = RCrewAI::Task.new(
404
387
  name: "data_analysis",
405
388
  description: "Analyze customer data for insights",
406
389
  agent: analyst,
407
-
408
- # Callbacks for different events
409
- on_start: ->(task) {
410
- puts "Starting analysis: #{task.name}"
411
- MetricsTracker.task_started(task.name)
412
- },
413
-
414
- on_progress: ->(task, progress) {
415
- puts "Progress: #{progress}% complete"
416
- ProgressBar.update(task.name, progress)
417
- },
418
-
419
- on_completion: ->(task, result) {
420
- puts "Analysis completed: #{result.length} chars"
390
+ callback: ->(task, result) {
421
391
  ResultStore.save(task.name, result)
422
- EmailNotifier.send_completion_notice(task.name)
423
- },
424
-
425
- on_error: ->(task, error) {
426
- puts "Task failed: #{error.message}"
427
- ErrorTracker.log_error(task.name, error)
428
- AlertSystem.notify_failure(task.name)
392
+ puts "Finished in #{task.execution_time}s"
429
393
  }
430
394
  )
431
395
  ```
432
396
 
433
- ## Retry Logic and Error Handling
397
+ ## Retries
434
398
 
435
- Tasks have built-in retry capabilities:
399
+ `max_retries:` sets how many times a failed task is retried (default: 2). Retries back off exponentially. There's no per-task timeout or retry condition.
436
400
 
437
401
  ```ruby
438
402
  resilient_task = RCrewAI::Task.new(
439
403
  name: "api_data_sync",
440
404
  description: "Sync data with external API",
441
405
  agent: sync_agent,
442
- max_retries: 5, # Try up to 5 times
443
- retry_delay: 10, # Wait 10 seconds between retries
444
- timeout: 120, # Timeout after 2 minutes
445
-
446
- # Custom retry logic
447
- retry_if: ->(error) {
448
- # Retry on network errors, but not on authentication errors
449
- error.is_a?(Net::TimeoutError) || error.is_a?(Net::ReadTimeout)
450
- }
406
+ max_retries: 5
451
407
  )
452
-
453
- # Task will automatically retry on transient failures
454
- result = resilient_task.execute
455
- ```
456
-
457
- ## Task Monitoring and Metrics
458
-
459
- ```ruby
460
- # Task execution with monitoring
461
- task = RCrewAI::Task.new(
462
- name: "report_generation",
463
- description: "Generate monthly performance report",
464
- agent: report_agent,
465
-
466
- # Built-in metrics
467
- track_metrics: true,
468
-
469
- # Custom monitoring
470
- callback: ->(task, result) {
471
- # Record performance metrics
472
- TaskMetrics.record(
473
- task_name: task.name,
474
- execution_time: task.execution_time,
475
- result_size: result.length,
476
- agent_name: task.agent.name,
477
- success: task.status == :completed
478
- )
479
- }
480
- )
481
-
482
- # After execution
483
- puts "Task metrics:"
484
- puts "- Execution time: #{task.execution_time}s"
485
- puts "- Retry attempts: #{task.retry_count}"
486
- puts "- Result size: #{task.result.length} characters"
487
- puts "- Agent used: #{task.agent.name}"
488
408
  ```
489
409
 
490
410
  ## Best Practices
@@ -494,8 +414,7 @@ puts "- Agent used: #{task.agent.name}"
494
414
  3. **Proper Dependencies**: Use context to establish task execution order
495
415
  4. **Appropriate Tools**: Provide task-specific tools when needed
496
416
  5. **Human Oversight**: Enable human input for critical tasks
497
- 6. **Error Handling**: Set appropriate retry limits and timeouts
417
+ 6. **Error Handling**: Set appropriate retry limits
498
418
  7. **Async Where Possible**: Mark independent tasks as async for performance
499
419
  8. **Monitoring**: Use callbacks to track task performance and results
500
- 9. **Resource Limits**: Set reasonable timeouts to prevent hanging
501
420
  10. **Result Validation**: Validate task outputs match expected format
data/docs/api/tools.md CHANGED
@@ -115,6 +115,25 @@ USE_TOOL[filewriter](file_path=report.md, content=## Report\nThis is my analysis
115
115
 
116
116
  ## Creating Custom Tools
117
117
 
118
+ ### Declaring a Tool
119
+
120
+ Declare the name, description and parameters on the class. This gives the model a strict JSON schema for native function calling, and arguments are checked and converted before `execute` runs:
121
+
122
+ ```ruby
123
+ class WeatherTool < RCrewAI::Tools::Base
124
+ tool_name 'weather'
125
+ description 'Get the current weather for a city'
126
+ param :city, type: :string, required: true, description: 'City name'
127
+ param :units, type: :string, description: 'celsius or fahrenheit'
128
+
129
+ def execute(city:, units: 'celsius')
130
+ "22 degrees #{units} in #{city}"
131
+ end
132
+ end
133
+ ```
134
+
135
+ The examples below set `@name` and `@description` in the constructor instead. That still works, but the tool gets a permissive schema and RCrewAI prints a warning.
136
+
118
137
  ### Basic Custom Tool
119
138
 
120
139
  ```ruby
@@ -19,7 +19,7 @@ Our API integration system includes:
19
19
 
20
20
  ## Complete Implementation
21
21
 
22
- ```ruby
22
+ ````ruby
23
23
  require 'rcrewai'
24
24
  require 'faraday'
25
25
  require 'json'
@@ -36,7 +36,7 @@ end
36
36
  # Generic REST API Tool
37
37
  class RestAPITool < RCrewAI::Tools::Base
38
38
  def initialize(**options)
39
- super
39
+ super()
40
40
  @name = 'rest_api'
41
41
  @description = 'Make REST API calls with authentication and error handling'
42
42
  @base_url = options[:base_url]
@@ -530,7 +530,7 @@ results[:results].each do |integration_result|
530
530
  if integration_result[:status] == :completed
531
531
  puts " Integration: Successfully completed"
532
532
  else
533
- puts " Error: #{integration_result[:error]&.message}"
533
+ puts " Error: #{integration_result[:result]}"
534
534
  end
535
535
  puts
536
536
  end
@@ -780,7 +780,7 @@ puts " • OAuth 2.0 and API key authentication"
780
780
  puts " • TLS 1.3 encryption for data in transit"
781
781
  puts " • Automated retry logic and error handling"
782
782
  puts " • Real-time monitoring and alerting"
783
- ```
783
+ ````
784
784
 
785
785
  ## Key API Integration Features
786
786
 
@@ -20,7 +20,7 @@ Our concurrent processing system includes:
20
20
 
21
21
  ## Complete Implementation
22
22
 
23
- ```ruby
23
+ ````ruby
24
24
  require 'rcrewai'
25
25
  require 'json'
26
26
  require 'concurrent'
@@ -40,7 +40,7 @@ end
40
40
  # Performance Monitoring Tool
41
41
  class PerformanceMonitorTool < RCrewAI::Tools::Base
42
42
  def initialize(**options)
43
- super
43
+ super()
44
44
  @name = 'performance_monitor'
45
45
  @description = 'Monitor and track task execution performance'
46
46
  @metrics = Concurrent::Hash.new
@@ -129,7 +129,7 @@ end
129
129
  # Shared Resource Pool Tool
130
130
  class SharedResourceTool < RCrewAI::Tools::Base
131
131
  def initialize(**options)
132
- super
132
+ super()
133
133
  @name = 'shared_resource_pool'
134
134
  @description = 'Manage shared resources across concurrent tasks'
135
135
  @resource_pool = Concurrent::Hash.new
@@ -843,7 +843,7 @@ puts " • #{(workload_data['customer_records'] + workload_data['transaction_r
843
843
  puts " • #{workload_data['content_pieces']} content pieces generated"
844
844
  puts " • #{workload_data['analysis_datasets']} analysis reports completed"
845
845
  puts " • #{workload_data['quality_checks']} quality validations performed"
846
- ```
846
+ ````
847
847
 
848
848
  ## Key Concurrent Processing Features
849
849
 
@@ -332,7 +332,7 @@ results[:results].each do |review_result|
332
332
  word_count = review_result[:result].split.length
333
333
  puts " Analysis: #{word_count} words of detailed feedback"
334
334
  else
335
- puts " Error: #{review_result[:error]&.message}"
335
+ puts " Error: #{review_result[:result]}"
336
336
  end
337
337
  puts
338
338
  end
@@ -20,7 +20,7 @@ Our content marketing pipeline includes:
20
20
 
21
21
  ## Complete Implementation
22
22
 
23
- ```ruby
23
+ ````ruby
24
24
  require 'rcrewai'
25
25
  require 'json'
26
26
  require 'yaml'
@@ -250,7 +250,7 @@ results[:results].each do |task_result|
250
250
  word_count = task_result[:result].split.length
251
251
  puts " Output: #{word_count} words generated"
252
252
  else
253
- puts " Error: #{task_result[:error]&.message}"
253
+ puts " Error: #{task_result[:result]}"
254
254
  end
255
255
  puts
256
256
  end
@@ -569,7 +569,7 @@ puts " • Content calendar scheduled"
569
569
  puts ""
570
570
  puts "💡 **Estimated Time Saved:** 20-25 hours of manual content creation"
571
571
  puts "💰 **Projected ROI:** $15,000-$30,000 in pipeline value"
572
- ```
572
+ ````
573
573
 
574
574
  ## Key Pipeline Features
575
575
 
@@ -20,7 +20,7 @@ Our custom tool development system includes:
20
20
 
21
21
  ## Complete Implementation
22
22
 
23
- ```ruby
23
+ ````ruby
24
24
  require 'rcrewai'
25
25
  require 'json'
26
26
  require 'net/http'
@@ -37,7 +37,7 @@ end
37
37
  # Advanced API Integration Tool
38
38
  class AdvancedAPITool < RCrewAI::Tools::Base
39
39
  def initialize(**options)
40
- super
40
+ super()
41
41
  @name = 'advanced_api_client'
42
42
  @description = 'Advanced API client with authentication, caching, and error handling'
43
43
  @base_url = options[:base_url]
@@ -212,7 +212,7 @@ end
212
212
  # Data Processing Tool
213
213
  class DataProcessingTool < RCrewAI::Tools::Base
214
214
  def initialize(**options)
215
- super
215
+ super()
216
216
  @name = 'data_processor'
217
217
  @description = 'Advanced data processing with transformation and analysis capabilities'
218
218
  @processors = {}
@@ -348,7 +348,7 @@ end
348
348
  # Machine Learning Tool
349
349
  class MachineLearningTool < RCrewAI::Tools::Base
350
350
  def initialize(**options)
351
- super
351
+ super()
352
352
  @name = 'ml_processor'
353
353
  @description = 'Machine learning tool for training, prediction, and model management'
354
354
  @models = {}
@@ -483,7 +483,7 @@ end
483
483
  # Testing and Validation Tool
484
484
  class ToolTestingFramework < RCrewAI::Tools::Base
485
485
  def initialize(**options)
486
- super
486
+ super()
487
487
  @name = 'tool_tester'
488
488
  @description = 'Comprehensive testing framework for custom tools'
489
489
  @test_results = {}
@@ -895,7 +895,7 @@ results[:results].each do |dev_result|
895
895
  if dev_result[:status] == :completed
896
896
  puts " Deliverable: Successfully completed"
897
897
  else
898
- puts " Issue: #{dev_result[:error]&.message}"
898
+ puts " Issue: #{dev_result[:result]}"
899
899
  end
900
900
  puts
901
901
  end
@@ -1169,7 +1169,7 @@ puts " • 60% reduction in future tool development time"
1169
1169
  puts " • 5x increase in available agent capabilities"
1170
1170
  puts " • 40% reduction in tool-related support requests"
1171
1171
  puts " • Strategic competitive advantage through advanced capabilities"
1172
- ```
1172
+ ````
1173
1173
 
1174
1174
  ## Key Custom Tool Development Features
1175
1175
 
@@ -1206,7 +1206,7 @@ Comprehensive testing and validation:
1206
1206
  ### 4. **Complete Development Lifecycle**
1207
1207
  End-to-end tool development process:
1208
1208
 
1209
- ```ruby
1209
+ ```text
1210
1210
  # Development workflow
1211
1211
  Architecture Design → Implementation → Testing →
1212
1212
  Documentation → Integration → Coordination & Quality Assurance
@@ -19,7 +19,7 @@ Our customer support system includes:
19
19
 
20
20
  ## Complete Implementation
21
21
 
22
- ```ruby
22
+ ````ruby
23
23
  require 'rcrewai'
24
24
  require 'json'
25
25
 
@@ -278,7 +278,7 @@ results[:results].each do |support_result|
278
278
  if support_result[:status] == :completed
279
279
  puts " Support: Successfully handled"
280
280
  else
281
- puts " Issue: #{support_result[:error]&.message}"
281
+ puts " Issue: #{support_result[:result]}"
282
282
  end
283
283
  puts
284
284
  end
@@ -670,7 +670,7 @@ puts " • 75% faster response times"
670
670
  puts " • 40% improvement in agent productivity"
671
671
  puts " • 85% self-service deflection rate"
672
672
  puts " • 15% improvement in customer satisfaction"
673
- ```
673
+ ````
674
674
 
675
675
  ## Key Customer Support Features
676
676
 
@@ -688,7 +688,7 @@ knowledge_manager # Documentation maintenance
688
688
  ### 2. **Intelligent Triage System**
689
689
  Automatic categorization and routing:
690
690
 
691
- ```ruby
691
+ ```text
692
692
  # Priority-based routing
693
693
  Critical → Immediate escalation
694
694
  High → Technical specialist
@@ -707,7 +707,7 @@ Support across all customer communication channels:
707
707
  ### 4. **Performance Monitoring**
708
708
  Comprehensive metrics and SLA tracking:
709
709
 
710
- ```ruby
710
+ ```text
711
711
  # SLA Targets
712
712
  Critical: 15 minutes first response, 2 hours resolution
713
713
  High: 1 hour first response, 8 hours resolution
@@ -19,7 +19,7 @@ Our data analysis team consists of:
19
19
 
20
20
  ## Complete Implementation
21
21
 
22
- ```ruby
22
+ ````ruby
23
23
  require 'rcrewai'
24
24
  require 'json'
25
25
  require 'csv'
@@ -284,7 +284,7 @@ results[:results].each do |analysis_result|
284
284
  word_count = analysis_result[:result].split.length
285
285
  puts " Analysis: #{word_count} words of detailed insights"
286
286
  else
287
- puts " Error: #{analysis_result[:error]&.message}"
287
+ puts " Error: #{analysis_result[:result]}"
288
288
  end
289
289
  puts
290
290
  end
@@ -586,7 +586,7 @@ puts " • Expand referral acquisition programs"
586
586
  puts " • Present findings to executive team"
587
587
  puts ""
588
588
  puts "📈 **Projected ROI:** $2.1M annual impact from $450K investment (467% ROI)"
589
- ```
589
+ ````
590
590
 
591
591
  ## Advanced Data Analysis Features
592
592
 
@@ -628,7 +628,7 @@ Complete analysis package includes:
628
628
  ### 4. **Decision-Ready Outputs**
629
629
  All analysis is structured for immediate action:
630
630
 
631
- ```ruby
631
+ ```text
632
632
  # Each recommendation includes:
633
633
  - Specific action items
634
634
  - Timeline and priorities
@@ -36,7 +36,7 @@ end
36
36
  # Database Connection Tool
37
37
  class DatabaseConnectionTool < RCrewAI::Tools::Base
38
38
  def initialize(**options)
39
- super
39
+ super()
40
40
  @name = 'database_connector'
41
41
  @description = 'Connect to various database systems and execute operations'
42
42
  @connections = {}
@@ -252,7 +252,7 @@ end
252
252
  # ETL Processing Tool
253
253
  class ETLProcessingTool < RCrewAI::Tools::Base
254
254
  def initialize(**options)
255
- super
255
+ super()
256
256
  @name = 'etl_processor'
257
257
  @description = 'Extract, Transform, and Load data between systems'
258
258
  end
@@ -399,7 +399,7 @@ end
399
399
  # Data Quality Tool
400
400
  class DataQualityTool < RCrewAI::Tools::Base
401
401
  def initialize(**options)
402
- super
402
+ super()
403
403
  @name = 'data_quality_manager'
404
404
  @description = 'Monitor and manage data quality across database systems'
405
405
  end
@@ -861,7 +861,7 @@ results[:results].each do |operation_result|
861
861
  if operation_result[:status] == :completed
862
862
  puts " Operation: Successfully completed"
863
863
  else
864
- puts " Issue: #{operation_result[:error]&.message}"
864
+ puts " Issue: #{operation_result[:result]}"
865
865
  end
866
866
  puts
867
867
  end