robot_lab 0.0.1 → 0.0.4
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/.github/workflows/deploy-github-pages.yml +9 -9
- data/.irbrc +6 -0
- data/CHANGELOG.md +90 -0
- data/README.md +203 -46
- data/Rakefile +70 -1
- data/docs/api/core/index.md +12 -0
- data/docs/api/core/robot.md +478 -130
- data/docs/api/core/tool.md +205 -209
- data/docs/api/history/active-record-adapter.md +174 -94
- data/docs/api/history/config.md +186 -93
- data/docs/api/history/index.md +57 -61
- data/docs/api/history/thread-manager.md +123 -73
- data/docs/api/mcp/client.md +119 -48
- data/docs/api/mcp/index.md +75 -60
- data/docs/api/mcp/server.md +120 -136
- data/docs/api/mcp/transports.md +172 -184
- data/docs/api/streaming/context.md +157 -74
- data/docs/api/streaming/events.md +114 -166
- data/docs/api/streaming/index.md +74 -72
- data/docs/architecture/core-concepts.md +361 -112
- data/docs/architecture/index.md +97 -59
- data/docs/architecture/message-flow.md +138 -129
- data/docs/architecture/network-orchestration.md +197 -50
- data/docs/architecture/robot-execution.md +199 -146
- data/docs/architecture/state-management.md +255 -187
- data/docs/concepts.md +312 -48
- data/docs/examples/basic-chat.md +89 -77
- data/docs/examples/index.md +222 -47
- data/docs/examples/mcp-server.md +207 -203
- data/docs/examples/multi-robot-network.md +129 -35
- data/docs/examples/rails-application.md +159 -160
- data/docs/examples/tool-usage.md +295 -204
- data/docs/getting-started/configuration.md +275 -162
- data/docs/getting-started/index.md +1 -1
- data/docs/getting-started/installation.md +22 -13
- data/docs/getting-started/quick-start.md +166 -121
- data/docs/guides/building-robots.md +417 -212
- data/docs/guides/creating-networks.md +94 -24
- data/docs/guides/mcp-integration.md +152 -113
- data/docs/guides/memory.md +220 -164
- data/docs/guides/streaming.md +80 -110
- data/docs/guides/using-tools.md +259 -212
- data/docs/index.md +50 -37
- data/examples/01_simple_robot.rb +6 -9
- data/examples/02_tools.rb +6 -9
- data/examples/03_network.rb +13 -14
- data/examples/04_mcp.rb +5 -8
- data/examples/05_streaming.rb +5 -8
- data/examples/06_prompt_templates.rb +42 -37
- data/examples/07_network_memory.rb +13 -14
- data/examples/08_llm_config.rb +140 -0
- data/examples/09_chaining.rb +223 -0
- data/examples/10_memory.rb +331 -0
- data/examples/11_network_introspection.rb +230 -0
- data/examples/12_message_bus.rb +74 -0
- data/examples/13_spawn.rb +90 -0
- data/examples/14_rusty_circuit/comic.rb +143 -0
- data/examples/14_rusty_circuit/display.rb +203 -0
- data/examples/14_rusty_circuit/heckler.rb +57 -0
- data/examples/14_rusty_circuit/open_mic.rb +121 -0
- data/examples/14_rusty_circuit/prompts/open_mic_comic.md +20 -0
- data/examples/14_rusty_circuit/prompts/open_mic_heckler.md +23 -0
- data/examples/14_rusty_circuit/prompts/open_mic_scout.md +20 -0
- data/examples/14_rusty_circuit/scout.rb +173 -0
- data/examples/14_rusty_circuit/scout_notes.md +89 -0
- data/examples/14_rusty_circuit/show.log +234 -0
- data/examples/15_memory_network_and_bus/editor_in_chief.rb +24 -0
- data/examples/15_memory_network_and_bus/editorial_pipeline.rb +206 -0
- data/examples/15_memory_network_and_bus/linux_writer.rb +80 -0
- data/examples/15_memory_network_and_bus/os_editor.rb +46 -0
- data/examples/15_memory_network_and_bus/os_writer.rb +46 -0
- data/examples/15_memory_network_and_bus/output/combined_article.md +13 -0
- data/examples/15_memory_network_and_bus/output/final_article.md +15 -0
- data/examples/15_memory_network_and_bus/output/linux_draft.md +5 -0
- data/examples/15_memory_network_and_bus/output/mac_draft.md +7 -0
- data/examples/15_memory_network_and_bus/output/memory.json +13 -0
- data/examples/15_memory_network_and_bus/output/revision_1.md +19 -0
- data/examples/15_memory_network_and_bus/output/revision_2.md +15 -0
- data/examples/15_memory_network_and_bus/output/windows_draft.md +7 -0
- data/examples/15_memory_network_and_bus/prompts/os_advocate.md +13 -0
- data/examples/15_memory_network_and_bus/prompts/os_chief.md +13 -0
- data/examples/15_memory_network_and_bus/prompts/os_editor.md +13 -0
- data/examples/README.md +197 -0
- data/examples/prompts/{assistant/system.txt.erb → assistant.md} +3 -0
- data/examples/prompts/{billing/system.txt.erb → billing.md} +3 -0
- data/examples/prompts/{classifier/system.txt.erb → classifier.md} +3 -0
- data/examples/prompts/comedian.md +6 -0
- data/examples/prompts/comedy_critic.md +10 -0
- data/examples/prompts/configurable.md +9 -0
- data/examples/prompts/dispatcher.md +12 -0
- data/examples/prompts/{entity_extractor/system.txt.erb → entity_extractor.md} +3 -0
- data/examples/prompts/{escalation/system.txt.erb → escalation.md} +7 -0
- data/examples/prompts/frontmatter_mcp_test.md +9 -0
- data/examples/prompts/frontmatter_named_test.md +5 -0
- data/examples/prompts/frontmatter_tools_test.md +6 -0
- data/examples/prompts/{general/system.txt.erb → general.md} +3 -0
- data/examples/prompts/{github_assistant/system.txt.erb → github_assistant.md} +8 -0
- data/examples/prompts/{helper/system.txt.erb → helper.md} +3 -0
- data/examples/prompts/{keyword_extractor/system.txt.erb → keyword_extractor.md} +3 -0
- data/examples/prompts/llm_config_demo.md +20 -0
- data/examples/prompts/{order_support/system.txt.erb → order_support.md} +8 -0
- data/examples/prompts/os_advocate.md +13 -0
- data/examples/prompts/os_chief.md +13 -0
- data/examples/prompts/os_editor.md +13 -0
- data/examples/prompts/{product_support/system.txt.erb → product_support.md} +7 -0
- data/examples/prompts/{sentiment_analyzer/system.txt.erb → sentiment_analyzer.md} +3 -0
- data/examples/prompts/{synthesizer/system.txt.erb → synthesizer.md} +3 -0
- data/examples/prompts/{technical/system.txt.erb → technical.md} +3 -0
- data/examples/prompts/{triage/system.txt.erb → triage.md} +6 -0
- data/lib/generators/robot_lab/templates/initializer.rb.tt +1 -1
- data/lib/robot_lab/adapters/openai.rb +2 -1
- data/lib/robot_lab/ask_user.rb +75 -0
- data/lib/robot_lab/config/defaults.yml +121 -0
- data/lib/robot_lab/config.rb +183 -0
- data/lib/robot_lab/error.rb +6 -0
- data/lib/robot_lab/mcp/client.rb +1 -1
- data/lib/robot_lab/memory.rb +2 -2
- data/lib/robot_lab/robot.rb +523 -249
- data/lib/robot_lab/robot_message.rb +44 -0
- data/lib/robot_lab/robot_result.rb +1 -0
- data/lib/robot_lab/robotic_model.rb +1 -1
- data/lib/robot_lab/streaming/context.rb +1 -1
- data/lib/robot_lab/tool.rb +108 -172
- data/lib/robot_lab/tool_config.rb +1 -1
- data/lib/robot_lab/tool_manifest.rb +2 -18
- data/lib/robot_lab/version.rb +1 -1
- data/lib/robot_lab.rb +66 -55
- metadata +107 -116
- data/examples/prompts/assistant/user.txt.erb +0 -1
- data/examples/prompts/billing/user.txt.erb +0 -1
- data/examples/prompts/classifier/user.txt.erb +0 -1
- data/examples/prompts/entity_extractor/user.txt.erb +0 -3
- data/examples/prompts/escalation/user.txt.erb +0 -34
- data/examples/prompts/general/user.txt.erb +0 -1
- data/examples/prompts/github_assistant/user.txt.erb +0 -1
- data/examples/prompts/helper/user.txt.erb +0 -1
- data/examples/prompts/keyword_extractor/user.txt.erb +0 -3
- data/examples/prompts/order_support/user.txt.erb +0 -22
- data/examples/prompts/product_support/user.txt.erb +0 -32
- data/examples/prompts/sentiment_analyzer/user.txt.erb +0 -3
- data/examples/prompts/synthesizer/user.txt.erb +0 -15
- data/examples/prompts/technical/user.txt.erb +0 -1
- data/examples/prompts/triage/user.txt.erb +0 -17
- data/lib/robot_lab/configuration.rb +0 -143
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: robot_lab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dewayne VanHoozer
|
|
@@ -9,6 +9,20 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: myway_config
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0.1'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0.1'
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: zeitwerk
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -23,20 +37,34 @@ dependencies:
|
|
|
23
37
|
- - "~>"
|
|
24
38
|
- !ruby/object:Gem::Version
|
|
25
39
|
version: '2.6'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: activesupport
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '7.0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '7.0'
|
|
26
54
|
- !ruby/object:Gem::Dependency
|
|
27
55
|
name: ruby_llm
|
|
28
56
|
requirement: !ruby/object:Gem::Requirement
|
|
29
57
|
requirements:
|
|
30
58
|
- - "~>"
|
|
31
59
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '1.
|
|
60
|
+
version: '1.12'
|
|
33
61
|
type: :runtime
|
|
34
62
|
prerelease: false
|
|
35
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
64
|
requirements:
|
|
37
65
|
- - "~>"
|
|
38
66
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '1.
|
|
67
|
+
version: '1.12'
|
|
40
68
|
- !ruby/object:Gem::Dependency
|
|
41
69
|
name: ruby_llm-mcp
|
|
42
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -52,19 +80,19 @@ dependencies:
|
|
|
52
80
|
- !ruby/object:Gem::Version
|
|
53
81
|
version: '0'
|
|
54
82
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name:
|
|
83
|
+
name: prompt_manager
|
|
56
84
|
requirement: !ruby/object:Gem::Requirement
|
|
57
85
|
requirements:
|
|
58
|
-
- - "
|
|
86
|
+
- - "~>"
|
|
59
87
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
88
|
+
version: '1.0'
|
|
61
89
|
type: :runtime
|
|
62
90
|
prerelease: false
|
|
63
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
92
|
requirements:
|
|
65
|
-
- - "
|
|
93
|
+
- - "~>"
|
|
66
94
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
95
|
+
version: '1.0'
|
|
68
96
|
- !ruby/object:Gem::Dependency
|
|
69
97
|
name: ruby_llm-schema
|
|
70
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -122,21 +150,7 @@ dependencies:
|
|
|
122
150
|
- !ruby/object:Gem::Version
|
|
123
151
|
version: '2.0'
|
|
124
152
|
- !ruby/object:Gem::Dependency
|
|
125
|
-
name:
|
|
126
|
-
requirement: !ruby/object:Gem::Requirement
|
|
127
|
-
requirements:
|
|
128
|
-
- - "~>"
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: 0.3.0
|
|
131
|
-
type: :runtime
|
|
132
|
-
prerelease: false
|
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - "~>"
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: 0.3.0
|
|
138
|
-
- !ruby/object:Gem::Dependency
|
|
139
|
-
name: state_machines
|
|
153
|
+
name: typed_bus
|
|
140
154
|
requirement: !ruby/object:Gem::Requirement
|
|
141
155
|
requirements:
|
|
142
156
|
- - ">="
|
|
@@ -150,33 +164,19 @@ dependencies:
|
|
|
150
164
|
- !ruby/object:Gem::Version
|
|
151
165
|
version: '0'
|
|
152
166
|
- !ruby/object:Gem::Dependency
|
|
153
|
-
name:
|
|
154
|
-
requirement: !ruby/object:Gem::Requirement
|
|
155
|
-
requirements:
|
|
156
|
-
- - ">="
|
|
157
|
-
- !ruby/object:Gem::Version
|
|
158
|
-
version: '0'
|
|
159
|
-
type: :runtime
|
|
160
|
-
prerelease: false
|
|
161
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
-
requirements:
|
|
163
|
-
- - ">="
|
|
164
|
-
- !ruby/object:Gem::Version
|
|
165
|
-
version: '0'
|
|
166
|
-
- !ruby/object:Gem::Dependency
|
|
167
|
-
name: state_machines-activerecord
|
|
167
|
+
name: simple_flow
|
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
|
169
169
|
requirements:
|
|
170
|
-
- - "
|
|
170
|
+
- - "~>"
|
|
171
171
|
- !ruby/object:Gem::Version
|
|
172
|
-
version:
|
|
172
|
+
version: 0.3.0
|
|
173
173
|
type: :runtime
|
|
174
174
|
prerelease: false
|
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
|
176
176
|
requirements:
|
|
177
|
-
- - "
|
|
177
|
+
- - "~>"
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
|
-
version:
|
|
179
|
+
version: 0.3.0
|
|
180
180
|
- !ruby/object:Gem::Dependency
|
|
181
181
|
name: async-http
|
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -205,48 +205,6 @@ dependencies:
|
|
|
205
205
|
- - "~>"
|
|
206
206
|
- !ruby/object:Gem::Version
|
|
207
207
|
version: '0.30'
|
|
208
|
-
- !ruby/object:Gem::Dependency
|
|
209
|
-
name: railties
|
|
210
|
-
requirement: !ruby/object:Gem::Requirement
|
|
211
|
-
requirements:
|
|
212
|
-
- - ">="
|
|
213
|
-
- !ruby/object:Gem::Version
|
|
214
|
-
version: '7.0'
|
|
215
|
-
type: :runtime
|
|
216
|
-
prerelease: false
|
|
217
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
218
|
-
requirements:
|
|
219
|
-
- - ">="
|
|
220
|
-
- !ruby/object:Gem::Version
|
|
221
|
-
version: '7.0'
|
|
222
|
-
- !ruby/object:Gem::Dependency
|
|
223
|
-
name: activerecord
|
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
|
225
|
-
requirements:
|
|
226
|
-
- - ">="
|
|
227
|
-
- !ruby/object:Gem::Version
|
|
228
|
-
version: '7.0'
|
|
229
|
-
type: :runtime
|
|
230
|
-
prerelease: false
|
|
231
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
232
|
-
requirements:
|
|
233
|
-
- - ">="
|
|
234
|
-
- !ruby/object:Gem::Version
|
|
235
|
-
version: '7.0'
|
|
236
|
-
- !ruby/object:Gem::Dependency
|
|
237
|
-
name: activesupport
|
|
238
|
-
requirement: !ruby/object:Gem::Requirement
|
|
239
|
-
requirements:
|
|
240
|
-
- - ">="
|
|
241
|
-
- !ruby/object:Gem::Version
|
|
242
|
-
version: '7.0'
|
|
243
|
-
type: :runtime
|
|
244
|
-
prerelease: false
|
|
245
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
246
|
-
requirements:
|
|
247
|
-
- - ">="
|
|
248
|
-
- !ruby/object:Gem::Version
|
|
249
|
-
version: '7.0'
|
|
250
208
|
description: |
|
|
251
209
|
RobotLab is a Ruby framework for building and orchestrating multi-robot LLM workflows.
|
|
252
210
|
Built on ruby_llm, it provides robots with template-based prompts, tools, and shared
|
|
@@ -263,6 +221,7 @@ files:
|
|
|
263
221
|
- ".envrc"
|
|
264
222
|
- ".github/workflows/deploy-github-pages.yml"
|
|
265
223
|
- ".github/workflows/deploy-yard-docs.yml"
|
|
224
|
+
- ".irbrc"
|
|
266
225
|
- CHANGELOG.md
|
|
267
226
|
- COMMITS.md
|
|
268
227
|
- LICENSE.txt
|
|
@@ -331,36 +290,65 @@ files:
|
|
|
331
290
|
- examples/05_streaming.rb
|
|
332
291
|
- examples/06_prompt_templates.rb
|
|
333
292
|
- examples/07_network_memory.rb
|
|
334
|
-
- examples/
|
|
335
|
-
- examples/
|
|
336
|
-
- examples/
|
|
337
|
-
- examples/
|
|
338
|
-
- examples/
|
|
339
|
-
- examples/
|
|
340
|
-
- examples/
|
|
341
|
-
- examples/
|
|
342
|
-
- examples/
|
|
343
|
-
- examples/
|
|
344
|
-
- examples/prompts/
|
|
345
|
-
- examples/prompts/
|
|
346
|
-
- examples/prompts/
|
|
347
|
-
- examples/
|
|
348
|
-
- examples/
|
|
349
|
-
- examples/
|
|
350
|
-
- examples/
|
|
351
|
-
- examples/
|
|
352
|
-
- examples/
|
|
353
|
-
- examples/
|
|
354
|
-
- examples/
|
|
355
|
-
- examples/
|
|
356
|
-
- examples/
|
|
357
|
-
- examples/
|
|
358
|
-
- examples/
|
|
359
|
-
- examples/
|
|
360
|
-
- examples/
|
|
361
|
-
- examples/
|
|
362
|
-
- examples/
|
|
363
|
-
- examples/prompts/
|
|
293
|
+
- examples/08_llm_config.rb
|
|
294
|
+
- examples/09_chaining.rb
|
|
295
|
+
- examples/10_memory.rb
|
|
296
|
+
- examples/11_network_introspection.rb
|
|
297
|
+
- examples/12_message_bus.rb
|
|
298
|
+
- examples/13_spawn.rb
|
|
299
|
+
- examples/14_rusty_circuit/comic.rb
|
|
300
|
+
- examples/14_rusty_circuit/display.rb
|
|
301
|
+
- examples/14_rusty_circuit/heckler.rb
|
|
302
|
+
- examples/14_rusty_circuit/open_mic.rb
|
|
303
|
+
- examples/14_rusty_circuit/prompts/open_mic_comic.md
|
|
304
|
+
- examples/14_rusty_circuit/prompts/open_mic_heckler.md
|
|
305
|
+
- examples/14_rusty_circuit/prompts/open_mic_scout.md
|
|
306
|
+
- examples/14_rusty_circuit/scout.rb
|
|
307
|
+
- examples/14_rusty_circuit/scout_notes.md
|
|
308
|
+
- examples/14_rusty_circuit/show.log
|
|
309
|
+
- examples/15_memory_network_and_bus/editor_in_chief.rb
|
|
310
|
+
- examples/15_memory_network_and_bus/editorial_pipeline.rb
|
|
311
|
+
- examples/15_memory_network_and_bus/linux_writer.rb
|
|
312
|
+
- examples/15_memory_network_and_bus/os_editor.rb
|
|
313
|
+
- examples/15_memory_network_and_bus/os_writer.rb
|
|
314
|
+
- examples/15_memory_network_and_bus/output/combined_article.md
|
|
315
|
+
- examples/15_memory_network_and_bus/output/final_article.md
|
|
316
|
+
- examples/15_memory_network_and_bus/output/linux_draft.md
|
|
317
|
+
- examples/15_memory_network_and_bus/output/mac_draft.md
|
|
318
|
+
- examples/15_memory_network_and_bus/output/memory.json
|
|
319
|
+
- examples/15_memory_network_and_bus/output/revision_1.md
|
|
320
|
+
- examples/15_memory_network_and_bus/output/revision_2.md
|
|
321
|
+
- examples/15_memory_network_and_bus/output/windows_draft.md
|
|
322
|
+
- examples/15_memory_network_and_bus/prompts/os_advocate.md
|
|
323
|
+
- examples/15_memory_network_and_bus/prompts/os_chief.md
|
|
324
|
+
- examples/15_memory_network_and_bus/prompts/os_editor.md
|
|
325
|
+
- examples/README.md
|
|
326
|
+
- examples/prompts/assistant.md
|
|
327
|
+
- examples/prompts/billing.md
|
|
328
|
+
- examples/prompts/classifier.md
|
|
329
|
+
- examples/prompts/comedian.md
|
|
330
|
+
- examples/prompts/comedy_critic.md
|
|
331
|
+
- examples/prompts/configurable.md
|
|
332
|
+
- examples/prompts/dispatcher.md
|
|
333
|
+
- examples/prompts/entity_extractor.md
|
|
334
|
+
- examples/prompts/escalation.md
|
|
335
|
+
- examples/prompts/frontmatter_mcp_test.md
|
|
336
|
+
- examples/prompts/frontmatter_named_test.md
|
|
337
|
+
- examples/prompts/frontmatter_tools_test.md
|
|
338
|
+
- examples/prompts/general.md
|
|
339
|
+
- examples/prompts/github_assistant.md
|
|
340
|
+
- examples/prompts/helper.md
|
|
341
|
+
- examples/prompts/keyword_extractor.md
|
|
342
|
+
- examples/prompts/llm_config_demo.md
|
|
343
|
+
- examples/prompts/order_support.md
|
|
344
|
+
- examples/prompts/os_advocate.md
|
|
345
|
+
- examples/prompts/os_chief.md
|
|
346
|
+
- examples/prompts/os_editor.md
|
|
347
|
+
- examples/prompts/product_support.md
|
|
348
|
+
- examples/prompts/sentiment_analyzer.md
|
|
349
|
+
- examples/prompts/synthesizer.md
|
|
350
|
+
- examples/prompts/technical.md
|
|
351
|
+
- examples/prompts/triage.md
|
|
364
352
|
- lib/generators/robot_lab/install_generator.rb
|
|
365
353
|
- lib/generators/robot_lab/robot_generator.rb
|
|
366
354
|
- lib/generators/robot_lab/templates/initializer.rb.tt
|
|
@@ -376,7 +364,9 @@ files:
|
|
|
376
364
|
- lib/robot_lab/adapters/gemini.rb
|
|
377
365
|
- lib/robot_lab/adapters/openai.rb
|
|
378
366
|
- lib/robot_lab/adapters/registry.rb
|
|
379
|
-
- lib/robot_lab/
|
|
367
|
+
- lib/robot_lab/ask_user.rb
|
|
368
|
+
- lib/robot_lab/config.rb
|
|
369
|
+
- lib/robot_lab/config/defaults.yml
|
|
380
370
|
- lib/robot_lab/error.rb
|
|
381
371
|
- lib/robot_lab/errors.rb
|
|
382
372
|
- lib/robot_lab/history/active_record_adapter.rb
|
|
@@ -396,6 +386,7 @@ files:
|
|
|
396
386
|
- lib/robot_lab/rails/engine.rb
|
|
397
387
|
- lib/robot_lab/rails/railtie.rb
|
|
398
388
|
- lib/robot_lab/robot.rb
|
|
389
|
+
- lib/robot_lab/robot_message.rb
|
|
399
390
|
- lib/robot_lab/robot_result.rb
|
|
400
391
|
- lib/robot_lab/robotic_model.rb
|
|
401
392
|
- lib/robot_lab/state_proxy.rb
|
|
@@ -436,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
436
427
|
- !ruby/object:Gem::Version
|
|
437
428
|
version: '0'
|
|
438
429
|
requirements: []
|
|
439
|
-
rubygems_version: 4.0.
|
|
430
|
+
rubygems_version: 4.0.6
|
|
440
431
|
specification_version: 4
|
|
441
432
|
summary: Ruby framework for building and orchestrating multi-robot LLM workflows
|
|
442
433
|
test_files: []
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
Customer <%= customer[:name] %> (escalated case): <%= message %>
|
|
2
|
-
|
|
3
|
-
## Case Context
|
|
4
|
-
<% if defined?(escalation_context) && escalation_context %>
|
|
5
|
-
<% if escalation_context[:previous_interactions]&.any? %>
|
|
6
|
-
### Previous Interactions
|
|
7
|
-
<% escalation_context[:previous_interactions].each do |interaction| %>
|
|
8
|
-
- <%= interaction[:date] %> (<%= interaction[:channel] %>): <%= interaction[:summary] %>
|
|
9
|
-
<% end %>
|
|
10
|
-
<% end %>
|
|
11
|
-
|
|
12
|
-
<% if escalation_context[:related_orders]&.any? %>
|
|
13
|
-
### Related Orders
|
|
14
|
-
<% escalation_context[:related_orders].each do |order| %>
|
|
15
|
-
- Order #<%= order[:id] %>: $<%= order[:total] %> - <%= order[:status] %>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% end %>
|
|
18
|
-
|
|
19
|
-
<% if escalation_context[:compensation_history]&.any? %>
|
|
20
|
-
### Previous Compensation
|
|
21
|
-
<% escalation_context[:compensation_history].each do |comp| %>
|
|
22
|
-
- <%= comp[:date] %>: <%= comp[:type] %> - $<%= comp[:amount] %> (<%= comp[:reason] %>)
|
|
23
|
-
<% end %>
|
|
24
|
-
<% end %>
|
|
25
|
-
|
|
26
|
-
### Escalation Reason
|
|
27
|
-
<%= escalation_context[:escalation_reason] || "Not specified" %>
|
|
28
|
-
|
|
29
|
-
### Sentiment Analysis
|
|
30
|
-
- Detected Sentiment: <%= escalation_context[:sentiment] || "Unknown" %>
|
|
31
|
-
- Urgency Level: <%= escalation_context[:urgency] || "Normal" %>
|
|
32
|
-
<% end %>
|
|
33
|
-
|
|
34
|
-
Please resolve this escalated case with empathy and authority.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Customer <%= customer[:name] %> asks: <%= message %>
|
|
2
|
-
|
|
3
|
-
## Order History
|
|
4
|
-
<% if orders&.any? %>
|
|
5
|
-
<% orders.each do |order| %>
|
|
6
|
-
### Order #<%= order[:id] %>
|
|
7
|
-
- Date: <%= order[:date] %>
|
|
8
|
-
- Status: <%= order[:status] %>
|
|
9
|
-
- Total: $<%= order[:total] %>
|
|
10
|
-
- Items:
|
|
11
|
-
<% order[:items].each do |item| %>
|
|
12
|
-
- <%= item[:name] %> (x<%= item[:quantity] %>) - $<%= item[:price] %>
|
|
13
|
-
<% end %>
|
|
14
|
-
<% if order[:tracking] %>
|
|
15
|
-
- Tracking: <%= order[:tracking] %>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% end %>
|
|
18
|
-
<% else %>
|
|
19
|
-
No orders found for this customer.
|
|
20
|
-
<% end %>
|
|
21
|
-
|
|
22
|
-
Please help the customer with their order inquiry.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
Customer <%= customer[:name] %> asks: <%= message %>
|
|
2
|
-
|
|
3
|
-
## Relevant Products
|
|
4
|
-
<% if products&.any? %>
|
|
5
|
-
<% products.each do |product| %>
|
|
6
|
-
### <%= product[:name] %>
|
|
7
|
-
- SKU: <%= product[:sku] %>
|
|
8
|
-
- Price: $<%= product[:price] %>
|
|
9
|
-
- Category: <%= product[:category] %>
|
|
10
|
-
- In Stock: <%= product[:in_stock] ? "Yes (#{product[:quantity]} available)" : "No" %>
|
|
11
|
-
<% if product[:features]&.any? %>
|
|
12
|
-
- Features:
|
|
13
|
-
<% product[:features].each do |feature| %>
|
|
14
|
-
- <%= feature %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% if product[:compatible_with]&.any? %>
|
|
18
|
-
- Compatible With: <%= product[:compatible_with].join(", ") %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<% end %>
|
|
21
|
-
<% else %>
|
|
22
|
-
No specific products matched the query. Provide general guidance.
|
|
23
|
-
<% end %>
|
|
24
|
-
|
|
25
|
-
<% if promotions&.any? %>
|
|
26
|
-
## Current Promotions
|
|
27
|
-
<% promotions.each do |promo| %>
|
|
28
|
-
- **<%= promo[:name] %>**: <%= promo[:description] %> (Code: <%= promo[:code] %>)
|
|
29
|
-
<% end %>
|
|
30
|
-
<% end %>
|
|
31
|
-
|
|
32
|
-
Please help the customer with their product question.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Please synthesize these analysis results into a comprehensive summary:
|
|
2
|
-
|
|
3
|
-
## Original Text
|
|
4
|
-
<%= message %>
|
|
5
|
-
|
|
6
|
-
## Sentiment Analysis
|
|
7
|
-
<%= sentiment %>
|
|
8
|
-
|
|
9
|
-
## Entities Found
|
|
10
|
-
<%= entities %>
|
|
11
|
-
|
|
12
|
-
## Keywords & Topics
|
|
13
|
-
<%= keywords %>
|
|
14
|
-
|
|
15
|
-
Provide a unified analysis combining all these perspectives.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= message %>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Customer Message: <%= message %>
|
|
2
|
-
|
|
3
|
-
<% if customer && customer[:recent_orders]&.any? %>
|
|
4
|
-
Recent Order Activity:
|
|
5
|
-
<% customer[:recent_orders].each do |order| %>
|
|
6
|
-
- Order #<%= order[:id] %> (<%= order[:date] %>): <%= order[:status] %> - $<%= order[:total] %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<% end %>
|
|
9
|
-
|
|
10
|
-
<% if customer && customer[:open_tickets]&.any? %>
|
|
11
|
-
Open Support Tickets:
|
|
12
|
-
<% customer[:open_tickets].each do |ticket| %>
|
|
13
|
-
- Ticket #<%= ticket[:id] %>: <%= ticket[:subject] %> (<%= ticket[:status] %>)
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
16
|
-
|
|
17
|
-
Please classify this request.
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RobotLab
|
|
4
|
-
# Global configuration for RobotLab
|
|
5
|
-
#
|
|
6
|
-
# @example
|
|
7
|
-
# RobotLab.configure do |config|
|
|
8
|
-
# config.default_provider = :anthropic
|
|
9
|
-
# config.default_model = "claude-sonnet-4"
|
|
10
|
-
# config.template_path = "app/prompts"
|
|
11
|
-
# config.anthropic_api_key = ENV["ANTHROPIC_API_KEY"]
|
|
12
|
-
#
|
|
13
|
-
# # Global MCP servers available to all networks and robots
|
|
14
|
-
# config.mcp = [
|
|
15
|
-
# { name: "github", transport: { type: "stdio", command: "github-mcp" } }
|
|
16
|
-
# ]
|
|
17
|
-
#
|
|
18
|
-
# # Global tools whitelist (only these tools are available)
|
|
19
|
-
# config.tools = %w[search_code create_issue]
|
|
20
|
-
# end
|
|
21
|
-
#
|
|
22
|
-
class Configuration
|
|
23
|
-
# @!attribute [rw] default_provider
|
|
24
|
-
# @return [Symbol] the default LLM provider (defaults to :anthropic)
|
|
25
|
-
# @!attribute [rw] default_model
|
|
26
|
-
# @return [String] the default model to use (defaults to "claude-sonnet-4")
|
|
27
|
-
# @!attribute [rw] max_iterations
|
|
28
|
-
# @return [Integer] maximum robot iterations per network run (defaults to 10)
|
|
29
|
-
# @!attribute [rw] max_tool_iterations
|
|
30
|
-
# @return [Integer] maximum tool iterations per robot run (defaults to 10)
|
|
31
|
-
# @!attribute [rw] streaming_enabled
|
|
32
|
-
# @return [Boolean] whether streaming is enabled by default (defaults to true)
|
|
33
|
-
# @!attribute [rw] logger
|
|
34
|
-
# @return [Logger] the logger instance
|
|
35
|
-
# @!attribute [rw] mcp
|
|
36
|
-
# @return [Symbol, Array] global MCP server configuration (:none, :inherit, or array)
|
|
37
|
-
# @!attribute [rw] tools
|
|
38
|
-
# @return [Symbol, Array] global tools whitelist (:none, :inherit, or array)
|
|
39
|
-
attr_accessor :default_provider,
|
|
40
|
-
:default_model,
|
|
41
|
-
:max_iterations,
|
|
42
|
-
:max_tool_iterations,
|
|
43
|
-
:streaming_enabled,
|
|
44
|
-
:logger,
|
|
45
|
-
:mcp,
|
|
46
|
-
:tools
|
|
47
|
-
|
|
48
|
-
# Creates a new Configuration with default values.
|
|
49
|
-
def initialize
|
|
50
|
-
@default_provider = :anthropic
|
|
51
|
-
@default_model = "claude-sonnet-4"
|
|
52
|
-
@max_iterations = 10
|
|
53
|
-
@max_tool_iterations = 10
|
|
54
|
-
@streaming_enabled = true
|
|
55
|
-
@logger = default_logger
|
|
56
|
-
@template_path = nil
|
|
57
|
-
@mcp = :none
|
|
58
|
-
@tools = :none
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Sets the Anthropic API key.
|
|
62
|
-
#
|
|
63
|
-
# @param key [String] the API key
|
|
64
|
-
# @return [void]
|
|
65
|
-
def anthropic_api_key=(key)
|
|
66
|
-
RubyLLM.configure { |c| c.anthropic_api_key = key }
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
# Sets the OpenAI API key.
|
|
70
|
-
#
|
|
71
|
-
# @param key [String] the API key
|
|
72
|
-
# @return [void]
|
|
73
|
-
def openai_api_key=(key)
|
|
74
|
-
RubyLLM.configure { |c| c.openai_api_key = key }
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# Sets the Google Gemini API key.
|
|
78
|
-
#
|
|
79
|
-
# @param key [String] the API key
|
|
80
|
-
# @return [void]
|
|
81
|
-
def gemini_api_key=(key)
|
|
82
|
-
RubyLLM.configure { |c| c.gemini_api_key = key }
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Sets the AWS Bedrock API key.
|
|
86
|
-
#
|
|
87
|
-
# @param key [String] the API key
|
|
88
|
-
# @return [void]
|
|
89
|
-
def bedrock_api_key=(key)
|
|
90
|
-
RubyLLM.configure { |c| c.bedrock_api_key = key }
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Sets the OpenRouter API key.
|
|
94
|
-
#
|
|
95
|
-
# @param key [String] the API key
|
|
96
|
-
# @return [void]
|
|
97
|
-
def openrouter_api_key=(key)
|
|
98
|
-
RubyLLM.configure { |c| c.openrouter_api_key = key }
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Set the template path and configure ruby_llm-template
|
|
102
|
-
#
|
|
103
|
-
# @param path [String] Path to the templates directory
|
|
104
|
-
#
|
|
105
|
-
def template_path=(path)
|
|
106
|
-
@template_path = path
|
|
107
|
-
configure_template_library if path
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# Returns the template path.
|
|
111
|
-
#
|
|
112
|
-
# @return [String] the configured template path or default
|
|
113
|
-
def template_path
|
|
114
|
-
@template_path || default_template_path
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
private
|
|
118
|
-
|
|
119
|
-
def configure_template_library
|
|
120
|
-
require "ruby_llm/template"
|
|
121
|
-
RubyLLM::Template.configure do |config|
|
|
122
|
-
config.template_directory = @template_path
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def default_template_path
|
|
127
|
-
if defined?(Rails) && Rails.root
|
|
128
|
-
Rails.root.join("app", "prompts").to_s
|
|
129
|
-
else
|
|
130
|
-
"prompts"
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
def default_logger
|
|
135
|
-
if defined?(Rails) && Rails.respond_to?(:logger)
|
|
136
|
-
Rails.logger
|
|
137
|
-
else
|
|
138
|
-
require "logger"
|
|
139
|
-
Logger.new($stdout, level: Logger::INFO)
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
end
|