rcrewai-rails 0.8.0 → 0.9.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 +72 -1
- data/README.md +35 -4
- data/app/jobs/rcrewai/rails/crew_execution_job.rb +25 -1
- data/app/models/rcrewai/rails/agent.rb +5 -1
- data/db/migrate/013_add_parallel_tools_to_rcrewai_agents.rb +7 -0
- data/lib/generators/rcrewai/rails/install/templates/create_rcrewai_tables.rb +1 -0
- data/lib/rcrewai/rails/version.rb +1 -1
- data/rcrewai-rails.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a95b32182721ebdcaa575a0c4d06851286bd3ba79c1028d958a49c0e8eda054
|
|
4
|
+
data.tar.gz: 3f00b82481064604f975679bd358cb6fa0e7c8f97fe4378ae7ab44be277ffdbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1090695f7c42d14caf966231f919c64ec0b2077cbc53d3192fd06823a8742f05e74fafc7d904fcc8ff4308888d3231aff9877fcedf5d5deb344849c905958db
|
|
7
|
+
data.tar.gz: 4573e67c5c9b925917d0a8a44ad38da4f6572a9580adb9da0122939118f94e9fe2b7e50be115165d01205154e7a6481d2a9bce7cf39ee8cdf00ecb6bfdf2348e
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.0] - 2026-09-10
|
|
11
|
+
|
|
12
|
+
Tracks **rcrewai 0.9.0**, whose theme is concurrency: a turn's tool calls,
|
|
13
|
+
consensus proposals/scoring, and embeddings now fan out across threads. The
|
|
14
|
+
0.8.1 suite passed against it unchanged, so this release is about verifying the
|
|
15
|
+
engine under concurrency and exposing the new opt-out.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- `rcrewai_agents.parallel_tools` — forwards `parallel_tools:` to
|
|
19
|
+
`RCrewAI::Agent`. rcrewai 0.9 runs a turn's tool calls concurrently by
|
|
20
|
+
default; set this to `false` on an agent whose tools are not safe to run in
|
|
21
|
+
parallel (or that must not fan out against a rate-limited API). Nullable, and
|
|
22
|
+
only forwarded when explicitly set, so existing agents keep the gem's default.
|
|
23
|
+
|
|
24
|
+
### Verified
|
|
25
|
+
- **Span attribution holds under concurrent tool calls.** rcrewai 0.9 emits tool
|
|
26
|
+
events from worker threads, carrying the run span across the boundary
|
|
27
|
+
(`Events.with_parent` is thread-local). Confirmed against the real gem that
|
|
28
|
+
concurrent tool events arrive with the correct `parent_id` and none nil, and
|
|
29
|
+
added collector specs covering interleaved starts/results matched by
|
|
30
|
+
`call_id`, a failing tool not affecting its sibling, and delivery from eight
|
|
31
|
+
threads at once.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- Requires `rcrewai ~> 0.9.0`.
|
|
35
|
+
|
|
36
|
+
### Upgrading
|
|
37
|
+
Existing installs need the new migration:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
$ rails rcrew_ai_rails:install:migrations
|
|
41
|
+
$ rails db:migrate
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This adds one nullable column, `rcrewai_agents.parallel_tools`. Nothing changes
|
|
45
|
+
until you set it.
|
|
46
|
+
|
|
47
|
+
## [0.8.1] - 2026-09-10
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
- **Enabling checkpointing without running the 0.8 migration failed mid-run.**
|
|
51
|
+
`CrewExecutionJob` built the default `ActiveRecordCheckpointStore` without
|
|
52
|
+
checking that its table existed, so the run raised
|
|
53
|
+
`ActiveRecord::StatementInvalid: Could not find table 'rcrewai_checkpoints'`
|
|
54
|
+
partway through — after tasks had already executed and been paid for, and
|
|
55
|
+
with nothing in the message naming the cause. The job now fails up front with
|
|
56
|
+
`CheckpointTableMissing`, whose message names the migration command to run.
|
|
57
|
+
It is `discard_on`'d rather than retried, since retrying cannot fix a missing
|
|
58
|
+
table. Configuring a custom `checkpoint_store` skips the check, and nothing
|
|
59
|
+
changes when checkpointing is off (the default).
|
|
60
|
+
- **The test suite was order-dependent.** `real_migrate_spec` and
|
|
61
|
+
`upgrade_migrate_spec` called `ActiveRecord::Base.establish_connection` to get
|
|
62
|
+
a scratch database for migrating. The test database is sqlite3 `":memory:"`,
|
|
63
|
+
so that discarded the pool holding Combustion's schema, and reconnecting gave
|
|
64
|
+
an empty database — every later example lost its tables. The suite passed only
|
|
65
|
+
because those specs happened to run last: under `--order random` it failed
|
|
66
|
+
~128 of 258 examples. Migrations now run against an isolated connection via
|
|
67
|
+
`ActiveRecord::Tasks::DatabaseTasks.migration_class`, leaving the suite's own
|
|
68
|
+
connection untouched.
|
|
69
|
+
- **`rails_logger_tool_spec` leaked a fake `Rails.logger`** into every example
|
|
70
|
+
that ran after it. The fake accepts exactly one argument, so unrelated specs
|
|
71
|
+
logging through the real logger raised `ArgumentError: wrong number of
|
|
72
|
+
arguments`. It is now restored after each example.
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
- Specs run in random order by default (`config.order = :random`), so an example
|
|
76
|
+
that leaks global state fails immediately instead of silently depending on
|
|
77
|
+
file order. Seeds are reproducible: `bundle exec rspec --seed 1234`.
|
|
78
|
+
|
|
10
79
|
## [0.8.0] - 2026-09-10
|
|
11
80
|
|
|
12
81
|
Tracks **rcrewai 0.8.0**, which is backward compatible for this engine — the
|
|
@@ -242,7 +311,9 @@ existing agents, tasks, and crews build unchanged.
|
|
|
242
311
|
### Changed
|
|
243
312
|
- Rename generators from `rcrew_a_i` to `rcrewai` namespacing.
|
|
244
313
|
|
|
245
|
-
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.
|
|
314
|
+
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.9.0...HEAD
|
|
315
|
+
[0.9.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.8.1...v0.9.0
|
|
316
|
+
[0.8.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.8.0...v0.8.1
|
|
246
317
|
[0.8.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.7.1...v0.8.0
|
|
247
318
|
[0.7.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.7.0...v0.7.1
|
|
248
319
|
[0.7.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.6.1...v0.7.0
|
data/README.md
CHANGED
|
@@ -10,12 +10,13 @@ Rails engine for integrating [RcrewAI](https://github.com/gkosmo/rcrewai-rails)
|
|
|
10
10
|
- **Web UI**: Monitor and manage crews through a built-in interface
|
|
11
11
|
- **Rails-Specific Tools**: Pre-built tools for ActiveRecord, ActionMailer, Rails cache, and more
|
|
12
12
|
- **Configuration**: Flexible configuration through Rails initializers
|
|
13
|
-
- **Full rcrewai 0.
|
|
13
|
+
- **Full rcrewai 0.9 feature coverage** (see [rcrewai 0.9](#rcrewai-09-capabilities), [0.8](#rcrewai-08-capabilities) and [0.7](#rcrewai-07-capabilities) capabilities):
|
|
14
14
|
- Agent config: reasoning, per-agent LLM, rate limiting, context-window trimming, cognitive memory
|
|
15
15
|
- Task output: structured output schemas, guardrails, file output, multimodal attachments
|
|
16
16
|
- Crew: `before_kickoff`/`after_kickoff` hooks, planning, the `consensual` process, batch execution
|
|
17
17
|
- Knowledge (RAG) sources and Flow persistence
|
|
18
18
|
- Checkpointing with resume, LLM interceptors, and the Bedrock / Snowflake / OpenAI-compatible providers
|
|
19
|
+
- Concurrent tool calls, with a per-agent opt-out
|
|
19
20
|
|
|
20
21
|
## Observation Engine
|
|
21
22
|
|
|
@@ -104,7 +105,13 @@ $ rails db:migrate
|
|
|
104
105
|
(The task name comes from the engine's railtie name, `rcrew_ai_rails`.)
|
|
105
106
|
|
|
106
107
|
Rails copies only the migrations your app does not already have. Upgrading to
|
|
107
|
-
0.
|
|
108
|
+
0.9.0 from 0.8.x adds one:
|
|
109
|
+
|
|
110
|
+
| Migration | Purpose |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `013_add_parallel_tools_to_rcrewai_agents` | `rcrewai_agents.parallel_tools` — per-agent opt-out from concurrent tool calls |
|
|
113
|
+
|
|
114
|
+
Upgrading from 0.7.x adds one more:
|
|
108
115
|
|
|
109
116
|
| Migration | Purpose |
|
|
110
117
|
|---|---|
|
|
@@ -276,9 +283,27 @@ crew.execute_sync(inputs)
|
|
|
276
283
|
CrewExecutionJob.set(wait: 5.minutes).perform_later(crew, inputs)
|
|
277
284
|
```
|
|
278
285
|
|
|
279
|
-
## rcrewai 0.
|
|
286
|
+
## rcrewai 0.9 capabilities
|
|
287
|
+
|
|
288
|
+
This engine tracks [rcrewai](https://github.com/gkosmo/rcrewAI) `~> 0.9`.
|
|
289
|
+
|
|
290
|
+
### Concurrency
|
|
291
|
+
|
|
292
|
+
rcrewai 0.9 runs a turn's tool calls concurrently, so a turn costs the slowest
|
|
293
|
+
call rather than the sum. This is on by default and needs no configuration.
|
|
280
294
|
|
|
281
|
-
|
|
295
|
+
Opt an agent out when its tools are not safe to run in parallel, or must not
|
|
296
|
+
fan out against a rate-limited API:
|
|
297
|
+
|
|
298
|
+
```ruby
|
|
299
|
+
agent.update!(parallel_tools: false)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Left `nil` (the default), the gem's own default applies. The observation
|
|
303
|
+
engine attributes concurrent tool calls correctly — each tool span is matched
|
|
304
|
+
to its result by `call_id`, not by arrival order.
|
|
305
|
+
|
|
306
|
+
## rcrewai 0.8 capabilities
|
|
282
307
|
|
|
283
308
|
### Checkpointing and resume
|
|
284
309
|
|
|
@@ -313,6 +338,11 @@ RCrewAI::Checkpoint.lineage(store, resumed.run_id)
|
|
|
313
338
|
Any object responding to `save`/`load`/`list`/`delete` can replace the store via
|
|
314
339
|
`config.checkpoint_store`.
|
|
315
340
|
|
|
341
|
+
Checkpointing needs the `rcrewai_checkpoints` table, so run the migration when
|
|
342
|
+
you enable it (see [Upgrading an existing install](#upgrading-an-existing-install)).
|
|
343
|
+
If the table is missing, the job raises `CheckpointTableMissing` up front rather
|
|
344
|
+
than failing partway through a run.
|
|
345
|
+
|
|
316
346
|
### LLM interceptors
|
|
317
347
|
|
|
318
348
|
Hooks that run around every LLM request the engine's agents make — useful for
|
|
@@ -366,6 +396,7 @@ existing records are unaffected — set only what you need.
|
|
|
366
396
|
| `max_rpm` | Rate-limit the agent's LLM calls (requests per minute) |
|
|
367
397
|
| `reasoning` / `max_reasoning_attempts` | Run a planning/reasoning pass before answering |
|
|
368
398
|
| `respect_context_window` | Trim history to fit the model's context window |
|
|
399
|
+
| `parallel_tools` | Run a turn's tool calls concurrently (rcrewai 0.9; `nil` uses the gem default of on) |
|
|
369
400
|
| `llm_config` (JSON) | Per-agent LLM override, e.g. `{ "provider": "anthropic", "model": "claude-sonnet-5" }` |
|
|
370
401
|
| `memory_enabled` + `memory_scope` + `memory_short_term_limit` | Enable cognitive memory (see below) |
|
|
371
402
|
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
module RcrewAI
|
|
2
2
|
module Rails
|
|
3
3
|
class CrewExecutionJob < ActiveJob::Base
|
|
4
|
+
# Raised when checkpointing is enabled but its table is missing, which
|
|
5
|
+
# means the 0.8 migration has not been run.
|
|
6
|
+
class CheckpointTableMissing < StandardError; end
|
|
7
|
+
|
|
4
8
|
queue_as { RcrewAI::Rails.config.job_queue_name }
|
|
5
9
|
|
|
6
10
|
retry_on StandardError, wait: :exponentially_longer, attempts: 3
|
|
11
|
+
# A missing table is a configuration problem: retrying cannot fix it and
|
|
12
|
+
# only delays the error the operator needs to see.
|
|
13
|
+
discard_on CheckpointTableMissing
|
|
7
14
|
|
|
8
15
|
def perform(crew, inputs = {}, batch_id: nil, resume_run_id: nil)
|
|
9
16
|
execution = crew.executions.create!(
|
|
@@ -69,7 +76,24 @@ module RcrewAI
|
|
|
69
76
|
end
|
|
70
77
|
return nil unless enabled
|
|
71
78
|
|
|
72
|
-
RcrewAI::Rails.config.checkpoint_store
|
|
79
|
+
store = RcrewAI::Rails.config.checkpoint_store
|
|
80
|
+
return store if store
|
|
81
|
+
|
|
82
|
+
ensure_checkpoint_table!
|
|
83
|
+
ActiveRecordCheckpointStore.new
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checkpointing was turned on but the 0.8 migration has not been run, so
|
|
87
|
+
# the default store has no table to write to. Failing here with the fix
|
|
88
|
+
# in the message beats an ActiveRecord::StatementInvalid raised partway
|
|
89
|
+
# through the run, once tasks have already been executed and paid for.
|
|
90
|
+
def ensure_checkpoint_table!
|
|
91
|
+
return if Checkpoint.table_exists?
|
|
92
|
+
|
|
93
|
+
raise CheckpointTableMissing,
|
|
94
|
+
"checkpointing is enabled but the #{Checkpoint.table_name} table does not exist. " \
|
|
95
|
+
"Run `rails rcrew_ai_rails:install:migrations && rails db:migrate` to add it, " \
|
|
96
|
+
"or set config.checkpoint_enabled = false."
|
|
73
97
|
end
|
|
74
98
|
|
|
75
99
|
# Translates rcrewai events into the span tree. Returns nil when
|
|
@@ -34,7 +34,7 @@ module RcrewAI
|
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# rcrewai 0.5.0 agent options. Only emit a key when it is meaningfully
|
|
37
|
+
# rcrewai 0.5.0+ agent options. Only emit a key when it is meaningfully
|
|
38
38
|
# set, so an all-default record constructs exactly as it did pre-0.5.
|
|
39
39
|
def agent_options
|
|
40
40
|
opts = {}
|
|
@@ -42,6 +42,10 @@ module RcrewAI
|
|
|
42
42
|
opts[:reasoning] = reasoning if reasoning
|
|
43
43
|
opts[:max_reasoning_attempts] = max_reasoning_attempts if reasoning && max_reasoning_attempts
|
|
44
44
|
opts[:respect_context_window] = respect_context_window if respect_context_window
|
|
45
|
+
# rcrewai 0.9 runs a turn's tool calls concurrently by default. nil
|
|
46
|
+
# means "leave the gem's default alone"; only an explicit false (or
|
|
47
|
+
# true) is forwarded.
|
|
48
|
+
opts[:parallel_tools] = parallel_tools unless parallel_tools.nil?
|
|
45
49
|
opts[:llm] = llm_config.symbolize_keys if llm_config.present?
|
|
46
50
|
sources = rcrew_knowledge_sources
|
|
47
51
|
opts[:knowledge_sources] = sources if sources.any?
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
class AddParallelToolsToRcrewAIAgents < ActiveRecord::Migration[7.0]
|
|
2
|
+
def change
|
|
3
|
+
# Nullable on purpose: nil means "use the rcrewai default" (parallel tools
|
|
4
|
+
# on), so existing agents keep the gem's behavior without a backfill.
|
|
5
|
+
add_column :rcrewai_agents, :parallel_tools, :boolean
|
|
6
|
+
end
|
|
7
|
+
end
|
|
@@ -42,6 +42,7 @@ class CreateRcrewAITables < ActiveRecord::Migration[7.0]
|
|
|
42
42
|
t.boolean :reasoning, default: false, null: false
|
|
43
43
|
t.integer :max_reasoning_attempts, default: 3
|
|
44
44
|
t.boolean :respect_context_window, default: false, null: false
|
|
45
|
+
t.boolean :parallel_tools
|
|
45
46
|
t.text :llm_config
|
|
46
47
|
t.boolean :active, default: true
|
|
47
48
|
|
data/rcrewai-rails.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rcrewai-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gkosmo
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.9.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.9.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rails
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -262,6 +262,7 @@ files:
|
|
|
262
262
|
- db/migrate/010_create_rcrewai_spans.rb
|
|
263
263
|
- db/migrate/011_add_observation_rollups_to_rcrewai_executions.rb
|
|
264
264
|
- db/migrate/012_create_rcrewai_checkpoints.rb
|
|
265
|
+
- db/migrate/013_add_parallel_tools_to_rcrewai_agents.rb
|
|
265
266
|
- docs/api.html
|
|
266
267
|
- docs/capabilities.html
|
|
267
268
|
- docs/examples.html
|