robot_lab 0.1.0 → 0.2.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.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/.architecture/AGENTS.md +32 -0
  3. data/.architecture/config.yml +8 -0
  4. data/.architecture/members.yml +60 -0
  5. data/.architecture/reviews/feature-free-will.md +490 -0
  6. data/.architecture/reviews/overall-codebase.md +427 -0
  7. data/.claude/settings.local.json +57 -0
  8. data/.codex/config.toml +2 -0
  9. data/.irbrc +2 -2
  10. data/.rubocop.yml +172 -0
  11. data/CHANGELOG.md +72 -0
  12. data/CLAUDE.md +139 -0
  13. data/README.md +91 -95
  14. data/Rakefile +109 -3
  15. data/agent2agent_review.md +192 -0
  16. data/agentf_improvements.md +253 -0
  17. data/agents.md +14 -0
  18. data/docs/examples/index.md +37 -2
  19. data/docs/getting-started/configuration.md +20 -7
  20. data/docs/guides/index.md +16 -16
  21. data/docs/guides/knowledge.md +7 -1
  22. data/docs/guides/observability.md +132 -0
  23. data/docs/index.md +30 -3
  24. data/docs/superpowers/plans/2026-05-06-agentskills.md +1303 -0
  25. data/docs/superpowers/specs/2026-05-06-agentskills-design.md +247 -0
  26. data/examples/.envrc +1 -0
  27. data/examples/01_simple_robot.rb +5 -9
  28. data/examples/02_tools.rb +5 -9
  29. data/examples/03_network.rb +8 -9
  30. data/examples/04_mcp.rb +21 -29
  31. data/examples/05_streaming.rb +12 -18
  32. data/examples/06_prompt_templates.rb +11 -19
  33. data/examples/07_network_memory.rb +16 -31
  34. data/examples/08_llm_config.rb +10 -22
  35. data/examples/09_chaining.rb +16 -27
  36. data/examples/10_memory.rb +12 -28
  37. data/examples/11_network_introspection.rb +15 -29
  38. data/examples/12_message_bus.rb +5 -12
  39. data/examples/13_spawn.rb +5 -10
  40. data/examples/14_rusty_circuit/.envrc +1 -0
  41. data/examples/14_rusty_circuit/comic.rb +2 -0
  42. data/examples/14_rusty_circuit/heckler.rb +1 -1
  43. data/examples/14_rusty_circuit/open_mic.rb +1 -3
  44. data/examples/14_rusty_circuit/scout.rb +2 -0
  45. data/examples/15_memory_network_and_bus/.envrc +1 -0
  46. data/examples/15_memory_network_and_bus/editorial_pipeline.rb +6 -3
  47. data/examples/15_memory_network_and_bus/linux_writer.rb +1 -1
  48. data/examples/15_memory_network_and_bus/output/combined_article.md +6 -6
  49. data/examples/15_memory_network_and_bus/output/final_article.md +6 -8
  50. data/examples/15_memory_network_and_bus/output/linux_draft.md +4 -2
  51. data/examples/15_memory_network_and_bus/output/mac_draft.md +3 -3
  52. data/examples/15_memory_network_and_bus/output/memory.json +6 -6
  53. data/examples/15_memory_network_and_bus/output/revision_1.md +10 -11
  54. data/examples/15_memory_network_and_bus/output/revision_2.md +6 -8
  55. data/examples/15_memory_network_and_bus/output/windows_draft.md +3 -3
  56. data/examples/16_writers_room/.envrc +1 -0
  57. data/examples/16_writers_room/writers_room.rb +2 -4
  58. data/examples/17_skills.rb +8 -17
  59. data/examples/18_rails/Gemfile +1 -0
  60. data/examples/19_token_tracking.rb +9 -15
  61. data/examples/20_circuit_breaker.rb +10 -19
  62. data/examples/21_learning_loop.rb +11 -20
  63. data/examples/22_context_compression.rb +6 -13
  64. data/examples/23_convergence.rb +6 -17
  65. data/examples/24_structured_delegation.rb +11 -15
  66. data/examples/25_history_search.rb +5 -12
  67. data/examples/26_document_store.rb +6 -13
  68. data/examples/27_incident_response/incident_response.rb +4 -5
  69. data/examples/28_mcp_discovery.rb +8 -11
  70. data/examples/29_ractor_tools.rb +4 -9
  71. data/examples/30_ractor_network.rb +10 -19
  72. data/examples/31_launch_assessment.rb +10 -23
  73. data/examples/32_newsletter_reader.rb +188 -0
  74. data/examples/33_stock_generator.rb +80 -0
  75. data/examples/33_stock_predictor.rb +306 -0
  76. data/examples/34_agentskills.rb +72 -0
  77. data/examples/README.md +1 -1
  78. data/examples/common.rb +76 -0
  79. data/examples/ruboruby.md +423 -0
  80. data/examples/temp.md +51 -0
  81. data/lib/robot_lab/agent_skill.rb +63 -0
  82. data/lib/robot_lab/agent_skill_catalog.rb +74 -0
  83. data/lib/robot_lab/ask_user.rb +2 -2
  84. data/lib/robot_lab/bus_poller.rb +12 -5
  85. data/lib/robot_lab/config.rb +1 -12
  86. data/lib/robot_lab/delegation_future.rb +1 -1
  87. data/lib/robot_lab/doom_loop_detector.rb +98 -0
  88. data/lib/robot_lab/history_compressor.rb +4 -10
  89. data/lib/robot_lab/mcp/client.rb +1 -2
  90. data/lib/robot_lab/mcp/connection_poller.rb +3 -3
  91. data/lib/robot_lab/mcp/server.rb +1 -1
  92. data/lib/robot_lab/mcp/server_discovery.rb +0 -2
  93. data/lib/robot_lab/memory.rb +32 -27
  94. data/lib/robot_lab/memory_change.rb +2 -2
  95. data/lib/robot_lab/message.rb +4 -4
  96. data/lib/robot_lab/network.rb +11 -6
  97. data/lib/robot_lab/robot/agent_skill_matching.rb +99 -0
  98. data/lib/robot_lab/robot/bus_messaging.rb +9 -27
  99. data/lib/robot_lab/robot/history_search.rb +4 -1
  100. data/lib/robot_lab/robot/mcp_management.rb +5 -11
  101. data/lib/robot_lab/robot/template_rendering.rb +60 -40
  102. data/lib/robot_lab/robot.rb +323 -206
  103. data/lib/robot_lab/robot_result.rb +6 -5
  104. data/lib/robot_lab/run_config.rb +5 -11
  105. data/lib/robot_lab/script_tool.rb +76 -0
  106. data/lib/robot_lab/state_proxy.rb +7 -5
  107. data/lib/robot_lab/tool.rb +3 -3
  108. data/lib/robot_lab/tool_config.rb +1 -1
  109. data/lib/robot_lab/tool_manifest.rb +5 -7
  110. data/lib/robot_lab/user_message.rb +2 -2
  111. data/lib/robot_lab/version.rb +1 -1
  112. data/lib/robot_lab/waiter.rb +1 -1
  113. data/lib/robot_lab.rb +41 -52
  114. data/logfile +8 -0
  115. data/mkdocs.yml +2 -3
  116. data/robot_concurrency.md +38 -0
  117. data/simple_acp_review.md +298 -0
  118. data/site/404.html +2300 -0
  119. data/site/api/core/index.html +2706 -0
  120. data/site/api/core/memory/index.html +3793 -0
  121. data/site/api/core/network/index.html +3500 -0
  122. data/site/api/core/robot/index.html +4566 -0
  123. data/site/api/core/state/index.html +3390 -0
  124. data/site/api/core/tool/index.html +3843 -0
  125. data/site/api/index.html +2635 -0
  126. data/site/api/mcp/client/index.html +3435 -0
  127. data/site/api/mcp/index.html +2783 -0
  128. data/site/api/mcp/server/index.html +3252 -0
  129. data/site/api/mcp/transports/index.html +3352 -0
  130. data/site/api/messages/index.html +2641 -0
  131. data/site/api/messages/text-message/index.html +3087 -0
  132. data/site/api/messages/tool-call-message/index.html +3159 -0
  133. data/site/api/messages/tool-result-message/index.html +3252 -0
  134. data/site/api/messages/user-message/index.html +3212 -0
  135. data/site/api/streaming/context/index.html +3282 -0
  136. data/site/api/streaming/events/index.html +3347 -0
  137. data/site/api/streaming/index.html +2738 -0
  138. data/site/architecture/core-concepts/index.html +3757 -0
  139. data/site/architecture/index.html +2797 -0
  140. data/site/architecture/message-flow/index.html +3238 -0
  141. data/site/architecture/network-orchestration/index.html +3433 -0
  142. data/site/architecture/robot-execution/index.html +3140 -0
  143. data/site/architecture/state-management/index.html +3498 -0
  144. data/site/assets/css/custom.css +56 -0
  145. data/site/assets/images/favicon.png +0 -0
  146. data/site/assets/images/robot_lab.jpg +0 -0
  147. data/site/assets/javascripts/bundle.79ae519e.min.js +16 -0
  148. data/site/assets/javascripts/bundle.79ae519e.min.js.map +7 -0
  149. data/site/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
  150. data/site/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
  151. data/site/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
  152. data/site/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
  153. data/site/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
  154. data/site/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
  155. data/site/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
  156. data/site/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
  157. data/site/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
  158. data/site/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
  159. data/site/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
  160. data/site/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
  161. data/site/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
  162. data/site/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
  163. data/site/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
  164. data/site/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
  165. data/site/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
  166. data/site/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
  167. data/site/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
  168. data/site/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
  169. data/site/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
  170. data/site/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
  171. data/site/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
  172. data/site/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
  173. data/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
  174. data/site/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
  175. data/site/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
  176. data/site/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
  177. data/site/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
  178. data/site/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
  179. data/site/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
  180. data/site/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
  181. data/site/assets/javascripts/lunr/tinyseg.js +206 -0
  182. data/site/assets/javascripts/lunr/wordcut.js +6708 -0
  183. data/site/assets/javascripts/workers/search.2c215733.min.js +42 -0
  184. data/site/assets/javascripts/workers/search.2c215733.min.js.map +7 -0
  185. data/site/assets/stylesheets/main.484c7ddc.min.css +1 -0
  186. data/site/assets/stylesheets/main.484c7ddc.min.css.map +1 -0
  187. data/site/assets/stylesheets/palette.ab4e12ef.min.css +1 -0
  188. data/site/assets/stylesheets/palette.ab4e12ef.min.css.map +1 -0
  189. data/site/concepts/index.html +3455 -0
  190. data/site/examples/basic-chat/index.html +2880 -0
  191. data/site/examples/index.html +2907 -0
  192. data/site/examples/mcp-server/index.html +3018 -0
  193. data/site/examples/multi-robot-network/index.html +3131 -0
  194. data/site/examples/rails-application/index.html +3329 -0
  195. data/site/examples/tool-usage/index.html +3085 -0
  196. data/site/getting-started/configuration/index.html +3745 -0
  197. data/site/getting-started/index.html +2572 -0
  198. data/site/getting-started/installation/index.html +2981 -0
  199. data/site/getting-started/quick-start/index.html +2942 -0
  200. data/site/guides/building-robots/index.html +4290 -0
  201. data/site/guides/creating-networks/index.html +3858 -0
  202. data/site/guides/index.html +2586 -0
  203. data/site/guides/mcp-integration/index.html +3581 -0
  204. data/site/guides/memory/index.html +3586 -0
  205. data/site/guides/rails-integration/index.html +4019 -0
  206. data/site/guides/streaming/index.html +3157 -0
  207. data/site/guides/using-tools/index.html +3802 -0
  208. data/site/index.html +2671 -0
  209. data/site/search/search_index.json +1 -0
  210. data/site/sitemap.xml +183 -0
  211. data/site/sitemap.xml.gz +0 -0
  212. data/site/tags.json +1 -0
  213. data/temp.md +6 -0
  214. data/tool_manifest_plan.md +155 -0
  215. metadata +154 -92
  216. data/docs/examples/rails-application.md +0 -419
  217. data/docs/guides/ractor-parallelism.md +0 -364
  218. data/docs/guides/rails-integration.md +0 -681
  219. data/docs/superpowers/plans/2026-04-14-ractor-integration.md +0 -1538
  220. data/docs/superpowers/specs/2026-04-14-ractor-integration-design.md +0 -258
  221. data/lib/generators/robot_lab/install_generator.rb +0 -90
  222. data/lib/generators/robot_lab/job_generator.rb +0 -40
  223. data/lib/generators/robot_lab/robot_generator.rb +0 -55
  224. data/lib/generators/robot_lab/templates/initializer.rb.tt +0 -42
  225. data/lib/generators/robot_lab/templates/job.rb.tt +0 -21
  226. data/lib/generators/robot_lab/templates/migration.rb.tt +0 -32
  227. data/lib/generators/robot_lab/templates/result_model.rb.tt +0 -52
  228. data/lib/generators/robot_lab/templates/robot.rb.tt +0 -31
  229. data/lib/generators/robot_lab/templates/robot_job.rb.tt +0 -18
  230. data/lib/generators/robot_lab/templates/robot_test.rb.tt +0 -34
  231. data/lib/generators/robot_lab/templates/routing_robot.rb.tt +0 -59
  232. data/lib/generators/robot_lab/templates/thread_model.rb.tt +0 -40
  233. data/lib/robot_lab/document_store.rb +0 -155
  234. data/lib/robot_lab/ractor_boundary.rb +0 -42
  235. data/lib/robot_lab/ractor_job.rb +0 -37
  236. data/lib/robot_lab/ractor_memory_proxy.rb +0 -85
  237. data/lib/robot_lab/ractor_network_scheduler.rb +0 -154
  238. data/lib/robot_lab/ractor_worker_pool.rb +0 -117
  239. data/lib/robot_lab/rails_integration/engine.rb +0 -29
  240. data/lib/robot_lab/rails_integration/job.rb +0 -158
  241. data/lib/robot_lab/rails_integration/railtie.rb +0 -51
  242. data/lib/robot_lab/rails_integration/turbo_stream_callbacks.rb +0 -72
data/site/sitemap.xml ADDED
@@ -0,0 +1,183 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://madbomber.github.io/robot_lab/</loc>
5
+ <lastmod>2026-02-22</lastmod>
6
+ </url>
7
+ <url>
8
+ <loc>https://madbomber.github.io/robot_lab/concepts/</loc>
9
+ <lastmod>2026-02-22</lastmod>
10
+ </url>
11
+ <url>
12
+ <loc>https://madbomber.github.io/robot_lab/api/</loc>
13
+ <lastmod>2026-02-22</lastmod>
14
+ </url>
15
+ <url>
16
+ <loc>https://madbomber.github.io/robot_lab/api/core/</loc>
17
+ <lastmod>2026-02-22</lastmod>
18
+ </url>
19
+ <url>
20
+ <loc>https://madbomber.github.io/robot_lab/api/core/memory/</loc>
21
+ <lastmod>2026-02-22</lastmod>
22
+ </url>
23
+ <url>
24
+ <loc>https://madbomber.github.io/robot_lab/api/core/network/</loc>
25
+ <lastmod>2026-02-22</lastmod>
26
+ </url>
27
+ <url>
28
+ <loc>https://madbomber.github.io/robot_lab/api/core/robot/</loc>
29
+ <lastmod>2026-02-22</lastmod>
30
+ </url>
31
+ <url>
32
+ <loc>https://madbomber.github.io/robot_lab/api/core/state/</loc>
33
+ <lastmod>2026-02-22</lastmod>
34
+ </url>
35
+ <url>
36
+ <loc>https://madbomber.github.io/robot_lab/api/core/tool/</loc>
37
+ <lastmod>2026-02-22</lastmod>
38
+ </url>
39
+ <url>
40
+ <loc>https://madbomber.github.io/robot_lab/api/mcp/</loc>
41
+ <lastmod>2026-02-22</lastmod>
42
+ </url>
43
+ <url>
44
+ <loc>https://madbomber.github.io/robot_lab/api/mcp/client/</loc>
45
+ <lastmod>2026-02-22</lastmod>
46
+ </url>
47
+ <url>
48
+ <loc>https://madbomber.github.io/robot_lab/api/mcp/server/</loc>
49
+ <lastmod>2026-02-22</lastmod>
50
+ </url>
51
+ <url>
52
+ <loc>https://madbomber.github.io/robot_lab/api/mcp/transports/</loc>
53
+ <lastmod>2026-02-22</lastmod>
54
+ </url>
55
+ <url>
56
+ <loc>https://madbomber.github.io/robot_lab/api/messages/</loc>
57
+ <lastmod>2026-02-22</lastmod>
58
+ </url>
59
+ <url>
60
+ <loc>https://madbomber.github.io/robot_lab/api/messages/text-message/</loc>
61
+ <lastmod>2026-02-22</lastmod>
62
+ </url>
63
+ <url>
64
+ <loc>https://madbomber.github.io/robot_lab/api/messages/tool-call-message/</loc>
65
+ <lastmod>2026-02-22</lastmod>
66
+ </url>
67
+ <url>
68
+ <loc>https://madbomber.github.io/robot_lab/api/messages/tool-result-message/</loc>
69
+ <lastmod>2026-02-22</lastmod>
70
+ </url>
71
+ <url>
72
+ <loc>https://madbomber.github.io/robot_lab/api/messages/user-message/</loc>
73
+ <lastmod>2026-02-22</lastmod>
74
+ </url>
75
+ <url>
76
+ <loc>https://madbomber.github.io/robot_lab/api/streaming/</loc>
77
+ <lastmod>2026-02-22</lastmod>
78
+ </url>
79
+ <url>
80
+ <loc>https://madbomber.github.io/robot_lab/api/streaming/context/</loc>
81
+ <lastmod>2026-02-22</lastmod>
82
+ </url>
83
+ <url>
84
+ <loc>https://madbomber.github.io/robot_lab/api/streaming/events/</loc>
85
+ <lastmod>2026-02-22</lastmod>
86
+ </url>
87
+ <url>
88
+ <loc>https://madbomber.github.io/robot_lab/architecture/</loc>
89
+ <lastmod>2026-02-22</lastmod>
90
+ </url>
91
+ <url>
92
+ <loc>https://madbomber.github.io/robot_lab/architecture/core-concepts/</loc>
93
+ <lastmod>2026-02-22</lastmod>
94
+ </url>
95
+ <url>
96
+ <loc>https://madbomber.github.io/robot_lab/architecture/message-flow/</loc>
97
+ <lastmod>2026-02-22</lastmod>
98
+ </url>
99
+ <url>
100
+ <loc>https://madbomber.github.io/robot_lab/architecture/network-orchestration/</loc>
101
+ <lastmod>2026-02-22</lastmod>
102
+ </url>
103
+ <url>
104
+ <loc>https://madbomber.github.io/robot_lab/architecture/robot-execution/</loc>
105
+ <lastmod>2026-02-22</lastmod>
106
+ </url>
107
+ <url>
108
+ <loc>https://madbomber.github.io/robot_lab/architecture/state-management/</loc>
109
+ <lastmod>2026-02-22</lastmod>
110
+ </url>
111
+ <url>
112
+ <loc>https://madbomber.github.io/robot_lab/examples/</loc>
113
+ <lastmod>2026-02-22</lastmod>
114
+ </url>
115
+ <url>
116
+ <loc>https://madbomber.github.io/robot_lab/examples/basic-chat/</loc>
117
+ <lastmod>2026-02-22</lastmod>
118
+ </url>
119
+ <url>
120
+ <loc>https://madbomber.github.io/robot_lab/examples/mcp-server/</loc>
121
+ <lastmod>2026-02-22</lastmod>
122
+ </url>
123
+ <url>
124
+ <loc>https://madbomber.github.io/robot_lab/examples/multi-robot-network/</loc>
125
+ <lastmod>2026-02-22</lastmod>
126
+ </url>
127
+ <url>
128
+ <loc>https://madbomber.github.io/robot_lab/examples/rails-application/</loc>
129
+ <lastmod>2026-02-22</lastmod>
130
+ </url>
131
+ <url>
132
+ <loc>https://madbomber.github.io/robot_lab/examples/tool-usage/</loc>
133
+ <lastmod>2026-02-22</lastmod>
134
+ </url>
135
+ <url>
136
+ <loc>https://madbomber.github.io/robot_lab/getting-started/</loc>
137
+ <lastmod>2026-02-22</lastmod>
138
+ </url>
139
+ <url>
140
+ <loc>https://madbomber.github.io/robot_lab/getting-started/configuration/</loc>
141
+ <lastmod>2026-02-22</lastmod>
142
+ </url>
143
+ <url>
144
+ <loc>https://madbomber.github.io/robot_lab/getting-started/installation/</loc>
145
+ <lastmod>2026-02-22</lastmod>
146
+ </url>
147
+ <url>
148
+ <loc>https://madbomber.github.io/robot_lab/getting-started/quick-start/</loc>
149
+ <lastmod>2026-02-22</lastmod>
150
+ </url>
151
+ <url>
152
+ <loc>https://madbomber.github.io/robot_lab/guides/</loc>
153
+ <lastmod>2026-02-22</lastmod>
154
+ </url>
155
+ <url>
156
+ <loc>https://madbomber.github.io/robot_lab/guides/building-robots/</loc>
157
+ <lastmod>2026-02-22</lastmod>
158
+ </url>
159
+ <url>
160
+ <loc>https://madbomber.github.io/robot_lab/guides/creating-networks/</loc>
161
+ <lastmod>2026-02-22</lastmod>
162
+ </url>
163
+ <url>
164
+ <loc>https://madbomber.github.io/robot_lab/guides/mcp-integration/</loc>
165
+ <lastmod>2026-02-22</lastmod>
166
+ </url>
167
+ <url>
168
+ <loc>https://madbomber.github.io/robot_lab/guides/memory/</loc>
169
+ <lastmod>2026-02-22</lastmod>
170
+ </url>
171
+ <url>
172
+ <loc>https://madbomber.github.io/robot_lab/guides/rails-integration/</loc>
173
+ <lastmod>2026-02-22</lastmod>
174
+ </url>
175
+ <url>
176
+ <loc>https://madbomber.github.io/robot_lab/guides/streaming/</loc>
177
+ <lastmod>2026-02-22</lastmod>
178
+ </url>
179
+ <url>
180
+ <loc>https://madbomber.github.io/robot_lab/guides/using-tools/</loc>
181
+ <lastmod>2026-02-22</lastmod>
182
+ </url>
183
+ </urlset>
Binary file
data/site/tags.json ADDED
@@ -0,0 +1 @@
1
+ {"mappings": []}
data/temp.md ADDED
@@ -0,0 +1,6 @@
1
+
2
+ You: /llms gpt-5 openai
3
+
4
+ You: /llms gpt-5 openai 5.4
5
+
6
+ You: /llms gpt-5 openai 5.4 -openrouter
@@ -0,0 +1,155 @@
1
+ # ToolManifest Evolution Plan
2
+
3
+ ## Concept: Dynamic Tool Selection in Pipelines
4
+
5
+ There is a pattern where the total number of tools available within RobotLab numbers in the hundreds -- too many to send to any single LLM call. A pipeline uses a "selector" robot that reviews the next robot's prompt and determines which tools should be made available. The selected subset is then applied to the target robot via `with_tools(...)`.
6
+
7
+ ### Example Flow
8
+
9
+ ```
10
+ Selector Robot (step 1)
11
+ - Receives the user prompt destined for step 2
12
+ - Has access to a summary of all available tools (name + description)
13
+ - Outputs a list of tool names relevant to the task
14
+
15
+ Target Robot (step 2)
16
+ - Receives the selected tools via with_tools(...)
17
+ - Runs with only the relevant subset (e.g., 5-10 tools instead of hundreds)
18
+ ```
19
+
20
+ ## Current State
21
+
22
+ `ToolManifest` (lib/robot_lab/tool_manifest.rb, 218 lines) is a name-keyed Hash wrapper with:
23
+ - Lookup by name (`[]`, `fetch`)
24
+ - `Enumerable` support
25
+ - Merge/replace operations
26
+ - Serialization (`to_h`, `to_json`, `from_hash`)
27
+
28
+ It is not currently used by any production code path. `Robot` stores tools as plain arrays (`@local_tools`, `@mcp_tools`) and `all_tools` concatenates them.
29
+
30
+ ## What It Needs to Become
31
+
32
+ ### 1. Global Registry Entry Point
33
+
34
+ A singleton or module-level registry where all available tools accumulate:
35
+
36
+ ```ruby
37
+ RobotLab.tool_registry # => ToolManifest (global instance)
38
+ RobotLab.tool_registry.add(MyTool)
39
+ RobotLab.tool_registry.names # => ["my_tool", "weather", "calculator", ...]
40
+ ```
41
+
42
+ ### 2. Metadata for Selection
43
+
44
+ Categories, tags, or other metadata so the selector robot can reason about which tools are relevant without seeing full schemas:
45
+
46
+ ```ruby
47
+ # Registration with metadata
48
+ RobotLab.tool_registry.add(MyTool, tags: [:database, :read_only])
49
+
50
+ # Filtering
51
+ RobotLab.tool_registry.tagged(:database) # => subset manifest
52
+ ```
53
+
54
+ ### 3. Search-Friendly Summary Output
55
+
56
+ The selector robot needs a compact summary it can reason over -- name + description pairs, not full JSON schemas:
57
+
58
+ ```ruby
59
+ RobotLab.tool_registry.summary
60
+ # => [{ name: "get_weather", description: "Get current weather for a location" },
61
+ # { name: "calculate", description: "Performs basic arithmetic" }, ...]
62
+ ```
63
+
64
+ ### 4. Subset Extraction by Name
65
+
66
+ Resolve a list of tool names (the selector robot's output) into actual tool objects:
67
+
68
+ ```ruby
69
+ names = ["get_weather", "calculate"] # from selector robot
70
+ tools = RobotLab.tool_registry.select_by_names(names)
71
+ target_robot.with_tools(tools)
72
+ ```
73
+
74
+ ### 5. Integration with Robot
75
+
76
+ `Robot#all_tools` and `with_tools(...)` should accept a ToolManifest or be able to pull from the global registry.
77
+
78
+ ## Design Decisions Still Needed
79
+
80
+ - Should MCP-discovered tools auto-register in the global manifest?
81
+ - How does the selector robot receive the tool summary -- as part of its system prompt, injected into the user message, or via a tool call?
82
+ - Should categories/tags be defined on the Tool class itself (e.g., `Tool.create(name: ..., tags: [...])`), or only at registration time?
83
+ - Does the manifest need versioning or hot-reload support for long-running processes?
84
+
85
+ ---
86
+
87
+ ## Review Notes
88
+
89
+ ### The Problem Statement is Strong
90
+
91
+ The "selector robot" pattern — an LLM choosing tools from hundreds based on a compact summary — is a real need. Sending 200+ tool schemas in every API call is both expensive and degrades LLM accuracy. The plan correctly identifies that `ToolManifest` as it exists today is a passive container that nothing actually uses.
92
+
93
+ ### What's Solid
94
+
95
+ - **Global registry** (section 1) — The right call. Tools currently scatter across `@local_tools` and `@mcp_tools` per-robot with no central view. `RobotLab.tool_registry` is the obvious home.
96
+ - **Summary output** (section 3) — Essential for the selector pattern. Name + description pairs are the right granularity for LLM reasoning.
97
+ - **Subset extraction** (section 4) — `select_by_names` maps cleanly to what `ToolConfig.filter_tools` already does, but at the registry level.
98
+
99
+ ### Gaps and Concerns
100
+
101
+ **1. Tags/metadata may be premature.**
102
+
103
+ Section 2 proposes tags (`tags: [:database, :read_only]`) and `.tagged(:database)` filtering. This adds a classification system that someone has to maintain. In the selector-robot pattern, the LLM is doing the classification — that's the whole point. If you also hand-tag tools, you're duplicating the selector's job.
104
+
105
+ A simpler alternative: let `summary` be the only interface the selector sees. If you later want pre-filtering (e.g., "only show the selector database-related tools"), add it then. Right now it's YAGNI.
106
+
107
+ **2. MCP tool auto-registration is the key decision, not a footnote.**
108
+
109
+ The plan lists "Should MCP-discovered tools auto-register in the global manifest?" as an open question. This is actually the central architectural decision. Looking at `MCPManagement#discover_mcp_tools`, MCP tools are created dynamically per-robot, per-connection. They hold closures over their specific `mcp_client` instance. If you auto-register them globally, you need to handle:
110
+
111
+ - **Lifecycle** — MCP tools are only valid while their client is connected. The global registry would hold dead references after `disconnect`.
112
+ - **Duplicates** — Two robots connecting to the same MCP server would register the same tool names with different client closures.
113
+ - **Scope** — An MCP tool created for robot A shouldn't be callable by robot B unless they share the client.
114
+
115
+ Suggestion: MCP tools should **not** auto-register. The global registry should hold "tool definitions" (name, description, schema) — not live callable instances. The selector robot picks names; the target robot resolves those names against its own live tools.
116
+
117
+ **3. The plan doesn't address the split between "tool definition" and "tool instance."**
118
+
119
+ Currently `Tool` is both the definition (name, description, parameters) and the callable (the `execute` method with its closure). For a global registry, you want the definition without the closure. The selector robot doesn't need to call tools — it just needs to read summaries and output names.
120
+
121
+ This suggests `ToolManifest` should store lightweight descriptors, and `Robot#filtered_tools` continues resolving names to live instances from `all_tools`.
122
+
123
+ **4. Integration with `Robot#with_tools` needs more thought.**
124
+
125
+ The plan says "`with_tools(...)` should accept a ToolManifest." But `with_tools` currently delegates to `@chat.with_tools` from RubyLLM, which expects tool class/instance objects. Accepting a manifest means either:
126
+
127
+ - Converting manifest entries back to tool instances (requires the live tool lookup), or
128
+ - Passing tool names and letting the robot resolve internally (which is what `filtered_tools` already does)
129
+
130
+ The second path is simpler and already mostly works. The plan could just say: "The selector robot outputs tool names. Pass them to `robot.run(..., tools: names)`." That's the existing `tools:` parameter.
131
+
132
+ **5. Missing: how the selector robot itself gets built.**
133
+
134
+ The plan describes the pattern but not the API. Is this a special network task type? A built-in robot template? A method on `ToolManifest`? Something like:
135
+
136
+ ```ruby
137
+ network = RobotLab.create_network(name: "smart_pipeline") do
138
+ task :selector, selector_robot, depends_on: :none
139
+ task :worker, worker_robot, tools: :from_selector, depends_on: [:selector]
140
+ end
141
+ ```
142
+
143
+ The `tools: :from_selector` (or similar) is the glue that needs designing.
144
+
145
+ ### Suggested Simplification
146
+
147
+ Instead of evolving ToolManifest into a full registry with tags, a narrower v1:
148
+
149
+ 1. **`RobotLab.tool_registry`** — Global `ToolManifest` that accumulates tool descriptors (name + description only, no live instances)
150
+ 2. **`ToolManifest#summary`** — Returns the compact format for selector prompts
151
+ 3. **`ToolManifest#select_by_names(names)`** — Returns a sub-manifest (already close to what exists)
152
+ 4. **Auto-registration of local tools at `Robot.new`** — Push descriptors into the registry when robots are created
153
+ 5. **No auto-registration of MCP tools** — Too coupled to connection lifecycle
154
+
155
+ Skip tags, skip `with_tools(manifest)` integration, skip hot-reload. Those can come later if needed.