rcrewai-rails 0.5.1 → 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 +38 -1
- data/README.md +105 -3
- data/app/controllers/rcrewai/rails/api/v1/crews_controller.rb +1 -1
- data/app/controllers/rcrewai/rails/crews_controller.rb +1 -1
- data/app/models/rcrewai/rails/agent.rb +15 -0
- data/app/models/rcrewai/rails/crew.rb +5 -4
- data/app/views/rcrewai/rails/crews/edit.html.erb +2 -7
- data/app/views/rcrewai/rails/crews/new.html.erb +2 -7
- data/app/views/rcrewai/rails/crews/show.html.erb +0 -3
- data/db/migrate/008_add_consensus_agents_to_rcrewai_crews.rb +5 -0
- data/db/migrate/009_add_memory_config_to_agents_and_clean_crews.rb +10 -0
- data/lib/generators/rcrewai/rails/crew/templates/crew.rb.erb +0 -1
- data/lib/generators/rcrewai/rails/install/templates/create_rcrewai_tables.rb +3 -2
- data/lib/rcrewai/rails/configuration.rb +4 -1
- data/lib/rcrewai/rails/crew_builder.rb +0 -6
- data/lib/rcrewai/rails/version.rb +1 -1
- data/rcrewai-rails.gemspec +1 -1
- metadata +5 -3
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,41 @@ 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
|
+
|
|
19
|
+
## [0.6.0] - 2026-07-07
|
|
20
|
+
|
|
21
|
+
Tracks rcrewai 0.7.0: adds the `:consensual` crew process and agent-level
|
|
22
|
+
cognitive memory configuration, and requires `rcrewai ~> 0.7`. Includes a
|
|
23
|
+
schema cleanup that removes unused columns (see Removed + the `009` migration).
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Support the rcrewai 0.7.0 `:consensual` crew process: `process_type:
|
|
27
|
+
"consensual"` is now valid, a nullable `consensus_agents` column is forwarded to
|
|
28
|
+
the core crew (defaulting to the core's 3 when unset), and the web UI + API
|
|
29
|
+
permit it. Existing sequential/hierarchical crews are unaffected.
|
|
30
|
+
- Agent memory configuration: enable rcrewai 0.6+ cognitive memory per agent via
|
|
31
|
+
the existing `memory_enabled` flag, with `memory_scope` /
|
|
32
|
+
`memory_short_term_limit` columns forwarded to the core agent. The embedder and
|
|
33
|
+
store come from `RcrewAI::Rails.config.default_memory_embedder` /
|
|
34
|
+
`default_memory_store` (set in a host initializer). Memory is off by default, so
|
|
35
|
+
existing agents are unaffected.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Require `rcrewai ~> 0.7` (was `~> 0.5`).
|
|
39
|
+
|
|
40
|
+
### Removed
|
|
41
|
+
- Dropped the unused `memory_enabled` and `memory` columns from `rcrewai_crews`.
|
|
42
|
+
Core memory is agent-level; these crew columns were never wired to anything.
|
|
43
|
+
**Migration note:** the `009` migration removes them (reversible).
|
|
44
|
+
|
|
10
45
|
## [0.5.1] - 2026-07-06
|
|
11
46
|
|
|
12
47
|
### Fixed
|
|
@@ -88,7 +123,9 @@ existing agents, tasks, and crews build unchanged.
|
|
|
88
123
|
### Changed
|
|
89
124
|
- Rename generators from `rcrew_a_i` to `rcrewai` namespacing.
|
|
90
125
|
|
|
91
|
-
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.
|
|
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
|
|
128
|
+
[0.6.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.5.1...v0.6.0
|
|
92
129
|
[0.5.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.5.0...v0.5.1
|
|
93
130
|
[0.5.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.4.0...v0.5.0
|
|
94
131
|
[0.4.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.3.1...v0.4.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
|
|
|
@@ -45,7 +45,7 @@ module RcrewAI
|
|
|
45
45
|
def crew_params
|
|
46
46
|
params.require(:crew).permit(
|
|
47
47
|
:name, :description, :process_type, :verbose,
|
|
48
|
-
:
|
|
48
|
+
:cache_enabled, :max_rpm, :manager_llm, :consensus_agents, :active
|
|
49
49
|
)
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -59,7 +59,7 @@ module RcrewAI
|
|
|
59
59
|
def crew_params
|
|
60
60
|
params.require(:crew).permit(
|
|
61
61
|
:name, :description, :process_type, :verbose,
|
|
62
|
-
:
|
|
62
|
+
:cache_enabled, :max_rpm, :manager_llm, :consensus_agents, :active
|
|
63
63
|
)
|
|
64
64
|
end
|
|
65
65
|
end
|
|
@@ -41,9 +41,24 @@ module RcrewAI
|
|
|
41
41
|
opts[:llm] = llm_config.symbolize_keys if llm_config.present?
|
|
42
42
|
sources = rcrew_knowledge_sources
|
|
43
43
|
opts[:knowledge_sources] = sources if sources.any?
|
|
44
|
+
opts[:memory] = memory_options if memory_enabled
|
|
44
45
|
opts
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Agent memory config (rcrewai 0.6+). Scalars come from columns; embedder
|
|
49
|
+
# and store come from the engine configuration (set in a host initializer).
|
|
50
|
+
# May return {} — an empty hash still enables memory with core defaults.
|
|
51
|
+
def memory_options
|
|
52
|
+
m = {}
|
|
53
|
+
m[:scope] = memory_scope if memory_scope.present?
|
|
54
|
+
m[:short_term_limit] = memory_short_term_limit if memory_short_term_limit.present?
|
|
55
|
+
embedder = RcrewAI::Rails.config.default_memory_embedder
|
|
56
|
+
store = RcrewAI::Rails.config.default_memory_store
|
|
57
|
+
m[:embedder] = embedder if embedder
|
|
58
|
+
m[:store] = store if store
|
|
59
|
+
m
|
|
60
|
+
end
|
|
61
|
+
|
|
47
62
|
def rcrew_knowledge_sources
|
|
48
63
|
knowledge_sources.active.map(&:to_rcrew_source)
|
|
49
64
|
end
|
|
@@ -9,10 +9,9 @@ module RcrewAI
|
|
|
9
9
|
has_many :knowledge_sources, as: :owner, class_name: "RcrewAI::Rails::KnowledgeSource", dependent: :destroy
|
|
10
10
|
|
|
11
11
|
validates :name, presence: true
|
|
12
|
-
validates :process_type, inclusion: { in: %w[sequential hierarchical] }
|
|
12
|
+
validates :process_type, inclusion: { in: %w[sequential hierarchical consensual] }
|
|
13
13
|
|
|
14
14
|
serialize :config, coder: JSON
|
|
15
|
-
serialize :memory, coder: JSON
|
|
16
15
|
|
|
17
16
|
scope :active, -> { where(active: true) }
|
|
18
17
|
scope :with_agents, -> { includes(:agents) }
|
|
@@ -37,14 +36,16 @@ module RcrewAI
|
|
|
37
36
|
crew
|
|
38
37
|
end
|
|
39
38
|
|
|
40
|
-
#
|
|
41
|
-
# an all-default crew constructs exactly
|
|
39
|
+
# Crew construction options (planning, consensus_agents, knowledge). Emit a
|
|
40
|
+
# key only when meaningfully set, so an all-default crew constructs exactly
|
|
41
|
+
# as it did before.
|
|
42
42
|
def crew_planning_options
|
|
43
43
|
opts = {}
|
|
44
44
|
opts[:planning] = planning if planning
|
|
45
45
|
opts[:planning_llm] = planning_llm.to_sym if planning_llm.present?
|
|
46
46
|
sources = rcrew_knowledge_sources
|
|
47
47
|
opts[:knowledge_sources] = sources if sources.any?
|
|
48
|
+
opts[:consensus_agents] = consensus_agents if consensus_agents.present?
|
|
48
49
|
opts
|
|
49
50
|
end
|
|
50
51
|
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
<%= form.select :process_type,
|
|
35
35
|
options_for_select([
|
|
36
36
|
['Sequential', 'sequential'],
|
|
37
|
-
['Hierarchical', 'hierarchical']
|
|
37
|
+
['Hierarchical', 'hierarchical'],
|
|
38
|
+
['Consensual', 'consensual']
|
|
38
39
|
], @crew.process_type),
|
|
39
40
|
{ prompt: 'Select process type' },
|
|
40
41
|
{ class: "form-select" } %>
|
|
@@ -46,12 +47,6 @@
|
|
|
46
47
|
<span class="form-help">Enable verbose logging</span>
|
|
47
48
|
</div>
|
|
48
49
|
|
|
49
|
-
<div class="form-group">
|
|
50
|
-
<%= form.label :memory_enabled, class: "form-label" %>
|
|
51
|
-
<%= form.check_box :memory_enabled, class: "form-checkbox" %>
|
|
52
|
-
<span class="form-help">Enable memory for agents</span>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
50
|
<div class="form-group">
|
|
56
51
|
<%= form.label :cache_enabled, class: "form-label" %>
|
|
57
52
|
<%= form.check_box :cache_enabled, class: "form-checkbox" %>
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
<%= form.select :process_type,
|
|
32
32
|
options_for_select([
|
|
33
33
|
['Sequential', 'sequential'],
|
|
34
|
-
['Hierarchical', 'hierarchical']
|
|
34
|
+
['Hierarchical', 'hierarchical'],
|
|
35
|
+
['Consensual', 'consensual']
|
|
35
36
|
], @crew.process_type),
|
|
36
37
|
{ prompt: 'Select process type' },
|
|
37
38
|
{ class: "form-select" } %>
|
|
@@ -43,12 +44,6 @@
|
|
|
43
44
|
<span class="form-help">Enable verbose logging</span>
|
|
44
45
|
</div>
|
|
45
46
|
|
|
46
|
-
<div class="form-group">
|
|
47
|
-
<%= form.label :memory_enabled, class: "form-label" %>
|
|
48
|
-
<%= form.check_box :memory_enabled, class: "form-checkbox" %>
|
|
49
|
-
<span class="form-help">Enable memory for agents</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
47
|
<div class="form-group">
|
|
53
48
|
<%= form.label :cache_enabled, class: "form-label" %>
|
|
54
49
|
<%= form.check_box :cache_enabled, class: "form-checkbox" %>
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
<div class="meta-item">
|
|
15
15
|
<strong>Process Type:</strong> <%= @crew.process_type %>
|
|
16
16
|
</div>
|
|
17
|
-
<div class="meta-item">
|
|
18
|
-
<strong>Memory:</strong> <%= @crew.memory_enabled ? "Enabled" : "Disabled" %>
|
|
19
|
-
</div>
|
|
20
17
|
<div class="meta-item">
|
|
21
18
|
<strong>Cache:</strong> <%= @crew.cache_enabled ? "Enabled" : "Disabled" %>
|
|
22
19
|
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
class AddMemoryConfigToAgentsAndCleanCrews < ActiveRecord::Migration[7.0]
|
|
2
|
+
def change
|
|
3
|
+
add_column :rcrewai_agents, :memory_scope, :string
|
|
4
|
+
add_column :rcrewai_agents, :memory_short_term_limit, :integer
|
|
5
|
+
|
|
6
|
+
# Core memory is agent-level; these crew columns were never used.
|
|
7
|
+
remove_column :rcrewai_crews, :memory_enabled, :boolean, default: false
|
|
8
|
+
remove_column :rcrewai_crews, :memory, :text
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -5,10 +5,10 @@ class CreateRcrewaiTables < ActiveRecord::Migration[7.0]
|
|
|
5
5
|
t.text :description
|
|
6
6
|
t.string :process_type, default: "sequential"
|
|
7
7
|
t.boolean :verbose, default: false
|
|
8
|
-
t.boolean :memory_enabled, default: false
|
|
9
8
|
t.boolean :cache_enabled, default: false
|
|
10
9
|
t.integer :max_rpm
|
|
11
10
|
t.string :manager_llm
|
|
11
|
+
t.integer :consensus_agents
|
|
12
12
|
t.boolean :planning, default: false, null: false
|
|
13
13
|
t.string :planning_llm
|
|
14
14
|
t.string :before_kickoff_class
|
|
@@ -16,7 +16,6 @@ class CreateRcrewaiTables < ActiveRecord::Migration[7.0]
|
|
|
16
16
|
t.string :after_kickoff_class
|
|
17
17
|
t.string :after_kickoff_method
|
|
18
18
|
t.text :config
|
|
19
|
-
t.text :memory
|
|
20
19
|
t.boolean :active, default: true
|
|
21
20
|
|
|
22
21
|
t.timestamps
|
|
@@ -32,6 +31,8 @@ class CreateRcrewaiTables < ActiveRecord::Migration[7.0]
|
|
|
32
31
|
t.text :goal
|
|
33
32
|
t.text :backstory
|
|
34
33
|
t.boolean :memory_enabled, default: false
|
|
34
|
+
t.string :memory_scope
|
|
35
|
+
t.integer :memory_short_term_limit
|
|
35
36
|
t.boolean :verbose, default: false
|
|
36
37
|
t.boolean :allow_delegation, default: false
|
|
37
38
|
t.text :tools
|
|
@@ -3,7 +3,8 @@ module RcrewAI
|
|
|
3
3
|
class Configuration
|
|
4
4
|
attr_accessor :job_queue_name, :enable_web_ui, :persistence_backend,
|
|
5
5
|
:default_llm_provider, :default_llm_model, :max_retries,
|
|
6
|
-
:timeout, :enable_logging, :log_level, :async_execution
|
|
6
|
+
:timeout, :enable_logging, :log_level, :async_execution,
|
|
7
|
+
:default_memory_embedder, :default_memory_store
|
|
7
8
|
|
|
8
9
|
def initialize
|
|
9
10
|
@job_queue_name = "default"
|
|
@@ -16,6 +17,8 @@ module RcrewAI
|
|
|
16
17
|
@enable_logging = true
|
|
17
18
|
@log_level = :info
|
|
18
19
|
@async_execution = true # Use ActiveJob for async by default
|
|
20
|
+
@default_memory_embedder = nil
|
|
21
|
+
@default_memory_store = nil
|
|
19
22
|
end
|
|
20
23
|
end
|
|
21
24
|
end
|
|
@@ -26,11 +26,6 @@ module RcrewAI
|
|
|
26
26
|
@process_type || :sequential
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def memory_enabled(enabled = nil)
|
|
30
|
-
@memory_enabled = enabled unless enabled.nil?
|
|
31
|
-
@memory_enabled || false
|
|
32
|
-
end
|
|
33
|
-
|
|
34
29
|
def cache_enabled(enabled = nil)
|
|
35
30
|
@cache_enabled = enabled unless enabled.nil?
|
|
36
31
|
@cache_enabled || true
|
|
@@ -66,7 +61,6 @@ module RcrewAI
|
|
|
66
61
|
RcrewAI::Rails::Crew.find_or_create_by(name: self.class.crew_name) do |crew|
|
|
67
62
|
crew.description = self.class.crew_description
|
|
68
63
|
crew.process_type = self.class.process_type.to_s
|
|
69
|
-
crew.memory_enabled = self.class.memory_enabled
|
|
70
64
|
crew.cache_enabled = self.class.cache_enabled
|
|
71
65
|
crew.verbose = verbose?
|
|
72
66
|
end
|
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.6.1
|
|
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.7'
|
|
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.7'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rails
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -249,6 +249,8 @@ files:
|
|
|
249
249
|
- db/migrate/005_add_batch_id_to_rcrewai_executions.rb
|
|
250
250
|
- db/migrate/006_create_rcrewai_knowledge_sources.rb
|
|
251
251
|
- db/migrate/007_create_rcrewai_flows.rb
|
|
252
|
+
- db/migrate/008_add_consensus_agents_to_rcrewai_crews.rb
|
|
253
|
+
- db/migrate/009_add_memory_config_to_agents_and_clean_crews.rb
|
|
252
254
|
- docs/index.html
|
|
253
255
|
- lib/generators/rcrewai/rails/crew/crew_generator.rb
|
|
254
256
|
- lib/generators/rcrewai/rails/crew/templates/agent.rb.erb
|