rcrewai-rails 0.3.0 → 0.3.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/docs/index.html +410 -0
- data/docs/superpowers/specs/2026-06-16-github-pages-landing-design.md +61 -0
- data/lib/generators/rcrewai/rails/install/install_generator.rb +15 -20
- data/lib/rcrewai/rails/engine.rb +17 -3
- data/lib/rcrewai/rails/version.rb +2 -1
- data/rcrewai-rails.gemspec +1 -1
- metadata +4 -8
- data/lib/generators/rcrew_a_i/rails/crew/crew_generator.rb +0 -42
- data/lib/generators/rcrew_a_i/rails/crew/templates/agent.rb.erb +0 -45
- data/lib/generators/rcrew_a_i/rails/crew/templates/crew.rb.erb +0 -72
- data/lib/generators/rcrew_a_i/rails/install/install_generator.rb +0 -40
- data/lib/generators/rcrew_a_i/rails/install/templates/create_rcrewai_tables.rb +0 -109
- data/lib/generators/rcrew_a_i/rails/install/templates/rcrewai.rb +0 -53
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de3fd7383b01dfbcf053637b30537fb9e78d3541b0fdf09d0d7c92f0f132525e
|
|
4
|
+
data.tar.gz: 0f3e47c876aefb405a63abdd5b22ea965afdf438bdc2af46d3154e619d89f42d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c4bdd914f99b4e2f5bb324e2d5658e088698be20834b0f4186a3e6ef7d574330c0de9cdc112970f937858858738800cf80f97cbc88699c1b7397674ba979a2c
|
|
7
|
+
data.tar.gz: c93205e5e31f6036f796c616ad623711136a6f2ab0f902a149c02737d3ecea902bafc4d564d3f2c36bcf1cfddd754c6bf8a35aefbcc74f3ecabc4165cf767f87
|
data/docs/index.html
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>RcrewAI Rails — AI agent crews for Rails</title>
|
|
7
|
+
<meta name="description" content="Rails engine for building AI agent crews with ActiveRecord persistence, background jobs, generators, and a web dashboard.">
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
--crimson: #c4221f;
|
|
11
|
+
--crimson-dark: #9c1714;
|
|
12
|
+
--ink: #1a1a1a;
|
|
13
|
+
--muted: #5c5c64;
|
|
14
|
+
--line: #e5e3df;
|
|
15
|
+
--bg: #fbfaf8;
|
|
16
|
+
--card: #ffffff;
|
|
17
|
+
--code-bg: #1f1d24;
|
|
18
|
+
--code-fg: #e8e6f0;
|
|
19
|
+
--code-line: #2e2b36;
|
|
20
|
+
--radius: 10px;
|
|
21
|
+
--maxw: 960px;
|
|
22
|
+
}
|
|
23
|
+
* { box-sizing: border-box; }
|
|
24
|
+
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
28
|
+
color: var(--ink);
|
|
29
|
+
background: var(--bg);
|
|
30
|
+
line-height: 1.6;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
a { color: var(--crimson); text-decoration: none; }
|
|
34
|
+
a:hover { text-decoration: underline; }
|
|
35
|
+
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
|
|
36
|
+
|
|
37
|
+
/* Header */
|
|
38
|
+
header {
|
|
39
|
+
position: sticky; top: 0; z-index: 50;
|
|
40
|
+
background: rgba(251,250,248,0.92);
|
|
41
|
+
backdrop-filter: saturate(180%) blur(8px);
|
|
42
|
+
border-bottom: 1px solid var(--line);
|
|
43
|
+
}
|
|
44
|
+
.nav {
|
|
45
|
+
display: flex; align-items: center; gap: 20px;
|
|
46
|
+
height: 60px;
|
|
47
|
+
}
|
|
48
|
+
.brand { font-weight: 700; font-size: 18px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
|
|
49
|
+
.brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--crimson); display: inline-block; }
|
|
50
|
+
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
|
|
51
|
+
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
|
|
52
|
+
.nav-links a:hover { color: var(--ink); text-decoration: none; }
|
|
53
|
+
.nav-links .gh { color: var(--ink); font-weight: 600; }
|
|
54
|
+
@media (max-width: 720px) { .nav-links a:not(.gh) { display: none; } }
|
|
55
|
+
|
|
56
|
+
/* Hero */
|
|
57
|
+
.hero { padding: 72px 0 56px; text-align: center; border-bottom: 1px solid var(--line); }
|
|
58
|
+
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
|
|
59
|
+
.hero h1 .accent { color: var(--crimson); }
|
|
60
|
+
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
|
|
61
|
+
.install-line {
|
|
62
|
+
display: inline-block; font-family: "SF Mono", Menlo, Consolas, monospace;
|
|
63
|
+
background: var(--code-bg); color: var(--code-fg);
|
|
64
|
+
padding: 12px 18px; border-radius: var(--radius); font-size: 15px;
|
|
65
|
+
margin-bottom: 28px;
|
|
66
|
+
}
|
|
67
|
+
.install-line .prompt { color: #8a86a0; user-select: none; }
|
|
68
|
+
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
|
|
69
|
+
.btn {
|
|
70
|
+
display: inline-block; padding: 11px 22px; border-radius: var(--radius);
|
|
71
|
+
font-weight: 600; font-size: 15px; border: 1px solid transparent;
|
|
72
|
+
}
|
|
73
|
+
.btn-primary { background: var(--crimson); color: #fff; }
|
|
74
|
+
.btn-primary:hover { background: var(--crimson-dark); text-decoration: none; }
|
|
75
|
+
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
|
|
76
|
+
.btn-secondary:hover { border-color: var(--muted); text-decoration: none; }
|
|
77
|
+
|
|
78
|
+
/* Sections */
|
|
79
|
+
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
|
|
80
|
+
section h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
|
|
81
|
+
section .sub { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
|
|
82
|
+
h3 { font-size: 18px; margin: 32px 0 10px; }
|
|
83
|
+
h3:first-of-type { margin-top: 0; }
|
|
84
|
+
|
|
85
|
+
/* Feature grid */
|
|
86
|
+
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
|
|
87
|
+
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
|
|
88
|
+
.feature {
|
|
89
|
+
background: var(--card); border: 1px solid var(--line);
|
|
90
|
+
border-radius: var(--radius); padding: 22px;
|
|
91
|
+
}
|
|
92
|
+
.feature h3 { margin: 0 0 6px; font-size: 16px; }
|
|
93
|
+
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
|
|
94
|
+
.feature .ic { font-size: 22px; display: block; margin-bottom: 10px; }
|
|
95
|
+
|
|
96
|
+
/* Code */
|
|
97
|
+
pre {
|
|
98
|
+
background: var(--code-bg); color: var(--code-fg);
|
|
99
|
+
border: 1px solid var(--code-line); border-radius: var(--radius);
|
|
100
|
+
padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.55;
|
|
101
|
+
font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
102
|
+
margin: 0 0 16px;
|
|
103
|
+
}
|
|
104
|
+
code { font-family: "SF Mono", Menlo, Consolas, monospace; }
|
|
105
|
+
p code, li code, td code {
|
|
106
|
+
background: #efece6; color: var(--crimson-dark);
|
|
107
|
+
padding: 2px 6px; border-radius: 5px; font-size: 13.5px;
|
|
108
|
+
}
|
|
109
|
+
.caption { font-size: 13px; color: var(--muted); margin: -8px 0 22px; }
|
|
110
|
+
|
|
111
|
+
/* Lists */
|
|
112
|
+
ul.clean { padding-left: 20px; }
|
|
113
|
+
ul.clean li { margin-bottom: 6px; }
|
|
114
|
+
|
|
115
|
+
/* Table */
|
|
116
|
+
table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
117
|
+
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
|
|
118
|
+
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
119
|
+
td.method { font-family: "SF Mono", Menlo, Consolas, monospace; }
|
|
120
|
+
.verb { display: inline-block; min-width: 46px; font-weight: 700; }
|
|
121
|
+
.verb.get { color: #1f7a3d; }
|
|
122
|
+
.verb.post { color: var(--crimson); }
|
|
123
|
+
|
|
124
|
+
/* Footer */
|
|
125
|
+
footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14px; }
|
|
126
|
+
footer a { color: var(--muted); text-decoration: underline; }
|
|
127
|
+
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
|
|
128
|
+
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
|
|
129
|
+
</style>
|
|
130
|
+
</head>
|
|
131
|
+
<body>
|
|
132
|
+
|
|
133
|
+
<header>
|
|
134
|
+
<div class="wrap nav">
|
|
135
|
+
<span class="brand"><span class="dot"></span>RcrewAI Rails</span>
|
|
136
|
+
<nav class="nav-links">
|
|
137
|
+
<a href="#features">Features</a>
|
|
138
|
+
<a href="#install">Install</a>
|
|
139
|
+
<a href="#usage">Usage</a>
|
|
140
|
+
<a href="#tools">Tools</a>
|
|
141
|
+
<a href="#api">API</a>
|
|
142
|
+
<a class="gh" href="https://github.com/gkosmo/rcrewai-rails">GitHub →</a>
|
|
143
|
+
</nav>
|
|
144
|
+
</div>
|
|
145
|
+
</header>
|
|
146
|
+
|
|
147
|
+
<section class="hero" style="border-top:none;">
|
|
148
|
+
<div class="wrap">
|
|
149
|
+
<h1>Build AI agent crews,<br><span class="accent">the Rails way.</span></h1>
|
|
150
|
+
<p class="lead">
|
|
151
|
+
A Rails engine for orchestrating AI agents — with ActiveRecord persistence,
|
|
152
|
+
background-job execution, generators, and a built-in web dashboard.
|
|
153
|
+
</p>
|
|
154
|
+
<div class="install-line"><span class="prompt">gem </span>'rcrewai-rails'</div>
|
|
155
|
+
<div class="cta">
|
|
156
|
+
<a class="btn btn-primary" href="https://github.com/gkosmo/rcrewai-rails">View on GitHub</a>
|
|
157
|
+
<a class="btn btn-secondary" href="https://rubygems.org/gems/rcrewai-rails">RubyGems</a>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</section>
|
|
161
|
+
|
|
162
|
+
<section id="features">
|
|
163
|
+
<div class="wrap">
|
|
164
|
+
<h2>Features</h2>
|
|
165
|
+
<p class="sub">Everything you need to run collaborative AI crews inside a Rails app.</p>
|
|
166
|
+
<div class="grid">
|
|
167
|
+
<div class="feature">
|
|
168
|
+
<span class="ic">🗄️</span>
|
|
169
|
+
<h3>ActiveRecord Integration</h3>
|
|
170
|
+
<p>Persist crews, agents, tasks, and executions directly in your database.</p>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="feature">
|
|
173
|
+
<span class="ic">⚙️</span>
|
|
174
|
+
<h3>Background Jobs</h3>
|
|
175
|
+
<p>Runs through ActiveJob — works with Sidekiq, Resque, Delayed Job, or any adapter.</p>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="feature">
|
|
178
|
+
<span class="ic">🏗️</span>
|
|
179
|
+
<h3>Rails Generators</h3>
|
|
180
|
+
<p>Scaffold new crews and agents from the command line in seconds.</p>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="feature">
|
|
183
|
+
<span class="ic">📊</span>
|
|
184
|
+
<h3>Web Dashboard</h3>
|
|
185
|
+
<p>Monitor executions, view logs, and manage crews through a built-in UI.</p>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="feature">
|
|
188
|
+
<span class="ic">🤖</span>
|
|
189
|
+
<h3>Multi-LLM Support</h3>
|
|
190
|
+
<p>OpenAI GPT, Anthropic Claude, Google Gemini, Azure OpenAI, and Ollama.</p>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="feature">
|
|
193
|
+
<span class="ic">🧰</span>
|
|
194
|
+
<h3>Rails-Specific Tools</h3>
|
|
195
|
+
<p>Pre-built tools for ActiveRecord, ActionMailer, the Rails cache, and more.</p>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</section>
|
|
200
|
+
|
|
201
|
+
<section id="install">
|
|
202
|
+
<div class="wrap">
|
|
203
|
+
<h2>Installation</h2>
|
|
204
|
+
<p class="sub">Add the gem, run the installer, and migrate.</p>
|
|
205
|
+
|
|
206
|
+
<h3>1. Add to your Gemfile</h3>
|
|
207
|
+
<pre>gem 'rcrewai-rails'</pre>
|
|
208
|
+
<pre>$ bundle install</pre>
|
|
209
|
+
|
|
210
|
+
<h3>2. Run the install generator</h3>
|
|
211
|
+
<pre>$ rails generate rcrew_a_i:rails:install
|
|
212
|
+
$ rails db:migrate</pre>
|
|
213
|
+
<p class="caption">This creates the database migrations, adds a configuration initializer, and mounts the engine routes.</p>
|
|
214
|
+
|
|
215
|
+
<h3>Manual route setup</h3>
|
|
216
|
+
<p>If you prefer to mount the engine yourself, add this to <code>config/routes.rb</code>:</p>
|
|
217
|
+
<pre>Rails.application.routes.draw do
|
|
218
|
+
mount RcrewAI::Rails::Engine => '/rcrewai'
|
|
219
|
+
# Your other routes...
|
|
220
|
+
end</pre>
|
|
221
|
+
<p class="caption">The web UI is then available at <code>/rcrewai</code> and the API at <code>/rcrewai/api/v1/</code>.</p>
|
|
222
|
+
</div>
|
|
223
|
+
</section>
|
|
224
|
+
|
|
225
|
+
<section id="config">
|
|
226
|
+
<div class="wrap">
|
|
227
|
+
<h2>Configuration</h2>
|
|
228
|
+
<p class="sub">Configure the engine and the underlying RcrewAI gem in an initializer.</p>
|
|
229
|
+
<pre>RcrewAI::Rails.configure do |config|
|
|
230
|
+
# ActiveJob queue for background processing
|
|
231
|
+
config.job_queue_name = "default"
|
|
232
|
+
|
|
233
|
+
# Enable/disable web UI
|
|
234
|
+
config.enable_web_ui = true
|
|
235
|
+
|
|
236
|
+
# Use async execution by default
|
|
237
|
+
config.async_execution = true
|
|
238
|
+
|
|
239
|
+
# Default LLM settings
|
|
240
|
+
config.default_llm_provider = "openai"
|
|
241
|
+
config.default_llm_model = "gpt-4"
|
|
242
|
+
|
|
243
|
+
# Logging
|
|
244
|
+
config.enable_logging = true
|
|
245
|
+
config.log_level = :info
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Configure the base RcrewAI gem
|
|
249
|
+
RcrewAI.configure do |config|
|
|
250
|
+
config.openai_api_key = ENV["OPENAI_API_KEY"]
|
|
251
|
+
# Add other LLM provider keys as needed
|
|
252
|
+
end</pre>
|
|
253
|
+
</div>
|
|
254
|
+
</section>
|
|
255
|
+
|
|
256
|
+
<section id="usage">
|
|
257
|
+
<div class="wrap">
|
|
258
|
+
<h2>Usage</h2>
|
|
259
|
+
<p class="sub">Generate a crew, or define one programmatically.</p>
|
|
260
|
+
|
|
261
|
+
<h3>Generate a crew</h3>
|
|
262
|
+
<pre>$ rails generate rcrewai:rails:crew research_team sequential \
|
|
263
|
+
--agents researcher analyst writer \
|
|
264
|
+
--description "Research team for market analysis"</pre>
|
|
265
|
+
<p class="caption">Creates a crew class in <code>app/crews/research_team_crew.rb</code>.</p>
|
|
266
|
+
|
|
267
|
+
<h3>Define a crew programmatically</h3>
|
|
268
|
+
<pre>class ResearchCrew
|
|
269
|
+
include RcrewAI::Rails::CrewBuilder
|
|
270
|
+
|
|
271
|
+
crew_name "research_team"
|
|
272
|
+
crew_description "AI-powered research team"
|
|
273
|
+
process_type :sequential
|
|
274
|
+
memory_enabled true
|
|
275
|
+
|
|
276
|
+
def setup_agents
|
|
277
|
+
@researcher = create_agent("researcher",
|
|
278
|
+
role: "Senior Research Analyst",
|
|
279
|
+
goal: "Uncover insights and trends",
|
|
280
|
+
backstory: "Expert researcher with years of experience"
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
@writer = create_agent("writer",
|
|
284
|
+
role: "Content Writer",
|
|
285
|
+
goal: "Create compelling reports",
|
|
286
|
+
backstory: "Skilled writer specializing in technical content"
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
def setup_tasks
|
|
291
|
+
@research_task = create_task("Research latest AI trends",
|
|
292
|
+
expected_output: "Comprehensive research report",
|
|
293
|
+
position: 1
|
|
294
|
+
)
|
|
295
|
+
assign_agent_to_task(@researcher, @research_task)
|
|
296
|
+
|
|
297
|
+
@writing_task = create_task("Write executive summary",
|
|
298
|
+
expected_output: "2-page executive summary",
|
|
299
|
+
position: 2
|
|
300
|
+
)
|
|
301
|
+
assign_agent_to_task(@writer, @writing_task)
|
|
302
|
+
add_task_dependency(@writing_task, @research_task)
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Execute the crew
|
|
307
|
+
crew = ResearchCrew.new
|
|
308
|
+
execution = crew.execute(topic: "AI in Healthcare")</pre>
|
|
309
|
+
|
|
310
|
+
<h3>Running executions</h3>
|
|
311
|
+
<p>Executions run through ActiveJob by default, using whatever adapter your app is configured with:</p>
|
|
312
|
+
<pre># Async execution (default)
|
|
313
|
+
crew.execute_async(inputs)
|
|
314
|
+
|
|
315
|
+
# Sync execution
|
|
316
|
+
crew.execute_sync(inputs)
|
|
317
|
+
|
|
318
|
+
# Custom job options
|
|
319
|
+
CrewExecutionJob.set(wait: 5.minutes).perform_later(crew, inputs)</pre>
|
|
320
|
+
</div>
|
|
321
|
+
</section>
|
|
322
|
+
|
|
323
|
+
<section id="tools">
|
|
324
|
+
<div class="wrap">
|
|
325
|
+
<h2>Rails Tools</h2>
|
|
326
|
+
<p class="sub">Give your agents safe, scoped access to your Rails app.</p>
|
|
327
|
+
<p>Bundled tools include <code>ActiveRecordTool</code>, <code>ActionMailerTool</code>,
|
|
328
|
+
<code>RailsCacheTool</code>, <code>ActiveStorageTool</code>, and <code>RailsLoggerTool</code> —
|
|
329
|
+
each with allow-lists so agents only touch what you permit.</p>
|
|
330
|
+
<pre>class DataAnalystAgent
|
|
331
|
+
include RcrewAI::Rails::AgentBuilder
|
|
332
|
+
|
|
333
|
+
agent_role "Data Analyst"
|
|
334
|
+
agent_goal "Analyze application data"
|
|
335
|
+
|
|
336
|
+
tools [
|
|
337
|
+
RcrewAI::Rails::Tools::ActiveRecordTool.new(
|
|
338
|
+
model_class: User,
|
|
339
|
+
allowed_methods: [:count, :where, :pluck]
|
|
340
|
+
),
|
|
341
|
+
RcrewAI::Rails::Tools::RailsCacheTool.new,
|
|
342
|
+
RcrewAI::Rails::Tools::ActionMailerTool.new(
|
|
343
|
+
mailer_class: ReportMailer,
|
|
344
|
+
allowed_methods: [:send_report]
|
|
345
|
+
)
|
|
346
|
+
]
|
|
347
|
+
end</pre>
|
|
348
|
+
</div>
|
|
349
|
+
</section>
|
|
350
|
+
|
|
351
|
+
<section id="dashboard">
|
|
352
|
+
<div class="wrap">
|
|
353
|
+
<div class="two-col">
|
|
354
|
+
<div>
|
|
355
|
+
<h2>Web Dashboard</h2>
|
|
356
|
+
<p class="sub">Mounted at <code>/rcrewai</code>.</p>
|
|
357
|
+
<ul class="clean">
|
|
358
|
+
<li>View all crews and their configurations</li>
|
|
359
|
+
<li>Monitor execution status and logs</li>
|
|
360
|
+
<li>Start new executions</li>
|
|
361
|
+
<li>Browse execution history and results</li>
|
|
362
|
+
</ul>
|
|
363
|
+
</div>
|
|
364
|
+
<div>
|
|
365
|
+
<h2>Models</h2>
|
|
366
|
+
<p class="sub">Persisted as ActiveRecord.</p>
|
|
367
|
+
<ul class="clean">
|
|
368
|
+
<li><code>RcrewAI::Rails::Crew</code></li>
|
|
369
|
+
<li><code>RcrewAI::Rails::Agent</code></li>
|
|
370
|
+
<li><code>RcrewAI::Rails::Task</code></li>
|
|
371
|
+
<li><code>RcrewAI::Rails::Execution</code></li>
|
|
372
|
+
<li><code>RcrewAI::Rails::ExecutionLog</code></li>
|
|
373
|
+
</ul>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
</section>
|
|
378
|
+
|
|
379
|
+
<section id="api">
|
|
380
|
+
<div class="wrap">
|
|
381
|
+
<h2>API Endpoints</h2>
|
|
382
|
+
<p class="sub">JSON API served under <code>/rcrewai/api/v1/</code>.</p>
|
|
383
|
+
<table>
|
|
384
|
+
<thead><tr><th style="width:90px;">Method</th><th>Path</th></tr></thead>
|
|
385
|
+
<tbody>
|
|
386
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/crews</td></tr>
|
|
387
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/crews/:id</td></tr>
|
|
388
|
+
<tr><td><span class="verb post">POST</span></td><td class="method">/crews/:id/execute</td></tr>
|
|
389
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/executions</td></tr>
|
|
390
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/executions/:id</td></tr>
|
|
391
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/executions/:id/status</td></tr>
|
|
392
|
+
<tr><td><span class="verb get">GET</span></td><td class="method">/executions/:id/logs</td></tr>
|
|
393
|
+
</tbody>
|
|
394
|
+
</table>
|
|
395
|
+
</div>
|
|
396
|
+
</section>
|
|
397
|
+
|
|
398
|
+
<footer>
|
|
399
|
+
<div class="wrap">
|
|
400
|
+
<p>
|
|
401
|
+
<a href="https://github.com/gkosmo/rcrewai-rails">GitHub</a> ·
|
|
402
|
+
<a href="https://rubygems.org/gems/rcrewai-rails">RubyGems</a> ·
|
|
403
|
+
<a href="https://github.com/gkosmo/rcrewai-rails/issues">Issues</a>
|
|
404
|
+
</p>
|
|
405
|
+
<p>Released under the MIT License.</p>
|
|
406
|
+
</div>
|
|
407
|
+
</footer>
|
|
408
|
+
|
|
409
|
+
</body>
|
|
410
|
+
</html>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# GitHub Pages Landing Site for `rcrewai-rails`
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-06-16
|
|
4
|
+
**Status:** Approved
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
Publish a polished landing + documentation page for the `rcrewai-rails` gem,
|
|
9
|
+
served via GitHub Pages from the `/docs` folder on `master`. The page gives a
|
|
10
|
+
strong first impression and doubles as practical usage documentation.
|
|
11
|
+
|
|
12
|
+
## Constraints
|
|
13
|
+
|
|
14
|
+
- **Single self-contained file:** `docs/index.html`. No build step, no
|
|
15
|
+
framework, no JavaScript dependencies, no external network requests.
|
|
16
|
+
- **Styling:** Inline `<style>` in the document. Clean light / Rails-y look —
|
|
17
|
+
off-white background, crimson Rails-style accent, system sans-serif for prose,
|
|
18
|
+
monospace for code. Code blocks styled with CSS only (dark block, monospace,
|
|
19
|
+
soft border) — no syntax-token coloring.
|
|
20
|
+
- **Content accuracy:** All copy drawn from the existing `README.md` and
|
|
21
|
+
`rcrewai-rails.gemspec` so the page stays correct.
|
|
22
|
+
|
|
23
|
+
## Hosting
|
|
24
|
+
|
|
25
|
+
GitHub Pages configured to serve from the `master` branch `/docs` folder. The
|
|
26
|
+
resulting URL is `https://gkosmo.github.io/rcrewai-rails/`. (Enabling Pages in
|
|
27
|
+
the repo settings is a manual GitHub step the user performs; this spec only
|
|
28
|
+
produces the file.)
|
|
29
|
+
|
|
30
|
+
## Page Structure
|
|
31
|
+
|
|
32
|
+
Single scrolling page with a sticky top navigation:
|
|
33
|
+
|
|
34
|
+
1. **Sticky header** — gem name, tagline, anchor links (Features · Install ·
|
|
35
|
+
Usage · Tools · API), GitHub link.
|
|
36
|
+
2. **Hero** — name, one-line pitch, `gem 'rcrewai-rails'` snippet, CTA buttons
|
|
37
|
+
(GitHub repo, RubyGems).
|
|
38
|
+
3. **Features grid** — 6 cards: ActiveRecord persistence, ActiveJob integration,
|
|
39
|
+
Rails generators, Web dashboard, Multi-LLM support, Rails-specific tools.
|
|
40
|
+
4. **Installation** — Gemfile, `bundle install`, install generator, `db:migrate`,
|
|
41
|
+
manual route mounting.
|
|
42
|
+
5. **Configuration** — the initializer example from the README.
|
|
43
|
+
6. **Usage** — generator command, programmatic crew example, async/sync execution.
|
|
44
|
+
7. **Rails Tools** — tool ecosystem (ActiveRecord, ActionMailer, Cache,
|
|
45
|
+
ActiveStorage, Logger) with the `DataAnalystAgent` example.
|
|
46
|
+
8. **Web UI & Models** — what `/rcrewai` provides + the ActiveRecord model list.
|
|
47
|
+
9. **API endpoints** — the JSON API table.
|
|
48
|
+
10. **Footer** — MIT license, links.
|
|
49
|
+
|
|
50
|
+
## Additional Change
|
|
51
|
+
|
|
52
|
+
Update `rcrewai-rails.gemspec`:
|
|
53
|
+
`spec.metadata["documentation_uri"]` from
|
|
54
|
+
`https://gkosmo.github.io/rcrewAI/` to
|
|
55
|
+
`https://gkosmo.github.io/rcrewai-rails/`.
|
|
56
|
+
|
|
57
|
+
## Out of Scope
|
|
58
|
+
|
|
59
|
+
- Multi-page docs / Jekyll.
|
|
60
|
+
- JavaScript-driven syntax highlighting.
|
|
61
|
+
- Automated Pages deployment workflow (GitHub builds static `/docs` directly).
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
require "rails/generators"
|
|
2
|
-
require "rails/generators/migration"
|
|
3
2
|
|
|
4
3
|
module RcrewAI
|
|
5
4
|
module Rails
|
|
6
5
|
module Generators
|
|
7
6
|
class InstallGenerator < ::Rails::Generators::Base
|
|
8
|
-
include ::Rails::Generators::Migration
|
|
9
|
-
|
|
10
7
|
source_root File.expand_path("templates", __dir__)
|
|
11
8
|
|
|
12
|
-
def self.next_migration_number(dirname)
|
|
13
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def create_migration_file
|
|
17
|
-
migration_template "create_rcrewai_tables.rb", "db/migrate/create_rcrewai_tables.rb", migration_class_name: "CreateRcrewaiTables"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
9
|
def create_initializer
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
create_file "config/initializers/rcrewai.rb", <<~RUBY
|
|
11
|
+
RcrewAI.configure do |config|
|
|
12
|
+
# Configure your LLM settings
|
|
13
|
+
# config.default_llm = :openai
|
|
14
|
+
# config.openai_api_key = ENV['OPENAI_API_KEY']
|
|
15
|
+
|
|
16
|
+
# Rails specific configuration
|
|
17
|
+
config.job_queue_name = ENV.fetch("RCREWAI_QUEUE", "default")
|
|
18
|
+
config.enable_web_ui = ENV.fetch("RCREWAI_WEB_UI", "true") == "true"
|
|
19
|
+
config.async_execution = ENV.fetch("RCREWAI_ASYNC", "true") == "true"
|
|
20
|
+
end
|
|
21
|
+
RUBY
|
|
26
22
|
end
|
|
27
23
|
|
|
28
24
|
def display_post_install_message
|
|
29
25
|
say "\n✅ RcrewAI Rails has been installed!", :green
|
|
30
26
|
say "\nNext steps:", :yellow
|
|
31
|
-
say " 1.
|
|
32
|
-
say " 2.
|
|
33
|
-
say " 3.
|
|
34
|
-
say " 4. Visit /rcrewai for the web UI (if enabled)"
|
|
27
|
+
say " 1. Configure your settings in config/initializers/rcrewai.rb"
|
|
28
|
+
say " 2. Set your LLM API keys in environment variables"
|
|
29
|
+
say " 3. Start building AI crews with RcrewAI!"
|
|
35
30
|
say "\n"
|
|
36
31
|
end
|
|
37
32
|
end
|
data/lib/rcrewai/rails/engine.rb
CHANGED
|
@@ -9,16 +9,30 @@ module RcrewAI
|
|
|
9
9
|
inflect.acronym 'RcrewAI'
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
# Note: `lib/` is intentionally NOT on autoload/eager_load paths.
|
|
13
|
+
# Everything under lib/rcrewai/rails/ is loaded explicitly via
|
|
14
|
+
# `require_relative` in lib/rcrewai/rails.rb, and lib/generators/
|
|
15
|
+
# contains Rails generators which Rails loads on demand. Putting
|
|
16
|
+
# lib/ on Zeitwerk's eager_load_paths makes boot fail under
|
|
17
|
+
# `config.eager_load = true` because:
|
|
18
|
+
# - lib/rcrewai/rails/version.rb defines VERSION (uppercase),
|
|
19
|
+
# but Zeitwerk expects `Version` from the filename.
|
|
20
|
+
# - lib/generators/ files define constants like
|
|
21
|
+
# RcrewAI::Rails::Generators::CrewGenerator rather than the
|
|
22
|
+
# path-derived Generators::RcrewAI::Rails::Crew::CrewGenerator.
|
|
12
23
|
config.autoload_paths += %W[
|
|
13
24
|
#{config.root}/app
|
|
14
|
-
#{config.root}/lib
|
|
15
25
|
]
|
|
16
|
-
|
|
26
|
+
|
|
17
27
|
config.eager_load_paths += %W[
|
|
18
28
|
#{config.root}/app
|
|
19
|
-
#{config.root}/lib
|
|
20
29
|
]
|
|
21
30
|
|
|
31
|
+
# Tell Zeitwerk to ignore generator files - they aren't meant to be autoloaded
|
|
32
|
+
initializer "rcrewai_rails.zeitwerk" do |app|
|
|
33
|
+
::Rails.autoloaders.main.ignore("#{root}/lib/generators")
|
|
34
|
+
end
|
|
35
|
+
|
|
22
36
|
config.generators do |g|
|
|
23
37
|
g.test_framework :rspec
|
|
24
38
|
g.fixture_replacement :factory_bot
|
data/rcrewai-rails.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
30
30
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
31
31
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
32
|
-
spec.metadata["documentation_uri"] = "https://gkosmo.github.io/
|
|
32
|
+
spec.metadata["documentation_uri"] = "https://gkosmo.github.io/rcrewai-rails/"
|
|
33
33
|
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
34
34
|
spec.metadata["wiki_uri"] = "#{spec.homepage}/wiki"
|
|
35
35
|
spec.metadata["rubygems_mfa_required"] = "true"
|
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.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gkosmo
|
|
@@ -238,12 +238,8 @@ files:
|
|
|
238
238
|
- app/views/rcrewai/rails/tools/show.html.erb
|
|
239
239
|
- config/routes.rb
|
|
240
240
|
- db/migrate/001_add_agent_to_tasks.rb
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
- lib/generators/rcrew_a_i/rails/crew/templates/crew.rb.erb
|
|
244
|
-
- lib/generators/rcrew_a_i/rails/install/install_generator.rb
|
|
245
|
-
- lib/generators/rcrew_a_i/rails/install/templates/create_rcrewai_tables.rb
|
|
246
|
-
- lib/generators/rcrew_a_i/rails/install/templates/rcrewai.rb
|
|
241
|
+
- docs/index.html
|
|
242
|
+
- docs/superpowers/specs/2026-06-16-github-pages-landing-design.md
|
|
247
243
|
- lib/generators/rcrewai/rails/crew/crew_generator.rb
|
|
248
244
|
- lib/generators/rcrewai/rails/crew/templates/agent.rb.erb
|
|
249
245
|
- lib/generators/rcrewai/rails/crew/templates/crew.rb.erb
|
|
@@ -270,7 +266,7 @@ metadata:
|
|
|
270
266
|
homepage_uri: https://github.com/gkosmo/rcrewai-rails
|
|
271
267
|
source_code_uri: https://github.com/gkosmo/rcrewai-rails
|
|
272
268
|
changelog_uri: https://github.com/gkosmo/rcrewai-rails/blob/main/CHANGELOG.md
|
|
273
|
-
documentation_uri: https://gkosmo.github.io/
|
|
269
|
+
documentation_uri: https://gkosmo.github.io/rcrewai-rails/
|
|
274
270
|
bug_tracker_uri: https://github.com/gkosmo/rcrewai-rails/issues
|
|
275
271
|
wiki_uri: https://github.com/gkosmo/rcrewai-rails/wiki
|
|
276
272
|
rubygems_mfa_required: 'true'
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
require "rails/generators"
|
|
2
|
-
|
|
3
|
-
module RcrewAI
|
|
4
|
-
module Rails
|
|
5
|
-
module Generators
|
|
6
|
-
class CrewGenerator < ::Rails::Generators::NamedBase
|
|
7
|
-
source_root File.expand_path("templates", __dir__)
|
|
8
|
-
|
|
9
|
-
argument :process_type, type: :string, default: "sequential", banner: "sequential|hierarchical"
|
|
10
|
-
|
|
11
|
-
class_option :agents, type: :array, default: [], desc: "List of agents to create"
|
|
12
|
-
class_option :description, type: :string, desc: "Crew description"
|
|
13
|
-
|
|
14
|
-
def create_crew_file
|
|
15
|
-
template "crew.rb.erb", "app/crews/#{file_name}_crew.rb"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def create_agent_files
|
|
19
|
-
options[:agents].each do |agent_name|
|
|
20
|
-
@agent_name = agent_name
|
|
21
|
-
template "agent.rb.erb", "app/crews/agents/#{agent_name.underscore}_agent.rb"
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def display_next_steps
|
|
26
|
-
say "\n✅ Created #{class_name}Crew!", :green
|
|
27
|
-
say "\nNext steps:", :yellow
|
|
28
|
-
say " 1. Configure your crew in app/crews/#{file_name}_crew.rb"
|
|
29
|
-
say " 2. Define tasks for your crew"
|
|
30
|
-
say " 3. Run your crew with: #{class_name}Crew.new.execute"
|
|
31
|
-
say "\n"
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
private
|
|
35
|
-
|
|
36
|
-
def crew_description
|
|
37
|
-
options[:description] || "#{class_name} crew for AI task orchestration"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
class <%= @agent_name.camelize %>Agent
|
|
2
|
-
include RcrewAI::Rails::AgentBuilder
|
|
3
|
-
|
|
4
|
-
def initialize
|
|
5
|
-
@agent = RcrewAI::Agent.new(
|
|
6
|
-
role: role,
|
|
7
|
-
goal: goal,
|
|
8
|
-
backstory: backstory,
|
|
9
|
-
memory: true,
|
|
10
|
-
verbose: true,
|
|
11
|
-
allow_delegation: false,
|
|
12
|
-
tools: tools,
|
|
13
|
-
max_iter: 25,
|
|
14
|
-
max_rpm: 10
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def role
|
|
19
|
-
"<%= @agent_name.humanize %> Specialist"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def goal
|
|
23
|
-
"Perform <%= @agent_name.humanize.downcase %> tasks efficiently and accurately"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def backstory
|
|
27
|
-
<<~BACKSTORY
|
|
28
|
-
You are a highly skilled <%= @agent_name.humanize.downcase %> specialist with extensive experience.
|
|
29
|
-
Your expertise allows you to handle complex <%= @agent_name.humanize.downcase %> challenges effectively.
|
|
30
|
-
BACKSTORY
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def tools
|
|
34
|
-
[
|
|
35
|
-
# Add your tools here
|
|
36
|
-
# RcrewAI::Tools::WebSearch.new,
|
|
37
|
-
# RcrewAI::Tools::FileReader.new,
|
|
38
|
-
# CustomTool.new
|
|
39
|
-
]
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def to_agent
|
|
43
|
-
@agent
|
|
44
|
-
end
|
|
45
|
-
end
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
class <%= class_name %>Crew
|
|
2
|
-
include RcrewAI::Rails::CrewBuilder
|
|
3
|
-
|
|
4
|
-
def initialize
|
|
5
|
-
@crew = RcrewAI::Rails::Crew.create!(
|
|
6
|
-
name: "<%= file_name %>",
|
|
7
|
-
description: "<%= crew_description %>",
|
|
8
|
-
process_type: "<%= process_type %>",
|
|
9
|
-
verbose: true,
|
|
10
|
-
memory_enabled: false,
|
|
11
|
-
cache_enabled: true
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
setup_agents
|
|
15
|
-
setup_tasks
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def execute(inputs = {})
|
|
19
|
-
# Execute asynchronously via ActiveJob
|
|
20
|
-
@crew.execute_async(inputs)
|
|
21
|
-
|
|
22
|
-
# Or execute synchronously:
|
|
23
|
-
# @crew.execute_sync(inputs)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
def setup_agents
|
|
29
|
-
# Define your agents here
|
|
30
|
-
# Example:
|
|
31
|
-
# @researcher = @crew.agents.create!(
|
|
32
|
-
# name: "researcher",
|
|
33
|
-
# role: "Senior Research Analyst",
|
|
34
|
-
# goal: "Uncover cutting-edge developments in AI and data science",
|
|
35
|
-
# backstory: "You are an expert researcher with years of experience",
|
|
36
|
-
# verbose: true,
|
|
37
|
-
# allow_delegation: false
|
|
38
|
-
# )
|
|
39
|
-
<% options[:agents].each do |agent_name| %>
|
|
40
|
-
|
|
41
|
-
@<%= agent_name.underscore %> = @crew.agents.create!(
|
|
42
|
-
name: "<%= agent_name.underscore %>",
|
|
43
|
-
role: "<%= agent_name.humanize %> Agent",
|
|
44
|
-
goal: "Perform <%= agent_name.humanize.downcase %> tasks",
|
|
45
|
-
backstory: "You are an expert <%= agent_name.humanize.downcase %> agent",
|
|
46
|
-
verbose: true,
|
|
47
|
-
allow_delegation: false
|
|
48
|
-
)
|
|
49
|
-
<% end %>
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def setup_tasks
|
|
53
|
-
# Define your tasks here
|
|
54
|
-
# Example:
|
|
55
|
-
# @research_task = @crew.tasks.create!(
|
|
56
|
-
# description: "Research the latest AI trends",
|
|
57
|
-
# expected_output: "A comprehensive report on AI trends",
|
|
58
|
-
# position: 1
|
|
59
|
-
# )
|
|
60
|
-
# @research_task.agents << @researcher
|
|
61
|
-
|
|
62
|
-
# Task dependencies can be set like:
|
|
63
|
-
# @analysis_task.add_dependency(@research_task)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Add any helper methods here
|
|
67
|
-
|
|
68
|
-
# Example callback for task completion:
|
|
69
|
-
# def task_completed(output)
|
|
70
|
-
# Rails.logger.info "Task completed with output: #{output}"
|
|
71
|
-
# end
|
|
72
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
require "rails/generators"
|
|
2
|
-
require "rails/generators/migration"
|
|
3
|
-
|
|
4
|
-
module RcrewAI
|
|
5
|
-
module Rails
|
|
6
|
-
module Generators
|
|
7
|
-
class InstallGenerator < ::Rails::Generators::Base
|
|
8
|
-
include ::Rails::Generators::Migration
|
|
9
|
-
|
|
10
|
-
source_root File.expand_path("templates", __dir__)
|
|
11
|
-
|
|
12
|
-
def self.next_migration_number(dirname)
|
|
13
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def create_migration_file
|
|
17
|
-
migration_template "create_rcrewai_tables.rb", "db/migrate/create_rcrewai_tables.rb", migration_class_name: "CreateRcrewaiTables"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def create_initializer
|
|
21
|
-
template "rcrewai.rb", "config/initializers/rcrewai.rb"
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def add_routes
|
|
25
|
-
route "mount RcrewAI::Rails::Engine => '/rcrewai'"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def display_post_install_message
|
|
29
|
-
say "\n✅ RcrewAI Rails has been installed!", :green
|
|
30
|
-
say "\nNext steps:", :yellow
|
|
31
|
-
say " 1. Run migrations: rails db:migrate"
|
|
32
|
-
say " 2. Configure your settings in config/initializers/rcrewai.rb"
|
|
33
|
-
say " 3. Set your LLM API keys in environment variables"
|
|
34
|
-
say " 4. Visit /rcrewai for the web UI (if enabled)"
|
|
35
|
-
say "\n"
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
class CreateRcrewaiTables < ActiveRecord::Migration[7.0]
|
|
2
|
-
def change
|
|
3
|
-
create_table :rcrewai_crews do |t|
|
|
4
|
-
t.string :name, null: false
|
|
5
|
-
t.text :description
|
|
6
|
-
t.string :process_type, default: "sequential"
|
|
7
|
-
t.boolean :verbose, default: false
|
|
8
|
-
t.boolean :memory_enabled, default: false
|
|
9
|
-
t.boolean :cache_enabled, default: false
|
|
10
|
-
t.integer :max_rpm
|
|
11
|
-
t.string :manager_llm
|
|
12
|
-
t.text :config
|
|
13
|
-
t.text :memory
|
|
14
|
-
t.boolean :active, default: true
|
|
15
|
-
|
|
16
|
-
t.timestamps
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
add_index :rcrewai_crews, :name
|
|
20
|
-
add_index :rcrewai_crews, :active
|
|
21
|
-
|
|
22
|
-
create_table :rcrewai_agents do |t|
|
|
23
|
-
t.references :crew, null: false, foreign_key: { to_table: :rcrewai_crews }
|
|
24
|
-
t.string :name, null: false
|
|
25
|
-
t.string :role, null: false
|
|
26
|
-
t.text :goal
|
|
27
|
-
t.text :backstory
|
|
28
|
-
t.boolean :memory_enabled, default: false
|
|
29
|
-
t.boolean :verbose, default: false
|
|
30
|
-
t.boolean :allow_delegation, default: false
|
|
31
|
-
t.text :tools
|
|
32
|
-
t.integer :max_iterations, default: 25
|
|
33
|
-
t.integer :max_rpm
|
|
34
|
-
t.text :llm_config
|
|
35
|
-
t.boolean :active, default: true
|
|
36
|
-
|
|
37
|
-
t.timestamps
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
add_index :rcrewai_agents, :name
|
|
41
|
-
|
|
42
|
-
create_table :rcrewai_tasks do |t|
|
|
43
|
-
t.references :crew, null: false, foreign_key: { to_table: :rcrewai_crews }
|
|
44
|
-
t.text :description, null: false
|
|
45
|
-
t.text :expected_output, null: false
|
|
46
|
-
t.boolean :async_execution, default: false
|
|
47
|
-
t.text :context
|
|
48
|
-
t.text :output_json
|
|
49
|
-
t.text :output_pydantic
|
|
50
|
-
t.string :output_file
|
|
51
|
-
t.text :tools
|
|
52
|
-
t.string :callback_class
|
|
53
|
-
t.string :callback_method_name
|
|
54
|
-
t.integer :position
|
|
55
|
-
|
|
56
|
-
t.timestamps
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
add_index :rcrewai_tasks, :position
|
|
60
|
-
|
|
61
|
-
create_table :rcrewai_task_assignments do |t|
|
|
62
|
-
t.references :task, null: false, foreign_key: { to_table: :rcrewai_tasks }
|
|
63
|
-
t.references :agent, null: false, foreign_key: { to_table: :rcrewai_agents }
|
|
64
|
-
|
|
65
|
-
t.timestamps
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
add_index :rcrewai_task_assignments, [:task_id, :agent_id], unique: true
|
|
69
|
-
|
|
70
|
-
create_table :rcrewai_task_dependencies do |t|
|
|
71
|
-
t.references :task, null: false, foreign_key: { to_table: :rcrewai_tasks }
|
|
72
|
-
t.references :dependency, null: false, foreign_key: { to_table: :rcrewai_tasks }
|
|
73
|
-
|
|
74
|
-
t.timestamps
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
add_index :rcrewai_task_dependencies, [:task_id, :dependency_id], unique: true
|
|
78
|
-
|
|
79
|
-
create_table :rcrewai_executions do |t|
|
|
80
|
-
t.references :crew, null: false, foreign_key: { to_table: :rcrewai_crews }
|
|
81
|
-
t.string :status, null: false
|
|
82
|
-
t.text :inputs
|
|
83
|
-
t.text :output
|
|
84
|
-
t.string :error_message
|
|
85
|
-
t.text :error_details
|
|
86
|
-
t.datetime :started_at
|
|
87
|
-
t.datetime :completed_at
|
|
88
|
-
t.integer :duration_seconds
|
|
89
|
-
|
|
90
|
-
t.timestamps
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
add_index :rcrewai_executions, :status
|
|
94
|
-
add_index :rcrewai_executions, :created_at
|
|
95
|
-
|
|
96
|
-
create_table :rcrewai_execution_logs do |t|
|
|
97
|
-
t.references :execution, null: false, foreign_key: { to_table: :rcrewai_executions }
|
|
98
|
-
t.string :level, null: false
|
|
99
|
-
t.text :message, null: false
|
|
100
|
-
t.text :details
|
|
101
|
-
t.datetime :timestamp, null: false
|
|
102
|
-
|
|
103
|
-
t.timestamps
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
add_index :rcrewai_execution_logs, :level
|
|
107
|
-
add_index :rcrewai_execution_logs, :timestamp
|
|
108
|
-
end
|
|
109
|
-
end
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
RcrewAI::Rails.configure do |config|
|
|
2
|
-
# ActiveJob queue name for background processing
|
|
3
|
-
# Default: "default"
|
|
4
|
-
config.job_queue_name = ENV.fetch("RCREWAI_QUEUE", "default")
|
|
5
|
-
|
|
6
|
-
# Enable web UI for monitoring crews
|
|
7
|
-
# Default: true
|
|
8
|
-
config.enable_web_ui = ENV.fetch("RCREWAI_WEB_UI", "true") == "true"
|
|
9
|
-
|
|
10
|
-
# Use ActiveJob for async execution
|
|
11
|
-
# Default: true
|
|
12
|
-
config.async_execution = ENV.fetch("RCREWAI_ASYNC", "true") == "true"
|
|
13
|
-
|
|
14
|
-
# Persistence backend (currently only :active_record supported)
|
|
15
|
-
# Default: :active_record
|
|
16
|
-
config.persistence_backend = :active_record
|
|
17
|
-
|
|
18
|
-
# Default LLM provider
|
|
19
|
-
# Options: "openai", "anthropic", "cohere", "groq", etc.
|
|
20
|
-
config.default_llm_provider = ENV.fetch("RCREWAI_LLM_PROVIDER", "openai")
|
|
21
|
-
|
|
22
|
-
# Default LLM model
|
|
23
|
-
config.default_llm_model = ENV.fetch("RCREWAI_LLM_MODEL", "gpt-4")
|
|
24
|
-
|
|
25
|
-
# Maximum retries for failed tasks
|
|
26
|
-
# Default: 3
|
|
27
|
-
config.max_retries = 3
|
|
28
|
-
|
|
29
|
-
# Timeout for crew execution (in seconds)
|
|
30
|
-
# Default: 300 (5 minutes)
|
|
31
|
-
config.timeout = 300
|
|
32
|
-
|
|
33
|
-
# Enable logging
|
|
34
|
-
# Default: true
|
|
35
|
-
config.enable_logging = true
|
|
36
|
-
|
|
37
|
-
# Log level
|
|
38
|
-
# Options: :debug, :info, :warn, :error
|
|
39
|
-
# Default: :info
|
|
40
|
-
config.log_level = :info
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Configure RcrewAI base gem if needed
|
|
44
|
-
RcrewAI.configure do |config|
|
|
45
|
-
# Set your API keys here or in environment variables
|
|
46
|
-
# config.openai_api_key = ENV["OPENAI_API_KEY"]
|
|
47
|
-
# config.anthropic_api_key = ENV["ANTHROPIC_API_KEY"]
|
|
48
|
-
# config.groq_api_key = ENV["GROQ_API_KEY"]
|
|
49
|
-
|
|
50
|
-
# Configure other RcrewAI settings
|
|
51
|
-
# config.default_model = "gpt-4"
|
|
52
|
-
# config.temperature = 0.7
|
|
53
|
-
end
|