rcrewai-rails 0.6.0 → 0.6.1
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 +11 -1
- data/README.md +105 -3
- data/lib/rcrewai/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42ec86061d4e3a880fa4c985abc0f2ec55e6c7868b95c65d62f7d6de27324042
|
|
4
|
+
data.tar.gz: f73a244bd91a867dd450f94d5fe82ab02e968f62e0a82e311a8e9e736be99e46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 366cdfeb973451b6144514e72bcfe07e3dc3269e0d9bf093f9c73949f2f660ce6f3b8f136cf3fb1af7e27f08b5210da4c785b0f3e6ac5a9827379f764733f151
|
|
7
|
+
data.tar.gz: b91f369cbdd7141f83e36a407742cc31af9ecff0a3563668ec50b91dd6689c82f2bd2cd40c3db6753ef693bd535e90782cf51cfa4afc2a074a2012683d20ed74
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.1] - 2026-07-07
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Refresh the README for rcrewai 0.7: corrected the install-generator namespace
|
|
14
|
+
(`rcrewai:rails:install`) and removed a broken crew-level `memory_enabled`
|
|
15
|
+
example (that DSL method no longer exists — memory is agent-level). Added a
|
|
16
|
+
"rcrewai 0.7 capabilities" section documenting the new agent/task/crew/
|
|
17
|
+
knowledge/flow configuration. Docs only.
|
|
18
|
+
|
|
10
19
|
## [0.6.0] - 2026-07-07
|
|
11
20
|
|
|
12
21
|
Tracks rcrewai 0.7.0: adds the `:consensual` crew process and agent-level
|
|
@@ -114,7 +123,8 @@ existing agents, tasks, and crews build unchanged.
|
|
|
114
123
|
### Changed
|
|
115
124
|
- Rename generators from `rcrew_a_i` to `rcrewai` namespacing.
|
|
116
125
|
|
|
117
|
-
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.6.
|
|
126
|
+
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.6.1...HEAD
|
|
127
|
+
[0.6.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.6.0...v0.6.1
|
|
118
128
|
[0.6.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.5.1...v0.6.0
|
|
119
129
|
[0.5.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.5.0...v0.5.1
|
|
120
130
|
[0.5.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.4.0...v0.5.0
|
data/README.md
CHANGED
|
@@ -10,6 +10,11 @@ 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.7 feature coverage** (see [rcrewai 0.7 capabilities](#rcrewai-07-capabilities)):
|
|
14
|
+
- Agent config: reasoning, per-agent LLM, rate limiting, context-window trimming, cognitive memory
|
|
15
|
+
- Task output: structured output schemas, guardrails, file output, multimodal attachments
|
|
16
|
+
- Crew: `before_kickoff`/`after_kickoff` hooks, planning, the `consensual` process, batch execution
|
|
17
|
+
- Knowledge (RAG) sources and Flow persistence
|
|
13
18
|
|
|
14
19
|
## Installation
|
|
15
20
|
|
|
@@ -28,7 +33,7 @@ $ bundle install
|
|
|
28
33
|
Run the installation generator:
|
|
29
34
|
|
|
30
35
|
```bash
|
|
31
|
-
$ rails generate
|
|
36
|
+
$ rails generate rcrewai:rails:install
|
|
32
37
|
$ rails db:migrate
|
|
33
38
|
```
|
|
34
39
|
|
|
@@ -103,8 +108,7 @@ class ResearchCrew
|
|
|
103
108
|
|
|
104
109
|
crew_name "research_team"
|
|
105
110
|
crew_description "AI-powered research team"
|
|
106
|
-
process_type :sequential
|
|
107
|
-
memory_enabled true
|
|
111
|
+
process_type :sequential # :sequential, :hierarchical, or :consensual
|
|
108
112
|
|
|
109
113
|
def setup_agents
|
|
110
114
|
@researcher = create_agent("researcher",
|
|
@@ -187,6 +191,101 @@ crew.execute_sync(inputs)
|
|
|
187
191
|
CrewExecutionJob.set(wait: 5.minutes).perform_later(crew, inputs)
|
|
188
192
|
```
|
|
189
193
|
|
|
194
|
+
## rcrewai 0.7 capabilities
|
|
195
|
+
|
|
196
|
+
This engine tracks [rcrewai](https://github.com/gkosmo/rcrewAI) `~> 0.7`. The
|
|
197
|
+
following capabilities are configured through columns on the persisted models and
|
|
198
|
+
forwarded to the core objects at build time. All are **off/absent by default**, so
|
|
199
|
+
existing records are unaffected — set only what you need.
|
|
200
|
+
|
|
201
|
+
### Agent configuration (`RcrewAI::Rails::Agent`)
|
|
202
|
+
|
|
203
|
+
| Column | Effect |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `max_rpm` | Rate-limit the agent's LLM calls (requests per minute) |
|
|
206
|
+
| `reasoning` / `max_reasoning_attempts` | Run a planning/reasoning pass before answering |
|
|
207
|
+
| `respect_context_window` | Trim history to fit the model's context window |
|
|
208
|
+
| `llm_config` (JSON) | Per-agent LLM override, e.g. `{ "provider": "anthropic", "model": "claude-sonnet-5" }` |
|
|
209
|
+
| `memory_enabled` + `memory_scope` + `memory_short_term_limit` | Enable cognitive memory (see below) |
|
|
210
|
+
|
|
211
|
+
```ruby
|
|
212
|
+
agent = crew.agents.create!(
|
|
213
|
+
name: "researcher", role: "Researcher", goal: "Find facts",
|
|
214
|
+
reasoning: true,
|
|
215
|
+
max_rpm: 30,
|
|
216
|
+
llm_config: { provider: "anthropic", model: "claude-sonnet-5" },
|
|
217
|
+
memory_enabled: true, memory_scope: "research", memory_short_term_limit: 20
|
|
218
|
+
)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Agent memory** (rcrewai 0.6+): set `memory_enabled: true` to turn on cognitive
|
|
222
|
+
memory. `memory_scope` isolates an agent's memories; `memory_short_term_limit`
|
|
223
|
+
caps recent-execution recall. The embedder and store are objects, so configure
|
|
224
|
+
them once in the initializer:
|
|
225
|
+
|
|
226
|
+
```ruby
|
|
227
|
+
RcrewAI::Rails.configure do |config|
|
|
228
|
+
config.default_memory_embedder = RCrewAI::Knowledge::Embedder.new
|
|
229
|
+
config.default_memory_store = RCrewAI::Memory::SqliteStore.new(path: "db/rcrewai_memory.sqlite3")
|
|
230
|
+
end
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Task output processing (`RcrewAI::Rails::Task`)
|
|
234
|
+
|
|
235
|
+
| Column | Effect |
|
|
236
|
+
|---|---|
|
|
237
|
+
| `output_schema` (JSON) | Validate/coerce the result against a JSON schema (structured output) |
|
|
238
|
+
| `guardrail_class` + `guardrail_method_name` + `guardrail_max_retries` | Validate/transform output, retrying on failure |
|
|
239
|
+
| `output_file` + `create_directory` + `markdown` | Write the result to disk |
|
|
240
|
+
| `attachments` (JSON) | Multimodal image inputs, e.g. `[{ "type": "image", "url": "https://…" }]` |
|
|
241
|
+
|
|
242
|
+
A guardrail is resolved from a host class: `guardrail_class` names a class whose
|
|
243
|
+
`guardrail_method_name` accepts the output and returns `[ok, value_or_error]`.
|
|
244
|
+
|
|
245
|
+
### Crew orchestration (`RcrewAI::Rails::Crew`)
|
|
246
|
+
|
|
247
|
+
| Column | Effect |
|
|
248
|
+
|---|---|
|
|
249
|
+
| `process_type` | `"sequential"`, `"hierarchical"`, or `"consensual"` |
|
|
250
|
+
| `consensus_agents` | Number of proposers for the `consensual` process (default 3) |
|
|
251
|
+
| `planning` / `planning_llm` | Run a planner pass before execution |
|
|
252
|
+
| `before_kickoff_class`/`_method`, `after_kickoff_class`/`_method` | Lifecycle hooks resolved from host classes |
|
|
253
|
+
|
|
254
|
+
**Batch execution** (rcrewai `kickoff_for_each` parity) runs the crew once per
|
|
255
|
+
input set, one `Execution` per input grouped by a shared `batch_id`:
|
|
256
|
+
|
|
257
|
+
```ruby
|
|
258
|
+
result = crew.execute_batch_sync([{ topic: "a" }, { topic: "b" }])
|
|
259
|
+
crew.batch_executions(result[:batch_id]) # the runs, in order
|
|
260
|
+
crew.execute_batch_async(inputs_list) # enqueue N jobs, returns the batch_id
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Knowledge (RAG)
|
|
264
|
+
|
|
265
|
+
Attach sources to an agent (role-specific) or a crew (shared with all its agents):
|
|
266
|
+
|
|
267
|
+
```ruby
|
|
268
|
+
agent.knowledge_sources.create!(source_type: "url", value: "https://example.com/doc")
|
|
269
|
+
crew.knowledge_sources.create!(source_type: "string", value: "Reference text…")
|
|
270
|
+
# source_type: "string" | "file" | "pdf" | "csv" | "url"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Active sources are embedded lazily at execution. See the memory initializer above
|
|
274
|
+
for embedder configuration.
|
|
275
|
+
|
|
276
|
+
### Flows
|
|
277
|
+
|
|
278
|
+
Define Flow subclasses in your app (Ruby); the engine persists their state and
|
|
279
|
+
runs. Pass `RcrewAI::Rails::ActiveRecordStateStore` so flows resume from the DB,
|
|
280
|
+
and use `FlowRun.execute` to track a kickoff:
|
|
281
|
+
|
|
282
|
+
```ruby
|
|
283
|
+
run = RcrewAI::Rails::FlowRun.execute(MyFlow, inputs: { topic: "ruby" })
|
|
284
|
+
run.status # "completed" / "failed"
|
|
285
|
+
run.result # the final flow state
|
|
286
|
+
RcrewAI::Rails::FlowState.find_by(state_id: run.state_id) # the persisted state
|
|
287
|
+
```
|
|
288
|
+
|
|
190
289
|
## Database Models
|
|
191
290
|
|
|
192
291
|
The gem provides these ActiveRecord models:
|
|
@@ -196,6 +295,9 @@ The gem provides these ActiveRecord models:
|
|
|
196
295
|
- `RcrewAI::Rails::Task` - Task definitions
|
|
197
296
|
- `RcrewAI::Rails::Execution` - Execution history
|
|
198
297
|
- `RcrewAI::Rails::ExecutionLog` - Detailed execution logs
|
|
298
|
+
- `RcrewAI::Rails::KnowledgeSource` - Knowledge (RAG) sources, owned by an agent or a crew
|
|
299
|
+
- `RcrewAI::Rails::FlowState` - Persisted rcrewai Flow state (resume flows across restarts)
|
|
300
|
+
- `RcrewAI::Rails::FlowRun` - Flow-run tracking (status, inputs, result, timing)
|
|
199
301
|
|
|
200
302
|
## API Endpoints
|
|
201
303
|
|