robot_lab 0.0.1 → 0.0.6
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 +140 -0
- data/README.md +263 -48
- data/Rakefile +71 -1
- data/docs/api/core/index.md +53 -46
- data/docs/api/core/memory.md +200 -154
- data/docs/api/core/network.md +13 -3
- data/docs/api/core/robot.md +490 -130
- data/docs/api/core/state.md +55 -73
- data/docs/api/core/tool.md +205 -209
- data/docs/api/index.md +7 -28
- 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/messages/index.md +35 -20
- data/docs/api/messages/text-message.md +67 -21
- data/docs/api/messages/tool-call-message.md +80 -41
- data/docs/api/messages/tool-result-message.md +119 -50
- data/docs/api/messages/user-message.md +48 -24
- 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 +360 -116
- 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 +311 -49
- 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 +347 -154
- 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 +418 -212
- data/docs/guides/creating-networks.md +143 -24
- data/docs/guides/index.md +0 -5
- data/docs/guides/mcp-integration.md +152 -113
- data/docs/guides/memory.md +220 -164
- data/docs/guides/rails-integration.md +244 -162
- data/docs/guides/streaming.md +137 -187
- data/docs/guides/using-tools.md +259 -212
- data/docs/index.md +46 -41
- data/examples/01_simple_robot.rb +6 -9
- data/examples/02_tools.rb +6 -9
- data/examples/03_network.rb +19 -17
- 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 +169 -0
- data/examples/09_chaining.rb +262 -0
- data/examples/10_memory.rb +331 -0
- data/examples/11_network_introspection.rb +253 -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 +63 -0
- data/examples/14_rusty_circuit/open_mic.rb +123 -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 +156 -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/16_writers_room/display.rb +158 -0
- data/examples/16_writers_room/output/.gitignore +2 -0
- data/examples/16_writers_room/output/opus_001.md +263 -0
- data/examples/16_writers_room/output/opus_001_notes.log +470 -0
- data/examples/16_writers_room/prompts/writer.md +37 -0
- data/examples/16_writers_room/room.rb +150 -0
- data/examples/16_writers_room/tools.rb +162 -0
- data/examples/16_writers_room/writer.rb +121 -0
- data/examples/16_writers_room/writers_room.rb +162 -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 +0 -13
- 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 +10 -34
- data/lib/robot_lab/network.rb +13 -20
- data/lib/robot_lab/robot/bus_messaging.rb +239 -0
- data/lib/robot_lab/robot/mcp_management.rb +88 -0
- data/lib/robot_lab/robot/template_rendering.rb +130 -0
- data/lib/robot_lab/robot.rb +240 -330
- data/lib/robot_lab/robot_message.rb +44 -0
- data/lib/robot_lab/robot_result.rb +1 -0
- data/lib/robot_lab/run_config.rb +184 -0
- data/lib/robot_lab/state_proxy.rb +2 -12
- data/lib/robot_lab/streaming/context.rb +1 -1
- data/lib/robot_lab/task.rb +8 -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/utils.rb +39 -0
- data/lib/robot_lab/version.rb +1 -1
- data/lib/robot_lab.rb +89 -57
- data/mkdocs.yml +0 -11
- metadata +121 -135
- data/docs/api/adapters/anthropic.md +0 -121
- data/docs/api/adapters/gemini.md +0 -133
- data/docs/api/adapters/index.md +0 -104
- data/docs/api/adapters/openai.md +0 -134
- data/docs/api/history/active-record-adapter.md +0 -195
- data/docs/api/history/config.md +0 -191
- data/docs/api/history/index.md +0 -132
- data/docs/api/history/thread-manager.md +0 -144
- data/docs/guides/history.md +0 -359
- 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/adapters/anthropic.rb +0 -163
- data/lib/robot_lab/adapters/base.rb +0 -85
- data/lib/robot_lab/adapters/gemini.rb +0 -193
- data/lib/robot_lab/adapters/openai.rb +0 -159
- data/lib/robot_lab/adapters/registry.rb +0 -81
- data/lib/robot_lab/configuration.rb +0 -143
- data/lib/robot_lab/errors.rb +0 -70
- data/lib/robot_lab/history/active_record_adapter.rb +0 -146
- data/lib/robot_lab/history/config.rb +0 -115
- data/lib/robot_lab/history/thread_manager.rb +0 -93
- data/lib/robot_lab/robotic_model.rb +0 -324
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.6
|
|
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,25 +221,18 @@ 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
|
|
269
228
|
- README.md
|
|
270
229
|
- Rakefile
|
|
271
|
-
- docs/api/adapters/anthropic.md
|
|
272
|
-
- docs/api/adapters/gemini.md
|
|
273
|
-
- docs/api/adapters/index.md
|
|
274
|
-
- docs/api/adapters/openai.md
|
|
275
230
|
- docs/api/core/index.md
|
|
276
231
|
- docs/api/core/memory.md
|
|
277
232
|
- docs/api/core/network.md
|
|
278
233
|
- docs/api/core/robot.md
|
|
279
234
|
- docs/api/core/state.md
|
|
280
235
|
- docs/api/core/tool.md
|
|
281
|
-
- docs/api/history/active-record-adapter.md
|
|
282
|
-
- docs/api/history/config.md
|
|
283
|
-
- docs/api/history/index.md
|
|
284
|
-
- docs/api/history/thread-manager.md
|
|
285
236
|
- docs/api/index.md
|
|
286
237
|
- docs/api/mcp/client.md
|
|
287
238
|
- docs/api/mcp/index.md
|
|
@@ -316,7 +267,6 @@ files:
|
|
|
316
267
|
- docs/getting-started/quick-start.md
|
|
317
268
|
- docs/guides/building-robots.md
|
|
318
269
|
- docs/guides/creating-networks.md
|
|
319
|
-
- docs/guides/history.md
|
|
320
270
|
- docs/guides/index.md
|
|
321
271
|
- docs/guides/mcp-integration.md
|
|
322
272
|
- docs/guides/memory.md
|
|
@@ -331,36 +281,74 @@ files:
|
|
|
331
281
|
- examples/05_streaming.rb
|
|
332
282
|
- examples/06_prompt_templates.rb
|
|
333
283
|
- 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/
|
|
284
|
+
- examples/08_llm_config.rb
|
|
285
|
+
- examples/09_chaining.rb
|
|
286
|
+
- examples/10_memory.rb
|
|
287
|
+
- examples/11_network_introspection.rb
|
|
288
|
+
- examples/12_message_bus.rb
|
|
289
|
+
- examples/13_spawn.rb
|
|
290
|
+
- examples/14_rusty_circuit/comic.rb
|
|
291
|
+
- examples/14_rusty_circuit/display.rb
|
|
292
|
+
- examples/14_rusty_circuit/heckler.rb
|
|
293
|
+
- examples/14_rusty_circuit/open_mic.rb
|
|
294
|
+
- examples/14_rusty_circuit/prompts/open_mic_comic.md
|
|
295
|
+
- examples/14_rusty_circuit/prompts/open_mic_heckler.md
|
|
296
|
+
- examples/14_rusty_circuit/prompts/open_mic_scout.md
|
|
297
|
+
- examples/14_rusty_circuit/scout.rb
|
|
298
|
+
- examples/14_rusty_circuit/scout_notes.md
|
|
299
|
+
- examples/14_rusty_circuit/show.log
|
|
300
|
+
- examples/15_memory_network_and_bus/editor_in_chief.rb
|
|
301
|
+
- examples/15_memory_network_and_bus/editorial_pipeline.rb
|
|
302
|
+
- examples/15_memory_network_and_bus/linux_writer.rb
|
|
303
|
+
- examples/15_memory_network_and_bus/os_editor.rb
|
|
304
|
+
- examples/15_memory_network_and_bus/os_writer.rb
|
|
305
|
+
- examples/15_memory_network_and_bus/output/combined_article.md
|
|
306
|
+
- examples/15_memory_network_and_bus/output/final_article.md
|
|
307
|
+
- examples/15_memory_network_and_bus/output/linux_draft.md
|
|
308
|
+
- examples/15_memory_network_and_bus/output/mac_draft.md
|
|
309
|
+
- examples/15_memory_network_and_bus/output/memory.json
|
|
310
|
+
- examples/15_memory_network_and_bus/output/revision_1.md
|
|
311
|
+
- examples/15_memory_network_and_bus/output/revision_2.md
|
|
312
|
+
- examples/15_memory_network_and_bus/output/windows_draft.md
|
|
313
|
+
- examples/15_memory_network_and_bus/prompts/os_advocate.md
|
|
314
|
+
- examples/15_memory_network_and_bus/prompts/os_chief.md
|
|
315
|
+
- examples/15_memory_network_and_bus/prompts/os_editor.md
|
|
316
|
+
- examples/16_writers_room/display.rb
|
|
317
|
+
- examples/16_writers_room/output/.gitignore
|
|
318
|
+
- examples/16_writers_room/output/opus_001.md
|
|
319
|
+
- examples/16_writers_room/output/opus_001_notes.log
|
|
320
|
+
- examples/16_writers_room/prompts/writer.md
|
|
321
|
+
- examples/16_writers_room/room.rb
|
|
322
|
+
- examples/16_writers_room/tools.rb
|
|
323
|
+
- examples/16_writers_room/writer.rb
|
|
324
|
+
- examples/16_writers_room/writers_room.rb
|
|
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
|
|
@@ -371,17 +359,10 @@ files:
|
|
|
371
359
|
- lib/generators/robot_lab/templates/routing_robot.rb.tt
|
|
372
360
|
- lib/generators/robot_lab/templates/thread_model.rb.tt
|
|
373
361
|
- lib/robot_lab.rb
|
|
374
|
-
- lib/robot_lab/
|
|
375
|
-
- lib/robot_lab/
|
|
376
|
-
- lib/robot_lab/
|
|
377
|
-
- lib/robot_lab/adapters/openai.rb
|
|
378
|
-
- lib/robot_lab/adapters/registry.rb
|
|
379
|
-
- lib/robot_lab/configuration.rb
|
|
362
|
+
- lib/robot_lab/ask_user.rb
|
|
363
|
+
- lib/robot_lab/config.rb
|
|
364
|
+
- lib/robot_lab/config/defaults.yml
|
|
380
365
|
- lib/robot_lab/error.rb
|
|
381
|
-
- lib/robot_lab/errors.rb
|
|
382
|
-
- lib/robot_lab/history/active_record_adapter.rb
|
|
383
|
-
- lib/robot_lab/history/config.rb
|
|
384
|
-
- lib/robot_lab/history/thread_manager.rb
|
|
385
366
|
- lib/robot_lab/mcp/client.rb
|
|
386
367
|
- lib/robot_lab/mcp/server.rb
|
|
387
368
|
- lib/robot_lab/mcp/transports/base.rb
|
|
@@ -396,8 +377,12 @@ files:
|
|
|
396
377
|
- lib/robot_lab/rails/engine.rb
|
|
397
378
|
- lib/robot_lab/rails/railtie.rb
|
|
398
379
|
- lib/robot_lab/robot.rb
|
|
380
|
+
- lib/robot_lab/robot/bus_messaging.rb
|
|
381
|
+
- lib/robot_lab/robot/mcp_management.rb
|
|
382
|
+
- lib/robot_lab/robot/template_rendering.rb
|
|
383
|
+
- lib/robot_lab/robot_message.rb
|
|
399
384
|
- lib/robot_lab/robot_result.rb
|
|
400
|
-
- lib/robot_lab/
|
|
385
|
+
- lib/robot_lab/run_config.rb
|
|
401
386
|
- lib/robot_lab/state_proxy.rb
|
|
402
387
|
- lib/robot_lab/streaming/context.rb
|
|
403
388
|
- lib/robot_lab/streaming/events.rb
|
|
@@ -407,6 +392,7 @@ files:
|
|
|
407
392
|
- lib/robot_lab/tool_config.rb
|
|
408
393
|
- lib/robot_lab/tool_manifest.rb
|
|
409
394
|
- lib/robot_lab/user_message.rb
|
|
395
|
+
- lib/robot_lab/utils.rb
|
|
410
396
|
- lib/robot_lab/version.rb
|
|
411
397
|
- lib/robot_lab/waiter.rb
|
|
412
398
|
- mkdocs.yml
|
|
@@ -436,7 +422,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
436
422
|
- !ruby/object:Gem::Version
|
|
437
423
|
version: '0'
|
|
438
424
|
requirements: []
|
|
439
|
-
rubygems_version: 4.0.
|
|
425
|
+
rubygems_version: 4.0.6
|
|
440
426
|
specification_version: 4
|
|
441
427
|
summary: Ruby framework for building and orchestrating multi-robot LLM workflows
|
|
442
428
|
test_files: []
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Anthropic Adapter
|
|
2
|
-
|
|
3
|
-
Adapter for Claude models via Anthropic API.
|
|
4
|
-
|
|
5
|
-
## Class: `RobotLab::Adapters::Anthropic`
|
|
6
|
-
|
|
7
|
-
```ruby
|
|
8
|
-
# Automatically used for Claude models
|
|
9
|
-
robot = RobotLab.build do
|
|
10
|
-
model "claude-sonnet-4"
|
|
11
|
-
end
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Supported Models
|
|
15
|
-
|
|
16
|
-
| Model | Description |
|
|
17
|
-
|-------|-------------|
|
|
18
|
-
| `claude-sonnet-4` | Latest Sonnet (recommended) |
|
|
19
|
-
| `claude-opus-4` | Most capable model |
|
|
20
|
-
| `claude-3-5-sonnet-latest` | Claude 3.5 Sonnet |
|
|
21
|
-
| `claude-3-5-haiku-latest` | Fast, efficient model |
|
|
22
|
-
|
|
23
|
-
## Configuration
|
|
24
|
-
|
|
25
|
-
### API Key
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
export ANTHROPIC_API_KEY="sk-ant-api03-..."
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Options
|
|
32
|
-
|
|
33
|
-
```ruby
|
|
34
|
-
RobotLab.configure do |config|
|
|
35
|
-
config.adapter_options = {
|
|
36
|
-
anthropic: {
|
|
37
|
-
base_url: "https://api.anthropic.com",
|
|
38
|
-
api_version: "2024-01-01",
|
|
39
|
-
timeout: 120,
|
|
40
|
-
max_tokens: 4096
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
end
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Features
|
|
47
|
-
|
|
48
|
-
### Streaming
|
|
49
|
-
|
|
50
|
-
```ruby
|
|
51
|
-
result = robot.run(state: state) do |event|
|
|
52
|
-
case event
|
|
53
|
-
when :text_delta
|
|
54
|
-
print event.text
|
|
55
|
-
when :tool_call
|
|
56
|
-
puts "Calling: #{event.name}"
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Tool Use
|
|
62
|
-
|
|
63
|
-
Tools are automatically converted to Anthropic's format:
|
|
64
|
-
|
|
65
|
-
```ruby
|
|
66
|
-
robot = RobotLab.build do
|
|
67
|
-
model "claude-sonnet-4"
|
|
68
|
-
|
|
69
|
-
tool :search do
|
|
70
|
-
description "Search the database"
|
|
71
|
-
parameter :query, type: :string, required: true
|
|
72
|
-
handler { |query:, **_| Database.search(query) }
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Extended Thinking
|
|
78
|
-
|
|
79
|
-
For complex reasoning tasks:
|
|
80
|
-
|
|
81
|
-
```ruby
|
|
82
|
-
robot = RobotLab.build do
|
|
83
|
-
model "claude-sonnet-4"
|
|
84
|
-
# Extended thinking is automatically enabled for supported models
|
|
85
|
-
end
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Response Format
|
|
89
|
-
|
|
90
|
-
```ruby
|
|
91
|
-
{
|
|
92
|
-
content: [TextMessage, ...],
|
|
93
|
-
tool_calls: [ToolCallMessage, ...],
|
|
94
|
-
usage: {
|
|
95
|
-
input_tokens: 150,
|
|
96
|
-
output_tokens: 250,
|
|
97
|
-
cache_creation_input_tokens: 0,
|
|
98
|
-
cache_read_input_tokens: 0
|
|
99
|
-
},
|
|
100
|
-
stop_reason: "end_turn"
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Error Handling
|
|
105
|
-
|
|
106
|
-
```ruby
|
|
107
|
-
begin
|
|
108
|
-
result = robot.run(state: state)
|
|
109
|
-
rescue RobotLab::Adapters::RateLimitError => e
|
|
110
|
-
sleep(e.retry_after)
|
|
111
|
-
retry
|
|
112
|
-
rescue RobotLab::Adapters::APIError => e
|
|
113
|
-
logger.error("Anthropic API error: #{e.message}")
|
|
114
|
-
end
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## See Also
|
|
118
|
-
|
|
119
|
-
- [Adapters Overview](index.md)
|
|
120
|
-
- [Streaming Guide](../../guides/streaming.md)
|
|
121
|
-
- [Anthropic API Documentation](https://docs.anthropic.com/)
|
data/docs/api/adapters/gemini.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# Gemini Adapter
|
|
2
|
-
|
|
3
|
-
Adapter for Gemini models via Google AI API.
|
|
4
|
-
|
|
5
|
-
## Class: `RobotLab::Adapters::Gemini`
|
|
6
|
-
|
|
7
|
-
```ruby
|
|
8
|
-
# Automatically used for Gemini models
|
|
9
|
-
robot = RobotLab.build do
|
|
10
|
-
model "gemini-1.5-pro"
|
|
11
|
-
end
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Supported Models
|
|
15
|
-
|
|
16
|
-
| Model | Description |
|
|
17
|
-
|-------|-------------|
|
|
18
|
-
| `gemini-1.5-pro` | Most capable Gemini |
|
|
19
|
-
| `gemini-1.5-flash` | Fast, efficient model |
|
|
20
|
-
| `gemini-1.5-flash-8b` | Lightweight model |
|
|
21
|
-
| `gemini-2.0-flash-exp` | Experimental next-gen |
|
|
22
|
-
|
|
23
|
-
## Configuration
|
|
24
|
-
|
|
25
|
-
### API Key
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
export GOOGLE_AI_API_KEY="..."
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Options
|
|
32
|
-
|
|
33
|
-
```ruby
|
|
34
|
-
RobotLab.configure do |config|
|
|
35
|
-
config.adapter_options = {
|
|
36
|
-
gemini: {
|
|
37
|
-
base_url: "https://generativelanguage.googleapis.com",
|
|
38
|
-
timeout: 120,
|
|
39
|
-
max_tokens: 8192
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Vertex AI
|
|
46
|
-
|
|
47
|
-
```ruby
|
|
48
|
-
RobotLab.configure do |config|
|
|
49
|
-
config.adapter_options = {
|
|
50
|
-
gemini: {
|
|
51
|
-
base_url: "https://us-central1-aiplatform.googleapis.com",
|
|
52
|
-
project_id: "your-project",
|
|
53
|
-
location: "us-central1"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
end
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Features
|
|
60
|
-
|
|
61
|
-
### Streaming
|
|
62
|
-
|
|
63
|
-
```ruby
|
|
64
|
-
result = robot.run(state: state) do |event|
|
|
65
|
-
case event
|
|
66
|
-
when :text_delta
|
|
67
|
-
print event.text
|
|
68
|
-
when :tool_call
|
|
69
|
-
puts "Calling: #{event.name}"
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Tool Use
|
|
75
|
-
|
|
76
|
-
Tools are automatically converted to Gemini's format:
|
|
77
|
-
|
|
78
|
-
```ruby
|
|
79
|
-
robot = RobotLab.build do
|
|
80
|
-
model "gemini-1.5-pro"
|
|
81
|
-
|
|
82
|
-
tool :search_products do
|
|
83
|
-
description "Search product catalog"
|
|
84
|
-
parameter :query, type: :string, required: true
|
|
85
|
-
parameter :category, type: :string
|
|
86
|
-
handler { |query:, category: nil, **_| Catalog.search(query, category) }
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Long Context
|
|
92
|
-
|
|
93
|
-
Gemini supports very long contexts:
|
|
94
|
-
|
|
95
|
-
```ruby
|
|
96
|
-
robot = RobotLab.build do
|
|
97
|
-
model "gemini-1.5-pro"
|
|
98
|
-
# Supports up to 2M tokens context
|
|
99
|
-
end
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Response Format
|
|
103
|
-
|
|
104
|
-
```ruby
|
|
105
|
-
{
|
|
106
|
-
content: [TextMessage, ...],
|
|
107
|
-
tool_calls: [ToolCallMessage, ...],
|
|
108
|
-
usage: {
|
|
109
|
-
input_tokens: 150,
|
|
110
|
-
output_tokens: 250
|
|
111
|
-
},
|
|
112
|
-
stop_reason: "STOP"
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Error Handling
|
|
117
|
-
|
|
118
|
-
```ruby
|
|
119
|
-
begin
|
|
120
|
-
result = robot.run(state: state)
|
|
121
|
-
rescue RobotLab::Adapters::RateLimitError => e
|
|
122
|
-
sleep(e.retry_after || 60)
|
|
123
|
-
retry
|
|
124
|
-
rescue RobotLab::Adapters::APIError => e
|
|
125
|
-
logger.error("Gemini API error: #{e.message}")
|
|
126
|
-
end
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## See Also
|
|
130
|
-
|
|
131
|
-
- [Adapters Overview](index.md)
|
|
132
|
-
- [Streaming Guide](../../guides/streaming.md)
|
|
133
|
-
- [Google AI Documentation](https://ai.google.dev/docs)
|