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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +133 -23
- data/ROADMAP.md +1 -1
- data/docs/api/agent.md +5 -2
- data/docs/api/configuration.md +36 -41
- data/docs/api/crew.md +34 -48
- data/docs/api/index.md +7 -0
- data/docs/api/task.md +10 -91
- data/docs/api/tools.md +19 -0
- data/docs/examples/api-integration.md +4 -4
- data/docs/examples/async-execution.md +4 -4
- data/docs/examples/code-review-crew.md +1 -1
- data/docs/examples/content-marketing-pipeline.md +3 -3
- data/docs/examples/custom-tools.md +8 -8
- data/docs/examples/customer-support.md +5 -5
- data/docs/examples/data-analysis-team.md +4 -4
- data/docs/examples/database-operations.md +4 -4
- data/docs/examples/ecommerce-operations.md +4 -4
- data/docs/examples/financial-analysis.md +3 -3
- data/docs/examples/hierarchical-crew.md +3 -2
- data/docs/examples/production-ready-crew.md +16 -10
- data/docs/examples/research-development.md +5 -5
- data/docs/examples/simple-research-crew.md +2 -2
- data/docs/examples/social-media.md +4 -4
- data/docs/examples/task-automation.md +2 -2
- data/docs/examples/tool-composition.md +42 -27
- data/docs/examples/web-scraping.md +6 -6
- data/docs/index.md +61 -44
- data/docs/tutorials/advanced-agents.md +194 -917
- data/docs/tutorials/agent-options.md +1 -1
- data/docs/tutorials/checkpointing.md +65 -0
- data/docs/tutorials/concurrency.md +57 -0
- data/docs/tutorials/custom-tools.md +198 -1143
- data/docs/tutorials/deployment.md +156 -155
- data/docs/tutorials/getting-started.md +69 -81
- data/docs/tutorials/index.md +19 -0
- data/docs/tutorials/interceptors-and-events.md +84 -0
- data/docs/tutorials/live-streaming.md +52 -0
- data/docs/tutorials/multiple-crews.md +70 -51
- data/docs/tutorials/providers.md +115 -0
- data/docs/upgrading-to-0.11.md +55 -0
- data/lib/rcrewai/agent.rb +0 -2
- data/lib/rcrewai/configuration.rb +64 -29
- data/lib/rcrewai/context_window.rb +12 -2
- data/lib/rcrewai/llm_clients/anthropic.rb +60 -9
- data/lib/rcrewai/llm_clients/base.rb +7 -0
- data/lib/rcrewai/llm_clients/bedrock.rb +29 -2
- data/lib/rcrewai/llm_clients/google.rb +36 -4
- data/lib/rcrewai/llm_clients/ollama.rb +17 -3
- data/lib/rcrewai/llm_clients/openai.rb +14 -1
- data/lib/rcrewai/llm_clients/openai_responses.rb +21 -2
- data/lib/rcrewai/pricing.rb +13 -3
- data/lib/rcrewai/tool_runner.rb +5 -1
- data/lib/rcrewai/version.rb +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70f424175fd6d8116947f503da80a59b3de84f12b9f3c308361e1104b1ebba06
|
|
4
|
+
data.tar.gz: cd6e8d8f22d6617efb0d9ccee5c2a7064c3aa6c92403c35edb717e26358369b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0ac2ac824ed422e7d9918aae99e7d811ee115bc30e19e5fe1d54c53e0a77d9af0229d296e483f638fa9f3a376c1304bbe6933c7bae233c54b3f8101a5e9a665
|
|
7
|
+
data.tar.gz: 9b3bb92c5af6e0d5258ae34daf48454d87dbcbc062e7dbc578aa764d4a6765a4023c72eb4e7f01d2ffa71920a743cf88115b7f484a2432f7f6cde5a07b922dcf
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.11.0] - 2026-11-05
|
|
11
|
+
|
|
12
|
+
Makes agents with tools work on real providers, and current Claude models usable. Requests after a tool call were malformed on every provider since 0.3.0, because specs stubbed the LLM and never checked the real request.
|
|
13
|
+
|
|
14
|
+
**Not yet proven against live APIs.** Request formats are covered by specs against stubbed HTTP. If a provider rejects a tool loop, please [open an issue](https://github.com/gkosmo/rcrewAI/issues).
|
|
15
|
+
|
|
16
|
+
Contains behavior changes. See `docs/upgrading-to-0.11.md`.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **Behavior change:** `config.model = '...'` was silently ignored for `:openai`, `:anthropic`, `:google` and `:azure`, because each provider's default model took precedence over it. A model now resolves as an explicit `<provider>_model`, then `model`, then the provider default. If your config sets `model` and you have been unknowingly running on a default, you will now get the model you asked for.
|
|
20
|
+
- A global `config.model` no longer follows an agent that switches provider with `llm: :anthropic`; that agent uses its own provider's model.
|
|
21
|
+
- `:ollama` no longer requires an API key in `RCrewAI.configure`, so a local setup works without a placeholder key. A model is still required.
|
|
22
|
+
- `:openai_responses` ignored `openai_model` and always sent `gpt-4`, and its `api_key` ignored `openai_api_key`. It now shares both with `:openai`.
|
|
23
|
+
- `Configuration#supported_providers` listed 5 providers; it now reports all 9.
|
|
24
|
+
- **Tool loops sent malformed history on every provider, since 0.3.0.** Specs stubbed the LLM, so the real requests were never checked. OpenAI, Azure, OpenAI-compatible and Snowflake got `tool_calls` without the `type` and `function` wrapper. The Responses API, Ollama, Google and Bedrock dropped the calls or sent results as text. Each now sends its provider's own format, and `raw_content` replays Gemini thought signatures and Responses and Bedrock reasoning unchanged.
|
|
25
|
+
- **Anthropic tool loops sent malformed history.** After a tool call the client dropped `tool_calls`, sent the assistant turn as `content: null`, and sent results as plain user text. It now sends `tool_use` and `tool_result` blocks, with one turn's results in one user message. Responses carry `raw_content`, which `ToolRunner` replays so thinking blocks come back unchanged.
|
|
26
|
+
- **Current Claude models rejected every request,** because the client always sent `temperature` and the default was `0.1`. It now sends only a temperature you set. `Configuration#explicit_temperature` reports it. Two internal calls that hardcoded `temperature: 0.2` no longer do, so on other providers they use your configured temperature.
|
|
27
|
+
- `with_overrides(temperature: nil)` and `llm: { temperature: nil }` now clear a global temperature; `nil` used to be ignored.
|
|
28
|
+
- Corrected Anthropic prices that were out of date (`claude-opus-4-7`, `claude-haiku-4-5`) and Anthropic context windows.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **Behavior change:** `:anthropic` now defaults to `claude-opus-5-5` and `:google` to `gemini-3.8-flash`, replacing retired models. Added prices and context windows for current Claude and Gemini models.
|
|
32
|
+
- **Behavior change:** providers with no default model (`:ollama`, `:openai_compatible`, `:bedrock`, `:snowflake`) now raise `ConfigurationError` when no model is set, instead of sending `gpt-4`, which those endpoints would not generally serve.
|
|
33
|
+
|
|
10
34
|
## [0.10.0] - 2026-10-19
|
|
11
35
|
|
|
12
36
|
### Added
|
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ RCrewAI is a Ruby implementation of the CrewAI framework, allowing you to create
|
|
|
11
11
|
## 🚀 Features
|
|
12
12
|
|
|
13
13
|
- **🤖 Intelligent Agents**: AI agents with reasoning loops, memory, and tool usage capabilities
|
|
14
|
-
- **🔗 Multi-LLM Support**: OpenAI, Anthropic (Claude), Google (Gemini), Azure OpenAI, and
|
|
14
|
+
- **🔗 Multi-LLM Support**: OpenAI (Chat Completions and Responses), Anthropic (Claude), Google (Gemini), Azure OpenAI, Ollama, AWS Bedrock, Snowflake Cortex, and any OpenAI-compatible endpoint
|
|
15
15
|
- **🛠️ Rich Tool Ecosystem**: Web search, file operations, SQL, email, code execution, PDF processing, and custom tools
|
|
16
16
|
- **🧠 Cognitive Memory**: Semantic recall (embeddings + cosine) with optional SQLite persistence and short-term/long-term/entity/tool memory types
|
|
17
17
|
- **🤝 Human-in-the-Loop**: Interactive approval workflows, human guidance, and collaborative decision making
|
|
@@ -21,6 +21,10 @@ RCrewAI is a Ruby implementation of the CrewAI framework, allowing you to create
|
|
|
21
21
|
- **🎯 Flexible Orchestration**: Sequential, hierarchical, and concurrent execution modes
|
|
22
22
|
- **🌊 Flows**: Event-driven workflows with `start`/`listen`/`router`, branching, and persistent state
|
|
23
23
|
- **📚 Knowledge (RAG)**: Ground agents in your own documents with built-in retrieval
|
|
24
|
+
- **💾 Checkpointing**: Resume a failed run without repeating finished tasks
|
|
25
|
+
- **🔍 Observability**: LLM request and response hooks, plus a nested event stream
|
|
26
|
+
- **🚦 Bounded Concurrency**: Parallel tool calls, consensus rounds and embeddings, each with a limit
|
|
27
|
+
- **🎙️ Live Streaming**: Cancellable Anthropic streams with connection reuse
|
|
24
28
|
- **💎 Ruby-First Design**: Built specifically for Ruby developers with idiomatic patterns
|
|
25
29
|
|
|
26
30
|
## 📦 Installation
|
|
@@ -134,43 +138,70 @@ puts "✅ Crew completed #{results[:completed_tasks]}/#{results[:total_tasks]} t
|
|
|
134
138
|
## 🔧 LLM Provider Support
|
|
135
139
|
|
|
136
140
|
```ruby
|
|
137
|
-
# OpenAI
|
|
141
|
+
# OpenAI
|
|
138
142
|
RCrewAI.configure do |config|
|
|
139
143
|
config.llm_provider = :openai
|
|
140
144
|
config.openai_api_key = ENV['OPENAI_API_KEY']
|
|
141
|
-
config.
|
|
145
|
+
config.openai_model = 'gpt-4o'
|
|
142
146
|
end
|
|
143
147
|
|
|
144
|
-
# Anthropic
|
|
148
|
+
# Anthropic
|
|
145
149
|
RCrewAI.configure do |config|
|
|
146
150
|
config.llm_provider = :anthropic
|
|
147
|
-
config.anthropic_api_key = ENV['ANTHROPIC_API_KEY']
|
|
148
|
-
config.
|
|
151
|
+
config.anthropic_api_key = ENV['ANTHROPIC_API_KEY']
|
|
152
|
+
config.anthropic_model = 'claude-opus-5-5'
|
|
149
153
|
end
|
|
150
154
|
|
|
151
155
|
# Google Gemini
|
|
152
156
|
RCrewAI.configure do |config|
|
|
153
157
|
config.llm_provider = :google
|
|
154
158
|
config.google_api_key = ENV['GOOGLE_API_KEY']
|
|
155
|
-
config.
|
|
159
|
+
config.google_model = 'gemini-3.8-flash'
|
|
156
160
|
end
|
|
157
161
|
|
|
158
162
|
# Azure OpenAI
|
|
159
163
|
RCrewAI.configure do |config|
|
|
160
164
|
config.llm_provider = :azure
|
|
161
165
|
config.azure_api_key = ENV['AZURE_OPENAI_API_KEY']
|
|
162
|
-
config.
|
|
163
|
-
config.
|
|
166
|
+
config.base_url = ENV['AZURE_OPENAI_ENDPOINT']
|
|
167
|
+
config.deployment_name = 'your-deployment'
|
|
168
|
+
config.api_version = '2024-10-21'
|
|
164
169
|
end
|
|
165
170
|
|
|
166
|
-
# Local Ollama
|
|
171
|
+
# Local Ollama (no API key)
|
|
167
172
|
RCrewAI.configure do |config|
|
|
168
173
|
config.llm_provider = :ollama
|
|
169
|
-
config.
|
|
170
|
-
config.model = '
|
|
174
|
+
config.base_url = 'http://localhost:11434'
|
|
175
|
+
config.model = 'llama3.1'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Any OpenAI-compatible endpoint: Together, Groq, Fireworks, vLLM, LiteLLM, OpenRouter
|
|
179
|
+
RCrewAI.configure do |config|
|
|
180
|
+
config.llm_provider = :openai_compatible
|
|
181
|
+
config.base_url = 'https://api.groq.com/openai/v1'
|
|
182
|
+
config.api_key = ENV['GROQ_API_KEY']
|
|
183
|
+
config.model = 'your-model'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# AWS Bedrock (bearer token; SigV4 signing isn't built in)
|
|
187
|
+
RCrewAI.configure do |config|
|
|
188
|
+
config.llm_provider = :bedrock
|
|
189
|
+
config.aws_region = 'us-east-1'
|
|
190
|
+
config.api_key = ENV['BEDROCK_API_KEY']
|
|
191
|
+
config.model = 'your-bedrock-model-id'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Snowflake Cortex
|
|
195
|
+
RCrewAI.configure do |config|
|
|
196
|
+
config.llm_provider = :snowflake
|
|
197
|
+
config.snowflake_account = 'your-account'
|
|
198
|
+
config.api_key = ENV['SNOWFLAKE_TOKEN']
|
|
199
|
+
config.model = 'your-cortex-model'
|
|
171
200
|
end
|
|
172
201
|
```
|
|
173
202
|
|
|
203
|
+
There's also `:openai_responses`, which uses OpenAI's Responses API (no streaming) with your OpenAI model and key settings.
|
|
204
|
+
|
|
174
205
|
### Per-agent LLM
|
|
175
206
|
|
|
176
207
|
The `RCrewAI.configure` block sets the crew-wide default. Any agent can override
|
|
@@ -184,7 +215,7 @@ researcher = RCrewAI::Agent.new(name: 'researcher', role: '...', goal: '...',
|
|
|
184
215
|
|
|
185
216
|
# Provider + model (and optionally api_key / temperature)
|
|
186
217
|
manager = RCrewAI::Agent.new(name: 'manager', role: '...', goal: '...',
|
|
187
|
-
llm: { provider: :anthropic, model: 'claude-
|
|
218
|
+
llm: { provider: :anthropic, model: 'claude-opus-5-5' })
|
|
188
219
|
|
|
189
220
|
worker = RCrewAI::Agent.new(name: 'worker', role: '...', goal: '...',
|
|
190
221
|
llm: { provider: :openai, model: 'gpt-4o-mini' })
|
|
@@ -240,7 +271,7 @@ the executing agent a head start:
|
|
|
240
271
|
crew = RCrewAI::Crew.new('research_crew', planning: true)
|
|
241
272
|
# Optionally use a dedicated (e.g. stronger) planner model:
|
|
242
273
|
crew = RCrewAI::Crew.new('research_crew', planning: true,
|
|
243
|
-
planning_llm: { provider: :anthropic, model: 'claude-
|
|
274
|
+
planning_llm: { provider: :anthropic, model: 'claude-opus-5-5' })
|
|
244
275
|
```
|
|
245
276
|
|
|
246
277
|
Planning is best-effort: if the planner errors or returns unparseable output,
|
|
@@ -465,6 +496,73 @@ becomes the result (ties break toward the task's assigned agent). A proposer tha
|
|
|
465
496
|
errors is dropped; if all proposals fail the task is marked failed. Consensus
|
|
466
497
|
multiplies LLM calls, so `consensus_agents` bounds the cost on larger crews.
|
|
467
498
|
|
|
499
|
+
## 💾 Checkpointing
|
|
500
|
+
|
|
501
|
+
Save progress after each task, then resume a failed run without paying for finished work again:
|
|
502
|
+
|
|
503
|
+
```ruby
|
|
504
|
+
store = RCrewAI::Checkpoint::FileStore.new('.rcrewai/checkpoints')
|
|
505
|
+
|
|
506
|
+
crew.execute(checkpoint: store)
|
|
507
|
+
run_id = crew.run_id
|
|
508
|
+
|
|
509
|
+
# Later, on a crew with the same task names:
|
|
510
|
+
crew.resume(run_id, checkpoint: store)
|
|
511
|
+
RCrewAI::Checkpoint.lineage(store, crew.run_id) # => [original_id, resumed_id]
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
See the [checkpointing tutorial](docs/tutorials/checkpointing.md).
|
|
515
|
+
|
|
516
|
+
## 🔍 Interceptors & Events
|
|
517
|
+
|
|
518
|
+
Hook into every LLM call, or subscribe to what the crew is doing:
|
|
519
|
+
|
|
520
|
+
```ruby
|
|
521
|
+
client = RCrewAI::LLMClient.for_provider(:openai, RCrewAI.configuration,
|
|
522
|
+
before_request: ->(payload, _ctx) { payload.merge(user: 'anonymous') })
|
|
523
|
+
client.after_response { |_result, ctx| puts "#{ctx[:model]}: #{ctx[:duration_ms]}ms"; nil }
|
|
524
|
+
|
|
525
|
+
agent = RCrewAI::Agent.new(name: 'analyst', role: 'Analyst', goal: 'Analyze', llm: client)
|
|
526
|
+
|
|
527
|
+
crew.execute do |event|
|
|
528
|
+
print event.text if event.is_a?(RCrewAI::Events::TextDelta)
|
|
529
|
+
end
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Events carry `id` and `parent_id`, so you can rebuild a run into a trace. See [interceptors and events](docs/tutorials/interceptors-and-events.md).
|
|
533
|
+
|
|
534
|
+
## 🚦 Concurrency
|
|
535
|
+
|
|
536
|
+
Tool calls in one turn, consensus rounds, and embeddings on `:google` and `:ollama` run concurrently, each limited to 8 at a time by default.
|
|
537
|
+
|
|
538
|
+
```ruby
|
|
539
|
+
# For an agent whose tools aren't thread-safe, or that calls a rate-limited API:
|
|
540
|
+
RCrewAI::Agent.new(name: 'clerk', role: 'Clerk', goal: 'Update records', parallel_tools: false)
|
|
541
|
+
|
|
542
|
+
RCrewAI::Crew.new('panel', process: :consensual, consensus_max_concurrency: 4)
|
|
543
|
+
RCrewAI::Knowledge::Embedder.new(provider: :ollama, max_concurrency: 2)
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
See the [concurrency tutorial](docs/tutorials/concurrency.md).
|
|
547
|
+
|
|
548
|
+
## 🎙️ Live Streaming
|
|
549
|
+
|
|
550
|
+
For real-time callers such as voice agents, the Anthropic client can cancel a stream mid-reply. It also reuses its connection between turns:
|
|
551
|
+
|
|
552
|
+
```ruby
|
|
553
|
+
client = RCrewAI::LLMClient.for_provider(:anthropic)
|
|
554
|
+
token = RCrewAI::CancelToken.new
|
|
555
|
+
|
|
556
|
+
begin
|
|
557
|
+
client.chat(messages: messages, model: 'claude-haiku-5-5', cancel: token,
|
|
558
|
+
stream: ->(event) { print event.text if event.is_a?(RCrewAI::Events::TextDelta) })
|
|
559
|
+
rescue RCrewAI::StreamCancelled
|
|
560
|
+
puts '(interrupted)'
|
|
561
|
+
end
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
See the [live streaming tutorial](docs/tutorials/live-streaming.md).
|
|
565
|
+
|
|
468
566
|
## 💡 Examples
|
|
469
567
|
|
|
470
568
|
### Hierarchical Team with Human Oversight
|
|
@@ -530,31 +628,39 @@ results = crew.execute(
|
|
|
530
628
|
## 🛠️ CLI Usage
|
|
531
629
|
|
|
532
630
|
```bash
|
|
533
|
-
# Create
|
|
534
|
-
$ rcrewai new my_research_crew
|
|
631
|
+
# Create and list crews
|
|
632
|
+
$ rcrewai new my_research_crew
|
|
633
|
+
$ rcrewai list
|
|
535
634
|
|
|
536
|
-
# Create agents
|
|
635
|
+
# Create agents and tasks
|
|
537
636
|
$ rcrewai agent new researcher \
|
|
538
637
|
--role "Senior Research Analyst" \
|
|
539
|
-
--
|
|
540
|
-
--human-input
|
|
638
|
+
--goal "Find reliable sources"
|
|
541
639
|
|
|
542
|
-
# Create tasks with dependencies
|
|
543
640
|
$ rcrewai task new research \
|
|
544
641
|
--description "Research latest AI developments" \
|
|
545
642
|
--agent researcher \
|
|
546
643
|
--async
|
|
547
644
|
|
|
548
|
-
# Run
|
|
549
|
-
$ rcrewai run --crew my_research_crew
|
|
645
|
+
# Run a crew
|
|
646
|
+
$ rcrewai run --crew my_research_crew
|
|
647
|
+
|
|
648
|
+
# Inspect saved checkpoints
|
|
649
|
+
$ rcrewai checkpoint list
|
|
650
|
+
$ rcrewai checkpoint info RUN_ID
|
|
651
|
+
$ rcrewai checkpoint delete RUN_ID
|
|
550
652
|
```
|
|
551
653
|
|
|
654
|
+
`checkpoint` and `version` are fully working. The `new`, `list`, `run`, `agent` and `task` commands are placeholders: they don't save anything, the lists are sample names, and `run` executes an empty crew. For now, define crews in Ruby.
|
|
655
|
+
|
|
552
656
|
## 📚 Examples & Documentation
|
|
553
657
|
|
|
554
658
|
- **[Getting Started Guide](docs/tutorials/getting-started.md)**: Learn the basics
|
|
555
659
|
- **[Human-in-the-Loop Example](examples/human_in_the_loop_example.rb)**: Interactive AI workflows
|
|
556
660
|
- **[Hierarchical Teams](examples/hierarchical_crew_example.rb)**: Manager coordination
|
|
557
661
|
- **[Async Execution](examples/async_execution_example.rb)**: Performance optimization
|
|
662
|
+
- **[LLM Providers](docs/tutorials/providers.md)**: Setup for all nine providers
|
|
663
|
+
- **[Upgrading to 0.11](docs/upgrading-to-0.11.md)**: What to check when upgrading
|
|
558
664
|
- **[API Documentation](docs/api/)**: Complete API reference
|
|
559
665
|
|
|
560
666
|
## 🎯 Use Cases
|
|
@@ -616,10 +722,14 @@ gem 'rcrewai-rails'
|
|
|
616
722
|
Rails.application.routes.draw do
|
|
617
723
|
mount RcrewAI::Rails::Engine, at: '/rcrewai'
|
|
618
724
|
end
|
|
725
|
+
```
|
|
619
726
|
|
|
727
|
+
```bash
|
|
620
728
|
# Generate a new crew
|
|
621
|
-
rails generate
|
|
729
|
+
$ rails generate rcrewai:rails:crew marketing_crew
|
|
730
|
+
```
|
|
622
731
|
|
|
732
|
+
```ruby
|
|
623
733
|
# Create persistent agents and tasks through Rails models
|
|
624
734
|
crew = RcrewAI::Rails::Crew.create!(name: "Content Team", description: "AI content generation")
|
|
625
735
|
agent = crew.agents.create!(name: "writer", role: "Content Writer", goal: "Create engaging content")
|
data/ROADMAP.md
CHANGED
|
@@ -5,7 +5,7 @@ This roadmap tracks feature parity between **RCrewAI** (Ruby) and the upstream
|
|
|
5
5
|
|
|
6
6
|
## Current status
|
|
7
7
|
|
|
8
|
-
- **RCrewAI:** `0.
|
|
8
|
+
- **RCrewAI:** `0.11.0` released
|
|
9
9
|
- **Upstream crewai:** `1.15.21`
|
|
10
10
|
|
|
11
11
|
RCrewAI is a faithful port of CrewAI's **"Crews"** mental model (Agents / Tasks /
|
data/docs/api/agent.md
CHANGED
|
@@ -24,10 +24,11 @@ Creates a new agent instance.
|
|
|
24
24
|
- `allow_delegation` (Boolean, optional) - Allow agent to delegate tasks (default: false)
|
|
25
25
|
- `manager` (Boolean, optional) - Designate as manager agent (default: false)
|
|
26
26
|
- `max_iterations` (Integer, optional) - Maximum reasoning iterations (default: 10)
|
|
27
|
-
- `max_execution_time` (Integer, optional) -
|
|
27
|
+
- `max_execution_time` (Integer, optional) - Stored but not currently enforced (default: 300)
|
|
28
28
|
- `human_input` (Boolean, optional) - Enable human-in-the-loop interactions (default: false)
|
|
29
29
|
- `require_approval_for_tools` (Boolean, optional) - Require human approval for tool usage
|
|
30
30
|
- `require_approval_for_final_answer` (Boolean, optional) - Require human approval for final results
|
|
31
|
+
- `parallel_tools` (Boolean, optional) - Run several tool calls from one turn concurrently (default: true). See [Concurrency]({{ site.baseurl }}/tutorials/concurrency)
|
|
31
32
|
- `llm` (Symbol \| Hash \| client, optional) - Per-agent LLM override: a provider symbol (`:anthropic`), an options hash (`{ provider:, model:, api_key:, temperature: }`), or a pre-built client. Defaults to the global configuration. See [Advanced Agent Options]({{ site.baseurl }}/tutorials/agent-options)
|
|
32
33
|
- `reasoning` (Boolean, optional) - Run a reasoning/planning pass before answering (default: false); surfaced on the result as `:reasoning`
|
|
33
34
|
- `max_reasoning_attempts` (Integer, optional) - Reasoning retries on empty output (default: 3)
|
|
@@ -55,7 +56,7 @@ agent = RCrewAI::Agent.new(
|
|
|
55
56
|
|
|
56
57
|
## Instance Methods
|
|
57
58
|
|
|
58
|
-
### `#execute_task(task)`
|
|
59
|
+
### `#execute_task(task, stream: nil, **opts)`
|
|
59
60
|
|
|
60
61
|
Executes a given task using the agent's reasoning capabilities.
|
|
61
62
|
|
|
@@ -258,6 +259,8 @@ Maximum reasoning iterations allowed.
|
|
|
258
259
|
**Type:** Integer
|
|
259
260
|
|
|
260
261
|
### `max_execution_time`
|
|
262
|
+
|
|
263
|
+
**Not currently enforced.** The value is stored, but nothing stops an agent when it's exceeded.
|
|
261
264
|
Maximum execution time in seconds.
|
|
262
265
|
|
|
263
266
|
**Type:** Integer
|
data/docs/api/configuration.md
CHANGED
|
@@ -12,11 +12,16 @@ The Configuration class manages settings for various LLM providers and global op
|
|
|
12
12
|
|
|
13
13
|
RCrewAI supports the following LLM providers:
|
|
14
14
|
|
|
15
|
-
- **OpenAI** (
|
|
16
|
-
- **Anthropic** (
|
|
17
|
-
- **Google** (
|
|
18
|
-
- **Azure OpenAI** (
|
|
19
|
-
- **Ollama** (
|
|
15
|
+
- **OpenAI** (`:openai`, and `:openai_responses` for the Responses API)
|
|
16
|
+
- **Anthropic** (`:anthropic`)
|
|
17
|
+
- **Google Gemini** (`:google`)
|
|
18
|
+
- **Azure OpenAI** (`:azure`)
|
|
19
|
+
- **Ollama** (`:ollama`, local models, no API key)
|
|
20
|
+
- **OpenAI-compatible endpoints** (`:openai_compatible`)
|
|
21
|
+
- **AWS Bedrock** (`:bedrock`)
|
|
22
|
+
- **Snowflake Cortex** (`:snowflake`)
|
|
23
|
+
|
|
24
|
+
See [LLM Providers]({{ site.baseurl }}/tutorials/providers) for setup examples.
|
|
20
25
|
|
|
21
26
|
## Basic Configuration
|
|
22
27
|
|
|
@@ -45,7 +50,7 @@ end
|
|
|
45
50
|
RCrewAI.configure do |config|
|
|
46
51
|
config.llm_provider = :openai
|
|
47
52
|
config.openai_api_key = "your-openai-key"
|
|
48
|
-
config.openai_model = "gpt-
|
|
53
|
+
config.openai_model = "gpt-4o"
|
|
49
54
|
config.temperature = 0.1
|
|
50
55
|
config.max_tokens = 4000
|
|
51
56
|
end
|
|
@@ -53,60 +58,43 @@ end
|
|
|
53
58
|
|
|
54
59
|
## Provider-Specific Configuration
|
|
55
60
|
|
|
61
|
+
Model names change often, so check your provider's documentation for what's available.
|
|
62
|
+
|
|
56
63
|
### OpenAI
|
|
57
64
|
|
|
58
65
|
```ruby
|
|
59
66
|
RCrewAI.configure do |config|
|
|
60
67
|
config.llm_provider = :openai
|
|
61
68
|
config.openai_api_key = ENV['OPENAI_API_KEY']
|
|
62
|
-
config.openai_model = 'gpt-
|
|
69
|
+
config.openai_model = 'gpt-4o'
|
|
63
70
|
config.temperature = 0.1
|
|
64
71
|
config.max_tokens = 4000
|
|
65
72
|
end
|
|
66
73
|
```
|
|
67
74
|
|
|
68
|
-
**Available Models:**
|
|
69
|
-
- `gpt-4`
|
|
70
|
-
- `gpt-4-turbo`
|
|
71
|
-
- `gpt-3.5-turbo`
|
|
72
|
-
- `gpt-3.5-turbo-16k`
|
|
73
|
-
|
|
74
75
|
### Anthropic (Claude)
|
|
75
76
|
|
|
76
77
|
```ruby
|
|
77
78
|
RCrewAI.configure do |config|
|
|
78
79
|
config.llm_provider = :anthropic
|
|
79
80
|
config.anthropic_api_key = ENV['ANTHROPIC_API_KEY']
|
|
80
|
-
config.anthropic_model = 'claude-
|
|
81
|
-
config.temperature = 0.1
|
|
81
|
+
config.anthropic_model = 'claude-opus-5-5'
|
|
82
82
|
config.max_tokens = 4000
|
|
83
83
|
end
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
**Available Models:**
|
|
87
|
-
- `claude-3-opus-20240229`
|
|
88
|
-
- `claude-3-sonnet-20240229`
|
|
89
|
-
- `claude-3-haiku-20240307`
|
|
90
|
-
- `claude-2.1`
|
|
91
|
-
- `claude-2.0`
|
|
92
|
-
|
|
93
86
|
### Google (Gemini)
|
|
94
87
|
|
|
95
88
|
```ruby
|
|
96
89
|
RCrewAI.configure do |config|
|
|
97
90
|
config.llm_provider = :google
|
|
98
91
|
config.google_api_key = ENV['GOOGLE_API_KEY']
|
|
99
|
-
config.google_model = 'gemini-
|
|
92
|
+
config.google_model = 'gemini-3.8-flash'
|
|
100
93
|
config.temperature = 0.1
|
|
101
94
|
config.max_tokens = 4000
|
|
102
95
|
end
|
|
103
96
|
```
|
|
104
97
|
|
|
105
|
-
**Available Models:**
|
|
106
|
-
- `gemini-pro`
|
|
107
|
-
- `gemini-pro-vision`
|
|
108
|
-
- `text-bison-001`
|
|
109
|
-
|
|
110
98
|
### Azure OpenAI
|
|
111
99
|
|
|
112
100
|
```ruby
|
|
@@ -114,7 +102,7 @@ RCrewAI.configure do |config|
|
|
|
114
102
|
config.llm_provider = :azure
|
|
115
103
|
config.azure_api_key = ENV['AZURE_OPENAI_API_KEY']
|
|
116
104
|
config.base_url = "https://your-resource.openai.azure.com/"
|
|
117
|
-
config.api_version = "
|
|
105
|
+
config.api_version = "2024-10-21"
|
|
118
106
|
config.deployment_name = "your-deployment-name"
|
|
119
107
|
config.azure_model = 'gpt-4'
|
|
120
108
|
end
|
|
@@ -170,9 +158,15 @@ RCrewAI.reset_configuration!
|
|
|
170
158
|
| Option | Type | Default | Description |
|
|
171
159
|
|--------|------|---------|-------------|
|
|
172
160
|
| `llm_provider` | Symbol | `:openai` | LLM provider to use |
|
|
173
|
-
| `temperature` | Float | `0.1` | Sampling temperature (0.0 - 2.0) |
|
|
161
|
+
| `temperature` | Float | `0.1` | Sampling temperature (0.0 - 2.0). Anthropic only receives a value you set |
|
|
174
162
|
| `max_tokens` | Integer | `4000` | Maximum tokens in response |
|
|
175
163
|
| `timeout` | Integer | `120` | Request timeout in seconds |
|
|
164
|
+
| `base_url` | String | none | Endpoint for `:azure`, `:openai_compatible`, `:ollama` and `:anthropic` gateways (`LLM_BASE_URL`) |
|
|
165
|
+
| `aws_region` | String | none | Region for `:bedrock` (`AWS_REGION`, `AWS_DEFAULT_REGION`) |
|
|
166
|
+
| `snowflake_account` | String | none | Account for `:snowflake` (`SNOWFLAKE_ACCOUNT`) |
|
|
167
|
+
| `pricing` | Hash | none | Per-model price overrides |
|
|
168
|
+
| `ollama_native_tools` | Boolean | none | Override native tool detection for Ollama models |
|
|
169
|
+
| `log_level` | Symbol | `:info` | Log level |
|
|
176
170
|
|
|
177
171
|
### Provider-Specific Keys
|
|
178
172
|
|
|
@@ -182,15 +176,19 @@ RCrewAI.reset_configuration!
|
|
|
182
176
|
| `anthropic_api_key` | `ANTHROPIC_API_KEY` | Anthropic API key |
|
|
183
177
|
| `google_api_key` | `GOOGLE_API_KEY` | Google API key |
|
|
184
178
|
| `azure_api_key` | `AZURE_OPENAI_API_KEY` | Azure OpenAI API key |
|
|
179
|
+
| `api_key` | `LLM_API_KEY` | Fallback key, and the key for `:openai_compatible`, `:bedrock` and `:snowflake` |
|
|
185
180
|
|
|
186
181
|
### Provider-Specific Models
|
|
187
182
|
|
|
188
183
|
| Option | Default | Description |
|
|
189
184
|
|--------|---------|-------------|
|
|
190
185
|
| `openai_model` | `gpt-4` | OpenAI model name |
|
|
191
|
-
| `anthropic_model` | `claude-
|
|
192
|
-
| `google_model` | `gemini-
|
|
186
|
+
| `anthropic_model` | `claude-opus-5-5` | Anthropic model name |
|
|
187
|
+
| `google_model` | `gemini-3.8-flash` | Google model name |
|
|
193
188
|
| `azure_model` | `gpt-4` | Azure OpenAI model name |
|
|
189
|
+
| `model` | none | Used when the provider-specific option isn't set, and required for `:ollama`, `:openai_compatible`, `:bedrock` and `:snowflake` |
|
|
190
|
+
|
|
191
|
+
The `gpt-4` defaults are old, so set a model explicitly for OpenAI and Azure. A model resolves as the provider-specific option, then `model`, then the default.
|
|
194
192
|
|
|
195
193
|
### Azure-Specific Settings
|
|
196
194
|
|
|
@@ -236,7 +234,7 @@ export GOOGLE_API_KEY="AIza..."
|
|
|
236
234
|
export AZURE_OPENAI_API_KEY="..."
|
|
237
235
|
|
|
238
236
|
# Azure Specific
|
|
239
|
-
export AZURE_API_VERSION="
|
|
237
|
+
export AZURE_API_VERSION="2024-10-21"
|
|
240
238
|
export AZURE_DEPLOYMENT_NAME="gpt-4-deployment"
|
|
241
239
|
export LLM_BASE_URL="https://your-resource.openai.azure.com/"
|
|
242
240
|
|
|
@@ -251,7 +249,7 @@ RCrewAI validates configuration when `configure` is called:
|
|
|
251
249
|
```ruby
|
|
252
250
|
begin
|
|
253
251
|
RCrewAI.configure do |config|
|
|
254
|
-
config.llm_provider =
|
|
252
|
+
config.llm_provider = nil
|
|
255
253
|
end
|
|
256
254
|
rescue RCrewAI::ConfigurationError => e
|
|
257
255
|
puts "Configuration error: #{e.message}"
|
|
@@ -283,12 +281,9 @@ RCrewAI.reset_configuration!
|
|
|
283
281
|
|
|
284
282
|
1. **Use Environment Variables**: Store API keys in environment variables, not in code
|
|
285
283
|
2. **Provider Selection**: Choose providers based on task requirements:
|
|
286
|
-
-
|
|
287
|
-
- Claude: Great for analysis and reasoning
|
|
288
|
-
- Gemini: Good for creative tasks
|
|
289
|
-
- Azure: Enterprise requirements
|
|
284
|
+
- Azure, Bedrock, Snowflake: Your organization already uses that platform
|
|
290
285
|
- Ollama: Privacy-sensitive or offline use
|
|
291
|
-
3. **Temperature Settings
|
|
286
|
+
3. **Temperature Settings** (not accepted by current Claude models):
|
|
292
287
|
- Low (0.1-0.3): Factual, consistent outputs
|
|
293
288
|
- Medium (0.5-0.7): Balanced creativity and consistency
|
|
294
289
|
- High (0.8-1.0): Creative, varied outputs
|
|
@@ -312,7 +307,7 @@ end
|
|
|
312
307
|
```ruby
|
|
313
308
|
# Check supported providers
|
|
314
309
|
puts RCrewAI.configuration.supported_providers
|
|
315
|
-
# => [:openai, :anthropic, :google, :azure, :ollama]
|
|
310
|
+
# => [:openai, :anthropic, :google, :azure, :ollama, :openai_compatible, :bedrock, :snowflake, :openai_responses]
|
|
316
311
|
```
|
|
317
312
|
|
|
318
313
|
**Azure Configuration Issues**
|
|
@@ -321,7 +316,7 @@ RCrewAI.configure do |config|
|
|
|
321
316
|
config.llm_provider = :azure
|
|
322
317
|
config.azure_api_key = ENV['AZURE_OPENAI_API_KEY']
|
|
323
318
|
config.base_url = "https://your-resource.openai.azure.com/" # Include trailing slash
|
|
324
|
-
config.api_version = "
|
|
319
|
+
config.api_version = "2024-10-21" # Use supported API version
|
|
325
320
|
config.deployment_name = "your-deployment-name" # Exact deployment name
|
|
326
321
|
end
|
|
327
322
|
```
|