agent-orcha 0.0.4 → 0.0.7

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 (554) hide show
  1. package/README.md +216 -1323
  2. package/dist/lib/agents/agent-executor.d.ts +15 -4
  3. package/dist/lib/agents/agent-executor.d.ts.map +1 -1
  4. package/dist/lib/agents/agent-executor.js +337 -87
  5. package/dist/lib/agents/agent-executor.js.map +1 -1
  6. package/dist/lib/agents/agent-loader.d.ts +4 -1
  7. package/dist/lib/agents/agent-loader.d.ts.map +1 -1
  8. package/dist/lib/agents/agent-loader.js +20 -4
  9. package/dist/lib/agents/agent-loader.js.map +1 -1
  10. package/dist/lib/agents/index.d.ts +5 -5
  11. package/dist/lib/agents/index.js +4 -4
  12. package/dist/lib/agents/react-loop.d.ts +30 -0
  13. package/dist/lib/agents/react-loop.d.ts.map +1 -0
  14. package/dist/lib/agents/react-loop.js +193 -0
  15. package/dist/lib/agents/react-loop.js.map +1 -0
  16. package/dist/lib/agents/structured-output-wrapper.d.ts +3 -3
  17. package/dist/lib/agents/structured-output-wrapper.d.ts.map +1 -1
  18. package/dist/lib/agents/structured-output-wrapper.js +2 -2
  19. package/dist/lib/agents/structured-output-wrapper.js.map +1 -1
  20. package/dist/lib/agents/types.d.ts +306 -19
  21. package/dist/lib/agents/types.d.ts.map +1 -1
  22. package/dist/lib/agents/types.js +34 -4
  23. package/dist/lib/agents/types.js.map +1 -1
  24. package/dist/lib/functions/function-loader.d.ts +3 -1
  25. package/dist/lib/functions/function-loader.d.ts.map +1 -1
  26. package/dist/lib/functions/function-loader.js +23 -5
  27. package/dist/lib/functions/function-loader.js.map +1 -1
  28. package/dist/lib/functions/index.d.ts +2 -2
  29. package/dist/lib/functions/index.js +1 -1
  30. package/dist/lib/functions/simple-function-wrapper.d.ts +2 -11
  31. package/dist/lib/functions/simple-function-wrapper.d.ts.map +1 -1
  32. package/dist/lib/functions/simple-function-wrapper.js +3 -3
  33. package/dist/lib/functions/simple-function-wrapper.js.map +1 -1
  34. package/dist/lib/index.d.ts +29 -17
  35. package/dist/lib/index.d.ts.map +1 -1
  36. package/dist/lib/index.js +21 -9
  37. package/dist/lib/index.js.map +1 -1
  38. package/dist/lib/integrations/collabnook.d.ts +56 -0
  39. package/dist/lib/integrations/collabnook.d.ts.map +1 -0
  40. package/dist/lib/integrations/collabnook.js +307 -0
  41. package/dist/lib/integrations/collabnook.js.map +1 -0
  42. package/dist/lib/integrations/email.d.ts +38 -0
  43. package/dist/lib/integrations/email.d.ts.map +1 -0
  44. package/dist/lib/integrations/email.js +249 -0
  45. package/dist/lib/integrations/email.js.map +1 -0
  46. package/dist/lib/integrations/integration-manager.d.ts +19 -0
  47. package/dist/lib/integrations/integration-manager.d.ts.map +1 -0
  48. package/dist/lib/integrations/integration-manager.js +159 -0
  49. package/dist/lib/integrations/integration-manager.js.map +1 -0
  50. package/dist/lib/integrations/types.d.ts +232 -0
  51. package/dist/lib/integrations/types.d.ts.map +1 -0
  52. package/dist/lib/integrations/types.js +37 -0
  53. package/dist/lib/integrations/types.js.map +1 -0
  54. package/dist/lib/knowledge/direct-mapper.d.ts +21 -0
  55. package/dist/lib/knowledge/direct-mapper.d.ts.map +1 -0
  56. package/dist/lib/knowledge/direct-mapper.js +134 -0
  57. package/dist/lib/knowledge/direct-mapper.js.map +1 -0
  58. package/dist/lib/knowledge/index.d.ts +9 -8
  59. package/dist/lib/knowledge/index.d.ts.map +1 -1
  60. package/dist/lib/knowledge/index.js +9 -7
  61. package/dist/lib/knowledge/index.js.map +1 -1
  62. package/dist/lib/knowledge/knowledge-store-metadata.d.ts +40 -0
  63. package/dist/lib/knowledge/knowledge-store-metadata.d.ts.map +1 -0
  64. package/dist/lib/knowledge/knowledge-store-metadata.js +93 -0
  65. package/dist/lib/knowledge/knowledge-store-metadata.js.map +1 -0
  66. package/dist/lib/knowledge/knowledge-store.d.ts +49 -0
  67. package/dist/lib/knowledge/knowledge-store.d.ts.map +1 -0
  68. package/dist/lib/knowledge/knowledge-store.js +670 -0
  69. package/dist/lib/knowledge/knowledge-store.js.map +1 -0
  70. package/dist/lib/knowledge/loaders/database-loader.d.ts +5 -5
  71. package/dist/lib/knowledge/loaders/database-loader.d.ts.map +1 -1
  72. package/dist/lib/knowledge/loaders/database-loader.js +21 -10
  73. package/dist/lib/knowledge/loaders/database-loader.js.map +1 -1
  74. package/dist/lib/knowledge/loaders/file-loaders.d.ts +45 -0
  75. package/dist/lib/knowledge/loaders/file-loaders.d.ts.map +1 -0
  76. package/dist/lib/knowledge/loaders/file-loaders.js +160 -0
  77. package/dist/lib/knowledge/loaders/file-loaders.js.map +1 -0
  78. package/dist/lib/knowledge/loaders/index.d.ts +3 -3
  79. package/dist/lib/knowledge/loaders/index.d.ts.map +1 -1
  80. package/dist/lib/knowledge/loaders/index.js +3 -3
  81. package/dist/lib/knowledge/loaders/index.js.map +1 -1
  82. package/dist/lib/knowledge/loaders/web-loader.d.ts +14 -5
  83. package/dist/lib/knowledge/loaders/web-loader.d.ts.map +1 -1
  84. package/dist/lib/knowledge/loaders/web-loader.js +64 -29
  85. package/dist/lib/knowledge/loaders/web-loader.js.map +1 -1
  86. package/dist/lib/knowledge/sqlite-store.d.ts +107 -0
  87. package/dist/lib/knowledge/sqlite-store.d.ts.map +1 -0
  88. package/dist/lib/knowledge/sqlite-store.js +327 -0
  89. package/dist/lib/knowledge/sqlite-store.js.map +1 -0
  90. package/dist/lib/knowledge/types.d.ts +124 -1448
  91. package/dist/lib/knowledge/types.d.ts.map +1 -1
  92. package/dist/lib/knowledge/types.js +54 -60
  93. package/dist/lib/knowledge/types.js.map +1 -1
  94. package/dist/lib/knowledge/utils/connection-pool.d.ts +3 -2
  95. package/dist/lib/knowledge/utils/connection-pool.d.ts.map +1 -1
  96. package/dist/lib/knowledge/utils/connection-pool.js +20 -10
  97. package/dist/lib/knowledge/utils/connection-pool.js.map +1 -1
  98. package/dist/lib/knowledge/utils/index.d.ts +2 -2
  99. package/dist/lib/knowledge/utils/index.js +2 -2
  100. package/dist/lib/llm/index.d.ts +5 -5
  101. package/dist/lib/llm/index.d.ts.map +1 -1
  102. package/dist/lib/llm/index.js +3 -3
  103. package/dist/lib/llm/index.js.map +1 -1
  104. package/dist/lib/llm/llm-call-logger.d.ts +39 -0
  105. package/dist/lib/llm/llm-call-logger.d.ts.map +1 -0
  106. package/dist/lib/llm/llm-call-logger.js +110 -0
  107. package/dist/lib/llm/llm-call-logger.js.map +1 -0
  108. package/dist/lib/llm/llm-config.d.ts +30 -16
  109. package/dist/lib/llm/llm-config.d.ts.map +1 -1
  110. package/dist/lib/llm/llm-config.js +22 -4
  111. package/dist/lib/llm/llm-config.js.map +1 -1
  112. package/dist/lib/llm/llm-factory.d.ts +3 -16
  113. package/dist/lib/llm/llm-factory.d.ts.map +1 -1
  114. package/dist/lib/llm/llm-factory.js +33 -48
  115. package/dist/lib/llm/llm-factory.js.map +1 -1
  116. package/dist/lib/llm/provider-detector.d.ts +1 -1
  117. package/dist/lib/llm/providers/anthropic-chat-model.d.ts +31 -0
  118. package/dist/lib/llm/providers/anthropic-chat-model.d.ts.map +1 -0
  119. package/dist/lib/llm/providers/anthropic-chat-model.js +262 -0
  120. package/dist/lib/llm/providers/anthropic-chat-model.js.map +1 -0
  121. package/dist/lib/llm/providers/gemini-chat-model.d.ts +30 -0
  122. package/dist/lib/llm/providers/gemini-chat-model.d.ts.map +1 -0
  123. package/dist/lib/llm/providers/gemini-chat-model.js +300 -0
  124. package/dist/lib/llm/providers/gemini-chat-model.js.map +1 -0
  125. package/dist/lib/llm/providers/gemini-embeddings.d.ts +14 -0
  126. package/dist/lib/llm/providers/gemini-embeddings.d.ts.map +1 -0
  127. package/dist/lib/llm/providers/gemini-embeddings.js +20 -0
  128. package/dist/lib/llm/providers/gemini-embeddings.js.map +1 -0
  129. package/dist/lib/llm/providers/openai-chat-model.d.ts +39 -0
  130. package/dist/lib/llm/providers/openai-chat-model.d.ts.map +1 -0
  131. package/dist/lib/llm/providers/openai-chat-model.js +397 -0
  132. package/dist/lib/llm/providers/openai-chat-model.js.map +1 -0
  133. package/dist/lib/llm/providers/openai-embeddings.d.ts +17 -0
  134. package/dist/lib/llm/providers/openai-embeddings.d.ts.map +1 -0
  135. package/dist/lib/llm/providers/openai-embeddings.js +35 -0
  136. package/dist/lib/llm/providers/openai-embeddings.js.map +1 -0
  137. package/dist/lib/llm/types.d.ts +2 -2
  138. package/dist/lib/llm/types.js +1 -1
  139. package/dist/lib/logger.d.ts +7 -0
  140. package/dist/lib/logger.d.ts.map +1 -1
  141. package/dist/lib/logger.js +42 -4
  142. package/dist/lib/logger.js.map +1 -1
  143. package/dist/lib/mcp/index.d.ts +3 -3
  144. package/dist/lib/mcp/index.js +2 -2
  145. package/dist/lib/mcp/mcp-client.d.ts +3 -2
  146. package/dist/lib/mcp/mcp-client.d.ts.map +1 -1
  147. package/dist/lib/mcp/mcp-client.js +10 -5
  148. package/dist/lib/mcp/mcp-client.js.map +1 -1
  149. package/dist/lib/mcp/types.d.ts +26 -25
  150. package/dist/lib/mcp/types.d.ts.map +1 -1
  151. package/dist/lib/mcp/types.js +12 -4
  152. package/dist/lib/mcp/types.js.map +1 -1
  153. package/dist/lib/memory/conversation-store.d.ts +2 -2
  154. package/dist/lib/memory/conversation-store.d.ts.map +1 -1
  155. package/dist/lib/memory/conversation-store.js +1 -1
  156. package/dist/lib/memory/index.d.ts +3 -2
  157. package/dist/lib/memory/index.d.ts.map +1 -1
  158. package/dist/lib/memory/index.js +3 -2
  159. package/dist/lib/memory/index.js.map +1 -1
  160. package/dist/lib/memory/memory-manager.d.ts +10 -0
  161. package/dist/lib/memory/memory-manager.d.ts.map +1 -0
  162. package/dist/lib/memory/memory-manager.js +43 -0
  163. package/dist/lib/memory/memory-manager.js.map +1 -0
  164. package/dist/lib/memory/types.d.ts +1 -1
  165. package/dist/lib/memory/types.d.ts.map +1 -1
  166. package/dist/lib/orchestrator.d.ts +72 -18
  167. package/dist/lib/orchestrator.d.ts.map +1 -1
  168. package/dist/lib/orchestrator.js +341 -56
  169. package/dist/lib/orchestrator.js.map +1 -1
  170. package/dist/lib/sandbox/cdp-client.d.ts +14 -0
  171. package/dist/lib/sandbox/cdp-client.d.ts.map +1 -0
  172. package/dist/lib/sandbox/cdp-client.js +113 -0
  173. package/dist/lib/sandbox/cdp-client.js.map +1 -0
  174. package/dist/lib/sandbox/html-to-markdown.d.ts +10 -0
  175. package/dist/lib/sandbox/html-to-markdown.d.ts.map +1 -0
  176. package/dist/lib/sandbox/html-to-markdown.js +121 -0
  177. package/dist/lib/sandbox/html-to-markdown.js.map +1 -0
  178. package/dist/lib/sandbox/index.d.ts +12 -0
  179. package/dist/lib/sandbox/index.d.ts.map +1 -0
  180. package/dist/lib/sandbox/index.js +10 -0
  181. package/dist/lib/sandbox/index.js.map +1 -0
  182. package/dist/lib/sandbox/page-readiness.d.ts +37 -0
  183. package/dist/lib/sandbox/page-readiness.d.ts.map +1 -0
  184. package/dist/lib/sandbox/page-readiness.js +235 -0
  185. package/dist/lib/sandbox/page-readiness.js.map +1 -0
  186. package/dist/lib/sandbox/sandbox-browser.d.ts +4 -0
  187. package/dist/lib/sandbox/sandbox-browser.d.ts.map +1 -0
  188. package/dist/lib/sandbox/sandbox-browser.js +303 -0
  189. package/dist/lib/sandbox/sandbox-browser.js.map +1 -0
  190. package/dist/lib/sandbox/sandbox-exec.d.ts +5 -0
  191. package/dist/lib/sandbox/sandbox-exec.d.ts.map +1 -0
  192. package/dist/lib/sandbox/sandbox-exec.js +35 -0
  193. package/dist/lib/sandbox/sandbox-exec.js.map +1 -0
  194. package/dist/lib/sandbox/sandbox-file.d.ts +4 -0
  195. package/dist/lib/sandbox/sandbox-file.d.ts.map +1 -0
  196. package/dist/lib/sandbox/sandbox-file.js +168 -0
  197. package/dist/lib/sandbox/sandbox-file.js.map +1 -0
  198. package/dist/lib/sandbox/sandbox-shell.d.ts +4 -0
  199. package/dist/lib/sandbox/sandbox-shell.d.ts.map +1 -0
  200. package/dist/lib/sandbox/sandbox-shell.js +93 -0
  201. package/dist/lib/sandbox/sandbox-shell.js.map +1 -0
  202. package/dist/lib/sandbox/sandbox-web.d.ts +5 -0
  203. package/dist/lib/sandbox/sandbox-web.d.ts.map +1 -0
  204. package/dist/lib/sandbox/sandbox-web.js +226 -0
  205. package/dist/lib/sandbox/sandbox-web.js.map +1 -0
  206. package/dist/lib/sandbox/types.d.ts +30 -0
  207. package/dist/lib/sandbox/types.d.ts.map +1 -0
  208. package/dist/lib/sandbox/types.js +8 -0
  209. package/dist/lib/sandbox/types.js.map +1 -0
  210. package/dist/lib/sandbox/vision-browser.d.ts +4 -0
  211. package/dist/lib/sandbox/vision-browser.d.ts.map +1 -0
  212. package/dist/lib/sandbox/vision-browser.js +289 -0
  213. package/dist/lib/sandbox/vision-browser.js.map +1 -0
  214. package/dist/lib/sandbox/vm-executor.d.ts +12 -0
  215. package/dist/lib/sandbox/vm-executor.d.ts.map +1 -0
  216. package/dist/lib/sandbox/vm-executor.js +101 -0
  217. package/dist/lib/sandbox/vm-executor.js.map +1 -0
  218. package/dist/lib/skills/index.d.ts +4 -0
  219. package/dist/lib/skills/index.d.ts.map +1 -0
  220. package/dist/lib/skills/index.js +3 -0
  221. package/dist/lib/skills/index.js.map +1 -0
  222. package/dist/lib/skills/skill-loader.d.ts +21 -0
  223. package/dist/lib/skills/skill-loader.d.ts.map +1 -0
  224. package/dist/lib/skills/skill-loader.js +116 -0
  225. package/dist/lib/skills/skill-loader.js.map +1 -0
  226. package/dist/lib/skills/types.d.ts +17 -0
  227. package/dist/lib/skills/types.d.ts.map +1 -0
  228. package/dist/lib/skills/types.js +6 -0
  229. package/dist/lib/skills/types.js.map +1 -0
  230. package/dist/lib/tasks/index.d.ts +4 -0
  231. package/dist/lib/tasks/index.d.ts.map +1 -0
  232. package/dist/lib/tasks/index.js +4 -0
  233. package/dist/lib/tasks/index.js.map +1 -0
  234. package/dist/lib/tasks/task-manager.d.ts +27 -0
  235. package/dist/lib/tasks/task-manager.d.ts.map +1 -0
  236. package/dist/lib/tasks/task-manager.js +200 -0
  237. package/dist/lib/tasks/task-manager.js.map +1 -0
  238. package/dist/lib/tasks/task-store.d.ts +20 -0
  239. package/dist/lib/tasks/task-store.d.ts.map +1 -0
  240. package/dist/lib/tasks/task-store.js +102 -0
  241. package/dist/lib/tasks/task-store.js.map +1 -0
  242. package/dist/lib/tasks/types.d.ts +56 -0
  243. package/dist/lib/tasks/types.d.ts.map +1 -0
  244. package/dist/lib/tasks/types.js +2 -0
  245. package/dist/lib/tasks/types.js.map +1 -0
  246. package/dist/lib/templates/resource-templates.d.ts +6 -0
  247. package/dist/lib/templates/resource-templates.d.ts.map +1 -0
  248. package/dist/lib/templates/resource-templates.js +146 -0
  249. package/dist/lib/templates/resource-templates.js.map +1 -0
  250. package/dist/lib/tools/agent-tool-wrapper.d.ts +5 -5
  251. package/dist/lib/tools/agent-tool-wrapper.js +3 -3
  252. package/dist/lib/tools/agent-tool-wrapper.js.map +1 -1
  253. package/dist/lib/tools/built-in/ask-user.tool.d.ts +1 -1
  254. package/dist/lib/tools/built-in/ask-user.tool.d.ts.map +1 -1
  255. package/dist/lib/tools/built-in/ask-user.tool.js +2 -2
  256. package/dist/lib/tools/built-in/ask-user.tool.js.map +1 -1
  257. package/dist/lib/tools/built-in/index.d.ts +9 -2
  258. package/dist/lib/tools/built-in/index.d.ts.map +1 -1
  259. package/dist/lib/tools/built-in/index.js +9 -2
  260. package/dist/lib/tools/built-in/index.js.map +1 -1
  261. package/dist/lib/tools/built-in/integration-tools.d.ts +4 -0
  262. package/dist/lib/tools/built-in/integration-tools.d.ts.map +1 -0
  263. package/dist/lib/tools/built-in/integration-tools.js +47 -0
  264. package/dist/lib/tools/built-in/integration-tools.js.map +1 -0
  265. package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts +9 -0
  266. package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts.map +1 -0
  267. package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js +108 -0
  268. package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js.map +1 -0
  269. package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts +9 -0
  270. package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts.map +1 -0
  271. package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js +96 -0
  272. package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js.map +1 -0
  273. package/dist/lib/tools/built-in/knowledge-search.tool.d.ts +2 -2
  274. package/dist/lib/tools/built-in/knowledge-search.tool.d.ts.map +1 -1
  275. package/dist/lib/tools/built-in/knowledge-search.tool.js +1 -1
  276. package/dist/lib/tools/built-in/knowledge-search.tool.js.map +1 -1
  277. package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts +7 -0
  278. package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts.map +1 -0
  279. package/dist/lib/tools/built-in/knowledge-sql.tool.js +128 -0
  280. package/dist/lib/tools/built-in/knowledge-sql.tool.js.map +1 -0
  281. package/dist/lib/tools/built-in/knowledge-tools-factory.d.ts +17 -0
  282. package/dist/lib/tools/built-in/knowledge-tools-factory.d.ts.map +1 -0
  283. package/dist/lib/tools/built-in/knowledge-tools-factory.js +54 -0
  284. package/dist/lib/tools/built-in/knowledge-tools-factory.js.map +1 -0
  285. package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts +9 -0
  286. package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts.map +1 -0
  287. package/dist/lib/tools/built-in/knowledge-traverse.tool.js +91 -0
  288. package/dist/lib/tools/built-in/knowledge-traverse.tool.js.map +1 -0
  289. package/dist/lib/tools/built-in/memory-save.tool.d.ts +4 -0
  290. package/dist/lib/tools/built-in/memory-save.tool.d.ts.map +1 -0
  291. package/dist/lib/tools/built-in/memory-save.tool.js +21 -0
  292. package/dist/lib/tools/built-in/memory-save.tool.js.map +1 -0
  293. package/dist/lib/tools/built-in/query-validators.d.ts +18 -0
  294. package/dist/lib/tools/built-in/query-validators.d.ts.map +1 -0
  295. package/dist/lib/tools/built-in/query-validators.js +91 -0
  296. package/dist/lib/tools/built-in/query-validators.js.map +1 -0
  297. package/dist/lib/tools/index.d.ts +4 -4
  298. package/dist/lib/tools/index.js +4 -4
  299. package/dist/lib/tools/tool-discovery.d.ts +11 -33
  300. package/dist/lib/tools/tool-discovery.d.ts.map +1 -1
  301. package/dist/lib/tools/tool-discovery.js +16 -43
  302. package/dist/lib/tools/tool-discovery.js.map +1 -1
  303. package/dist/lib/tools/tool-registry.d.ts +10 -18
  304. package/dist/lib/tools/tool-registry.d.ts.map +1 -1
  305. package/dist/lib/tools/tool-registry.js +37 -23
  306. package/dist/lib/tools/tool-registry.js.map +1 -1
  307. package/dist/lib/tools/workspace/workspace-tools.d.ts +61 -0
  308. package/dist/lib/tools/workspace/workspace-tools.d.ts.map +1 -0
  309. package/dist/lib/tools/workspace/workspace-tools.js +179 -0
  310. package/dist/lib/tools/workspace/workspace-tools.js.map +1 -0
  311. package/dist/lib/triggers/cron-trigger.d.ts +12 -0
  312. package/dist/lib/triggers/cron-trigger.d.ts.map +1 -0
  313. package/dist/lib/triggers/cron-trigger.js +45 -0
  314. package/dist/lib/triggers/cron-trigger.js.map +1 -0
  315. package/dist/lib/triggers/index.d.ts +6 -0
  316. package/dist/lib/triggers/index.d.ts.map +1 -0
  317. package/dist/lib/triggers/index.js +5 -0
  318. package/dist/lib/triggers/index.js.map +1 -0
  319. package/dist/lib/triggers/trigger-manager.d.ts +12 -0
  320. package/dist/lib/triggers/trigger-manager.d.ts.map +1 -0
  321. package/dist/lib/triggers/trigger-manager.js +77 -0
  322. package/dist/lib/triggers/trigger-manager.js.map +1 -0
  323. package/dist/lib/triggers/types.d.ts +57 -0
  324. package/dist/lib/triggers/types.d.ts.map +1 -0
  325. package/dist/lib/triggers/types.js +16 -0
  326. package/dist/lib/triggers/types.js.map +1 -0
  327. package/dist/lib/triggers/webhook-trigger.d.ts +12 -0
  328. package/dist/lib/triggers/webhook-trigger.d.ts.map +1 -0
  329. package/dist/lib/triggers/webhook-trigger.js +34 -0
  330. package/dist/lib/triggers/webhook-trigger.js.map +1 -0
  331. package/dist/lib/types/llm-types.d.ts +72 -0
  332. package/dist/lib/types/llm-types.d.ts.map +1 -0
  333. package/dist/lib/types/llm-types.js +72 -0
  334. package/dist/lib/types/llm-types.js.map +1 -0
  335. package/dist/lib/types/text-splitters.d.ts +27 -0
  336. package/dist/lib/types/text-splitters.d.ts.map +1 -0
  337. package/dist/lib/types/text-splitters.js +114 -0
  338. package/dist/lib/types/text-splitters.js.map +1 -0
  339. package/dist/lib/types/tool-factory.d.ts +9 -0
  340. package/dist/lib/types/tool-factory.d.ts.map +1 -0
  341. package/dist/lib/types/tool-factory.js +12 -0
  342. package/dist/lib/types/tool-factory.js.map +1 -0
  343. package/dist/lib/utils/env-substitution.d.ts +6 -0
  344. package/dist/lib/utils/env-substitution.d.ts.map +1 -0
  345. package/dist/lib/utils/env-substitution.js +15 -0
  346. package/dist/lib/utils/env-substitution.js.map +1 -0
  347. package/dist/lib/utils/file-utils.d.ts +11 -0
  348. package/dist/lib/utils/file-utils.d.ts.map +1 -0
  349. package/dist/lib/utils/file-utils.js +86 -0
  350. package/dist/lib/utils/file-utils.js.map +1 -0
  351. package/dist/lib/workflows/index.d.ts +6 -6
  352. package/dist/lib/workflows/index.d.ts.map +1 -1
  353. package/dist/lib/workflows/index.js +5 -5
  354. package/dist/lib/workflows/index.js.map +1 -1
  355. package/dist/lib/workflows/interrupt-manager.d.ts +1 -1
  356. package/dist/lib/workflows/interrupt-manager.js +1 -1
  357. package/dist/lib/workflows/react-workflow-executor.d.ts +26 -0
  358. package/dist/lib/workflows/react-workflow-executor.d.ts.map +1 -0
  359. package/dist/lib/workflows/react-workflow-executor.js +333 -0
  360. package/dist/lib/workflows/react-workflow-executor.js.map +1 -0
  361. package/dist/lib/workflows/types.d.ts +106 -107
  362. package/dist/lib/workflows/types.d.ts.map +1 -1
  363. package/dist/lib/workflows/types.js +5 -5
  364. package/dist/lib/workflows/types.js.map +1 -1
  365. package/dist/lib/workflows/workflow-executor.d.ts +3 -3
  366. package/dist/lib/workflows/workflow-executor.js +2 -2
  367. package/dist/lib/workflows/workflow-executor.js.map +1 -1
  368. package/dist/lib/workflows/workflow-loader.d.ts +4 -1
  369. package/dist/lib/workflows/workflow-loader.d.ts.map +1 -1
  370. package/dist/lib/workflows/workflow-loader.js +20 -4
  371. package/dist/lib/workflows/workflow-loader.js.map +1 -1
  372. package/dist/public/chat.html +114 -0
  373. package/dist/public/index.html +189 -0
  374. package/dist/public/src/components/AgentComposer.js +807 -0
  375. package/dist/public/src/components/AgentsView.js +1021 -344
  376. package/dist/public/src/components/AppRoot.js +150 -5
  377. package/dist/public/src/components/GraphView.js +420 -0
  378. package/dist/public/src/components/IdeView.js +625 -14
  379. package/dist/public/src/components/KnowledgeView.js +443 -66
  380. package/dist/public/src/components/MonitorView.js +526 -0
  381. package/dist/public/src/components/NavBar.js +3 -0
  382. package/dist/public/src/components/SkillsView.js +137 -0
  383. package/dist/public/src/components/StandaloneChat.js +889 -0
  384. package/dist/public/src/components/WorkflowsView.js +454 -129
  385. package/dist/public/src/services/ApiService.js +170 -25
  386. package/dist/public/src/services/SessionStore.js +83 -0
  387. package/dist/public/src/store.js +3 -4
  388. package/dist/public/src/utils/markdown.js +14 -0
  389. package/dist/src/cli/commands/init.js +2 -2
  390. package/dist/src/cli/commands/init.js.map +1 -1
  391. package/dist/src/cli/commands/start.d.ts +0 -1
  392. package/dist/src/cli/commands/start.d.ts.map +1 -1
  393. package/dist/src/cli/commands/start.js +23 -14
  394. package/dist/src/cli/commands/start.js.map +1 -1
  395. package/dist/src/cli/index.js +8 -5
  396. package/dist/src/cli/index.js.map +1 -1
  397. package/dist/src/index.d.ts +1 -1
  398. package/dist/src/index.d.ts.map +1 -1
  399. package/dist/src/index.js +23 -9
  400. package/dist/src/index.js.map +1 -1
  401. package/dist/src/middleware/auth.d.ts +3 -0
  402. package/dist/src/middleware/auth.d.ts.map +1 -0
  403. package/dist/src/middleware/auth.js +129 -0
  404. package/dist/src/middleware/auth.js.map +1 -0
  405. package/dist/src/middleware/rate-limit.d.ts +8 -0
  406. package/dist/src/middleware/rate-limit.d.ts.map +1 -0
  407. package/dist/src/middleware/rate-limit.js +21 -0
  408. package/dist/src/middleware/rate-limit.js.map +1 -0
  409. package/dist/src/routes/agents.route.d.ts.map +1 -1
  410. package/dist/src/routes/agents.route.js +167 -12
  411. package/dist/src/routes/agents.route.js.map +1 -1
  412. package/dist/src/routes/chat.route.d.ts +3 -0
  413. package/dist/src/routes/chat.route.d.ts.map +1 -0
  414. package/dist/src/routes/chat.route.js +155 -0
  415. package/dist/src/routes/chat.route.js.map +1 -0
  416. package/dist/src/routes/files.route.d.ts.map +1 -1
  417. package/dist/src/routes/files.route.js +163 -87
  418. package/dist/src/routes/files.route.js.map +1 -1
  419. package/dist/src/routes/functions.route.js +1 -1
  420. package/dist/src/routes/graph.route.d.ts +3 -0
  421. package/dist/src/routes/graph.route.d.ts.map +1 -0
  422. package/dist/src/routes/graph.route.js +173 -0
  423. package/dist/src/routes/graph.route.js.map +1 -0
  424. package/dist/src/routes/knowledge.route.d.ts.map +1 -1
  425. package/dist/src/routes/knowledge.route.js +172 -69
  426. package/dist/src/routes/knowledge.route.js.map +1 -1
  427. package/dist/src/routes/llm.route.d.ts.map +1 -1
  428. package/dist/src/routes/llm.route.js +85 -9
  429. package/dist/src/routes/llm.route.js.map +1 -1
  430. package/dist/src/routes/mcp.route.js +1 -1
  431. package/dist/src/routes/skills.route.d.ts +3 -0
  432. package/dist/src/routes/skills.route.d.ts.map +1 -0
  433. package/dist/src/routes/skills.route.js +23 -0
  434. package/dist/src/routes/skills.route.js.map +1 -0
  435. package/dist/src/routes/tasks.route.d.ts +3 -0
  436. package/dist/src/routes/tasks.route.d.ts.map +1 -0
  437. package/dist/src/routes/tasks.route.js +149 -0
  438. package/dist/src/routes/tasks.route.js.map +1 -0
  439. package/dist/src/routes/vnc.route.d.ts +3 -0
  440. package/dist/src/routes/vnc.route.d.ts.map +1 -0
  441. package/dist/src/routes/vnc.route.js +49 -0
  442. package/dist/src/routes/vnc.route.js.map +1 -0
  443. package/dist/src/routes/workflows.route.d.ts.map +1 -1
  444. package/dist/src/routes/workflows.route.js +9 -1
  445. package/dist/src/routes/workflows.route.js.map +1 -1
  446. package/dist/src/server.d.ts +1 -1
  447. package/dist/src/server.d.ts.map +1 -1
  448. package/dist/src/server.js +26 -9
  449. package/dist/src/server.js.map +1 -1
  450. package/dist/templates/.env.example +4 -19
  451. package/dist/templates/Demo.md +152 -0
  452. package/dist/templates/README.md +28 -11
  453. package/dist/templates/agents/architect.agent.yaml +57 -0
  454. package/dist/templates/agents/chatbot.agent.yaml +55 -0
  455. package/dist/templates/agents/corporate.agent.yaml +65 -0
  456. package/dist/templates/agents/investment-analyst.agent.yaml +80 -0
  457. package/dist/templates/agents/music-librarian.agent.yaml +70 -0
  458. package/dist/templates/agents/network-security.agent.yaml +82 -0
  459. package/dist/templates/agents/transport-security.agent.yaml +70 -0
  460. package/dist/templates/agents/web-engineer.agent.yaml +99 -0
  461. package/dist/templates/agents/web-pilot.agent.yaml +58 -0
  462. package/dist/templates/knowledge/music-store/LICENSE.md +11 -0
  463. package/dist/templates/knowledge/music-store/musicstore.sqlite +0 -0
  464. package/dist/templates/knowledge/music-store/tables.png +0 -0
  465. package/dist/templates/knowledge/music-store.knowledge.yaml +138 -0
  466. package/dist/templates/knowledge/org-chart/personnel.csv +21 -0
  467. package/dist/templates/knowledge/org-chart.knowledge.yaml +53 -0
  468. package/dist/templates/knowledge/pet-store/pet-store.db +0 -0
  469. package/dist/templates/knowledge/pet-store.knowledge.yaml +81 -0
  470. package/dist/templates/knowledge/security-incidents/incidents.json +55935 -0
  471. package/dist/templates/knowledge/security-incidents.knowledge.yaml +46 -0
  472. package/dist/templates/knowledge/transcripts.knowledge.yaml +29 -0
  473. package/dist/templates/knowledge/transport-ot/systems.csv +117 -0
  474. package/dist/templates/knowledge/transport-ot.knowledge.yaml +55 -0
  475. package/dist/templates/knowledge/web-docs.knowledge.yaml +20 -0
  476. package/dist/templates/llm.json +7 -30
  477. package/dist/templates/mcp.json +10 -4
  478. package/dist/templates/skills/orcha-builder/SKILL.md +219 -0
  479. package/dist/templates/skills/pii-guard/SKILL.md +22 -0
  480. package/dist/templates/skills/sandbox/SKILL.md +40 -0
  481. package/dist/templates/skills/web-pilot/SKILL.md +51 -0
  482. package/dist/templates/workflows/example.workflow.yaml +25 -30
  483. package/dist/templates/workflows/react-example.workflow.yaml +53 -0
  484. package/package.json +22 -20
  485. package/dist/lib/knowledge/graph-rag/community-detector.d.ts +0 -16
  486. package/dist/lib/knowledge/graph-rag/community-detector.d.ts.map +0 -1
  487. package/dist/lib/knowledge/graph-rag/community-detector.js +0 -81
  488. package/dist/lib/knowledge/graph-rag/community-detector.js.map +0 -1
  489. package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts +0 -17
  490. package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts.map +0 -1
  491. package/dist/lib/knowledge/graph-rag/community-summarizer.js +0 -87
  492. package/dist/lib/knowledge/graph-rag/community-summarizer.js.map +0 -1
  493. package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts +0 -36
  494. package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts.map +0 -1
  495. package/dist/lib/knowledge/graph-rag/entity-extractor.js +0 -192
  496. package/dist/lib/knowledge/graph-rag/entity-extractor.js.map +0 -1
  497. package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts +0 -30
  498. package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts.map +0 -1
  499. package/dist/lib/knowledge/graph-rag/extraction-cache.js +0 -88
  500. package/dist/lib/knowledge/graph-rag/extraction-cache.js.map +0 -1
  501. package/dist/lib/knowledge/graph-rag/global-search.d.ts +0 -19
  502. package/dist/lib/knowledge/graph-rag/global-search.d.ts.map +0 -1
  503. package/dist/lib/knowledge/graph-rag/global-search.js +0 -96
  504. package/dist/lib/knowledge/graph-rag/global-search.js.map +0 -1
  505. package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts +0 -24
  506. package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts.map +0 -1
  507. package/dist/lib/knowledge/graph-rag/graph-rag-factory.js +0 -239
  508. package/dist/lib/knowledge/graph-rag/graph-rag-factory.js.map +0 -1
  509. package/dist/lib/knowledge/graph-rag/index.d.ts +0 -14
  510. package/dist/lib/knowledge/graph-rag/index.d.ts.map +0 -1
  511. package/dist/lib/knowledge/graph-rag/index.js +0 -12
  512. package/dist/lib/knowledge/graph-rag/index.js.map +0 -1
  513. package/dist/lib/knowledge/graph-rag/local-search.d.ts +0 -20
  514. package/dist/lib/knowledge/graph-rag/local-search.d.ts.map +0 -1
  515. package/dist/lib/knowledge/graph-rag/local-search.js +0 -110
  516. package/dist/lib/knowledge/graph-rag/local-search.js.map +0 -1
  517. package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts +0 -31
  518. package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts.map +0 -1
  519. package/dist/lib/knowledge/graph-rag/memory-graph-store.js +0 -165
  520. package/dist/lib/knowledge/graph-rag/memory-graph-store.js.map +0 -1
  521. package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts +0 -38
  522. package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts.map +0 -1
  523. package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js +0 -190
  524. package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js.map +0 -1
  525. package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts +0 -11
  526. package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts.map +0 -1
  527. package/dist/lib/knowledge/graph-rag/search-mode-detector.js +0 -50
  528. package/dist/lib/knowledge/graph-rag/search-mode-detector.js.map +0 -1
  529. package/dist/lib/knowledge/graph-rag/types.d.ts +0 -368
  530. package/dist/lib/knowledge/graph-rag/types.d.ts.map +0 -1
  531. package/dist/lib/knowledge/graph-rag/types.js +0 -48
  532. package/dist/lib/knowledge/graph-rag/types.js.map +0 -1
  533. package/dist/lib/knowledge/knowledge-store-factory.d.ts +0 -16
  534. package/dist/lib/knowledge/knowledge-store-factory.d.ts.map +0 -1
  535. package/dist/lib/knowledge/knowledge-store-factory.js +0 -376
  536. package/dist/lib/knowledge/knowledge-store-factory.js.map +0 -1
  537. package/dist/lib/knowledge/knowledge-store-manager.d.ts +0 -18
  538. package/dist/lib/knowledge/knowledge-store-manager.d.ts.map +0 -1
  539. package/dist/lib/knowledge/knowledge-store-manager.js +0 -98
  540. package/dist/lib/knowledge/knowledge-store-manager.js.map +0 -1
  541. package/dist/lib/knowledge/loaders/s3-loader.d.ts +0 -17
  542. package/dist/lib/knowledge/loaders/s3-loader.d.ts.map +0 -1
  543. package/dist/lib/knowledge/loaders/s3-loader.js +0 -185
  544. package/dist/lib/knowledge/loaders/s3-loader.js.map +0 -1
  545. package/dist/lib/workflows/langgraph-executor.d.ts +0 -51
  546. package/dist/lib/workflows/langgraph-executor.d.ts.map +0 -1
  547. package/dist/lib/workflows/langgraph-executor.js +0 -297
  548. package/dist/lib/workflows/langgraph-executor.js.map +0 -1
  549. package/dist/templates/agents/call-center-analyst-simple.agent.yaml +0 -36
  550. package/dist/templates/agents/math.agent.yaml +0 -28
  551. package/dist/templates/agents/sentiment-structured.agent.yaml +0 -42
  552. package/dist/templates/knowledge/example.knowledge.yaml +0 -28
  553. package/dist/templates/llm.md +0 -1195
  554. package/dist/templates/workflows/langgraph-example.workflow.yaml +0 -84
package/README.md CHANGED
@@ -4,261 +4,111 @@
4
4
 
5
5
  Agent Orcha is a declarative framework designed to build, manage, and scale multi-agent AI systems with ease. It combines the flexibility of TypeScript with the simplicity of YAML to orchestrate complex workflows, manage diverse tools via MCP, and integrate semantic search seamlessly. Built for developers and operators who demand reliability, extensibility, and clarity in their AI operations.
6
6
 
7
- **[Documentation](https://ddalcu.github.io/agent-orcha)** | **[NPM Package](https://www.npmjs.com/package/agent-orcha)** | **[Docker Hub](https://hub.docker.com/r/ddalcu/agent-orcha)**
7
+ **[Documentation](https://agentorcha.com)** | **[NPM Package](https://www.npmjs.com/package/agent-orcha)** | **[Docker Hub](https://hub.docker.com/r/ddalcu/agent-orcha)**
8
8
 
9
- ## Why Agent Orcha?
9
+ ```bash
10
+ docker run -p 3000:3000 -v ./my-workspace:/data -e AUTH_PASSWORD=your-secret-password ddalcu/agent-orcha start
11
+ ```
10
12
 
11
- - **Declarative AI**: Define agents, workflows, and infrastructure in clear, version-controlled YAML files. No more spaghetti code.
12
- - **Model Agnostic**: Seamlessly swap between OpenAI, Gemini, Anthropic, or local LLMs (Ollama, LM Studio) without rewriting logic.
13
- - **Universal Tooling**: Leverage the **Model Context Protocol (MCP)** to connect agents to any external service, API, or database instantly.
14
- - **Knowledge Stores**: Built-in vector store and **GraphRAG** integration makes semantic search and knowledge graph analysis a first-class citizen.
15
- - **Robust Workflow Engine**: Orchestrate complex multi-agent sequences with parallel execution, conditional logic, and state management - or use **LangGraph** for autonomous prompt-driven workflows.
16
- - **Conversation Memory**: Built-in session-based memory for multi-turn dialogues with automatic message management and TTL cleanup.
17
- - **Structured Output**: Enforce JSON schemas on agent responses with automatic validation and type safety.
18
- - **Agent Orcha Studio**: Built-in web dashboard with agent testing, knowledge browsing, workflow execution, and an **in-browser IDE** for editing configs.
19
- - **Developer Experience**: Fully typed interfaces, intuitive CLI tooling, and a modular architecture designed for rapid iteration from prototype to production.
20
- - **Extensible Functions**: Drop in simple JavaScript functions to extend agent capabilities with zero boilerplate.
13
+ ## Why Agent Orcha?
21
14
 
22
- ## Overview
15
+ - **Declarative AI**: Define agents, workflows, and infrastructure in clear, version-controlled YAML files
16
+ - **Published Agents**: Share agents via standalone chat pages at `/chat/<name>` with optional per-agent password protection
17
+ - **Model Agnostic**: Seamlessly swap between OpenAI, Gemini, Anthropic, or local LLMs (Ollama, LM Studio) without rewriting logic
18
+ - **Universal Tooling**: Leverage the **Model Context Protocol (MCP)** to connect agents to any external service, API, or database
19
+ - **Knowledge Stores**: Built-in SQLite-based vector store with optional **direct mapping** for knowledge graphs — semantic search and graph analysis as a first-class citizen
20
+ - **Robust Workflow Engine**: Orchestrate complex multi-agent sequences with parallel execution, conditional logic, and state management — or use **ReAct** for autonomous prompt-driven workflows
21
+ - **Conversation Memory**: Built-in session-based memory for multi-turn dialogues with automatic message management and TTL cleanup
22
+ - **Browser Sandbox**: Full Chromium browser with CDP control, Xvfb, and noVNC — plus an experimental **Vision Browser** for pixel-coordinate control with vision LLMs
23
+ - **Security**: Rate limiting on auth endpoints, SSRF protection, SQL injection hardening, sandboxed execution
24
+ - **Extensible Functions**: Drop in simple JavaScript functions to extend agent capabilities with zero boilerplate
23
25
 
24
- Agent Orcha enables you to:
26
+ ## Agent Orcha Studio
25
27
 
26
- - **Define agents** using YAML configuration files with customizable LLM providers, prompts, and tools
27
- - **Create workflows** that coordinate multiple agents in sequential, parallel, or autonomous (LangGraph) execution
28
- - **Integrate knowledge stores** for RAG (Retrieval Augmented Generation) with vector search and GraphRAG
29
- - **Connect MCP servers** to extend agent capabilities with external tools
30
- - **Create local functions** to give your agents the ability to call your own custom code
31
- - **Manage everything** through a web-based Studio dashboard with built-in IDE
28
+ Built-in web dashboard at `http://localhost:3000` with agent testing, knowledge browsing, workflow execution, real-time monitoring, and an in-browser IDE with visual agent composer.
32
29
 
33
- ### Alpha Status and Security Notice
30
+ <p align="center">
31
+ <img src="docs/assets/images/screenshots/0.0.7-chat.png" alt="Agent Orcha Studio — Chat" width="100%" />
32
+ </p>
34
33
 
35
- **This project is currently in ALPHA state.** No security precautions have been implemented yet. This software should **ALWAYS** be deployed behind a firewall without open access to its APIs. It is designed for **internal use only** and should never be exposed directly to the public internet.
34
+ <p align="center">
35
+ <img src="docs/assets/images/screenshots/0.0.7-agentedit.png" alt="Agent Orcha Studio — Visual Agent Composer" width="100%" />
36
+ </p>
36
37
 
38
+ - **Agents** — Browse, invoke, stream responses, manage sessions
39
+ - **Knowledge** — Browse, search, view entities and graph structure
40
+ - **MCP** — Browse servers, view and call tools
41
+ - **Workflows** — Execute step-based and ReAct workflows with streaming
42
+ - **Skills** — Browse and inspect skills
43
+ - **Monitor** — Real-time LLM call logs, ReAct loop metrics, and activity feed
44
+ - **IDE** — File editor with syntax highlighting, hot-reload, and **visual agent composer** for `.agent.yaml` files
37
45
 
38
- ## Usage
46
+ ## Architecture
39
47
 
40
- Agent Orcha can be used in multiple ways depending on your needs:
48
+ <p align="center">
49
+ <img src="docs/architecture.svg" alt="Agent Orcha Architecture" width="100%" />
50
+ </p>
41
51
 
42
- 1. **CLI Tool (Recommended)** - Use `npx agent-orcha` to initialize and run Agent Orcha projects standalone
43
- 2. **Backend API Server** - Run Agent Orcha as a REST API backend for your existing frontends or applications
44
- 3. **Docker Image** - Use the official Docker image ([ddalcu/agent-orcha](https://hub.docker.com/r/ddalcu/agent-orcha)) for local and server deployments
45
- 4. **Library** - Import and use Agent Orcha programmatically in your TypeScript/JavaScript projects
46
- 5. **Source** - Clone and run directly from source for development or customization
52
+ ### Knowledge Layer
47
53
 
48
- **Requirements:** Node.js >= 20.0.0 (or Docker for containerized deployment)
54
+ <p align="center">
55
+ <img src="docs/knowledge-architecture.svg" alt="Agent Orcha Knowledge Architecture" width="100%" />
56
+ </p>
49
57
 
58
+ ## Usage
50
59
 
51
- ## Quick Start
60
+ Agent Orcha can be used in multiple ways:
52
61
 
53
- ### CLI Usage
62
+ 1. **Docker Image** — Official image at [ddalcu/agent-orcha](https://hub.docker.com/r/ddalcu/agent-orcha)
63
+ 2. **CLI Tool** — `npx agent-orcha` to initialize and run projects
64
+ 3. **Backend API Server** — REST API for your existing frontends
65
+ 4. **Library** — Import programmatically in TypeScript/JavaScript
54
66
 
55
- 1. **Initialize a project:**
56
- ```bash
57
- npx agent-orcha init my-project
58
- cd my-project
59
- ```
67
+ **Requirements:** Node.js >= 24.0.0 (or Docker)
60
68
 
61
- 2. **Configure LLM settings** in `llm.json`:
62
- ```json
63
- {
64
- "version": "1.0",
65
- "models": {
66
- "default": {
67
- "provider": "openai",
68
- "baseUrl": "http://localhost:1234/v1",
69
- "apiKey": "not-needed",
70
- "model": "your-model-name",
71
- "temperature": 0.7
72
- }
73
- },
74
- "embeddings": {
75
- "default": {
76
- "provider": "openai",
77
- "baseUrl": "http://localhost:1234/v1",
78
- "apiKey": "not-needed",
79
- "model": "text-embedding-model"
80
- }
81
- }
82
- }
83
- ```
69
+ ## Quick Start
84
70
 
85
- 3. **Start the server:**
86
- ```bash
87
- npx agent-orcha start
88
- ```
71
+ ### Docker
89
72
 
90
- 4. **Test your agent:**
91
73
  ```bash
92
- curl -X POST http://localhost:3000/api/agents/example/invoke \
93
- -H "Content-Type: application/json" \
94
- -d '{"input": {"query": "Hello, how are you?"}}'
74
+ docker run -p 3000:3000 -e AUTH_PASSWORD=mypass -v ./my-project:/data ddalcu/agent-orcha
95
75
  ```
96
76
 
97
- ### Docker Usage
77
+ An empty workspace is automatically scaffolded with example agents, workflows, and configurations.
98
78
 
99
- Run Agent Orcha using the official Docker image:
100
-
101
- 1. **Initialize a project:**
102
- ```bash
103
- docker run -v ./my-agent-orcha-project:/data ddalcu/agent-orcha init
104
- ```
79
+ ### CLI
105
80
 
106
- 2. **Start the server:**
107
81
  ```bash
108
- docker run -p 3000:3000 -v ./my-agent-orcha-project:/data ddalcu/agent-orcha start
109
- ```
110
-
111
- 3. **Or use Docker Compose:**
112
- ```yaml
113
- version: '3.8'
114
-
115
- services:
116
- agent-orcha:
117
- image: ddalcu/agent-orcha
118
- ports:
119
- - "3000:3000"
120
- volumes:
121
- - ./my-agent-orcha-project:/data
122
- environment:
123
- - ORCHA_BASE_DIR=/data
124
- ```
82
+ # Initialize a project
83
+ npx agent-orcha init my-project
84
+ cd my-project
125
85
 
126
- Then run:
127
- ```bash
128
- docker-compose up
86
+ # Start the server
87
+ npx agent-orcha start
129
88
  ```
130
89
 
131
- See the [Docker Hub page](https://hub.docker.com/r/ddalcu/agent-orcha) for more details and available tags.
132
90
 
133
- ### Library Usage
91
+ ### Library
134
92
 
135
93
  ```typescript
136
94
  import { Orchestrator } from 'agent-orcha';
137
95
 
138
- const orchestrator = new Orchestrator({
139
- projectRoot: './my-agents-project'
140
- });
141
-
96
+ const orchestrator = new Orchestrator({ workspaceRoot: './my-project' });
142
97
  await orchestrator.initialize();
143
98
 
144
- // Invoke an agent
145
99
  const result = await orchestrator.agents.invoke('researcher', {
146
- topic: 'machine learning',
147
- context: 'brief overview'
100
+ topic: 'machine learning'
148
101
  });
149
102
 
150
103
  console.log(result.output);
151
-
152
- // Run a workflow
153
- const workflowResult = await orchestrator.workflows.run('research-paper', {
154
- topic: 'artificial intelligence'
155
- });
156
-
157
- console.log(workflowResult.output);
158
-
159
- // Search a knowledge store
160
- const searchResults = await orchestrator.knowledge.search('docs', {
161
- query: 'how does authentication work',
162
- k: 4
163
- });
164
-
165
- // Run agent with conversation memory
166
- const memoryResult = await orchestrator.runAgent(
167
- 'chatbot',
168
- { message: 'Hello' },
169
- 'session-123' // sessionId
170
- );
171
-
172
- // Clean up
173
104
  await orchestrator.close();
174
105
  ```
175
106
 
176
- ### Backend API Server Usage
177
-
178
- Run Agent Orcha as a backend API server for your existing applications or frontends:
179
-
180
- ```bash
181
- # Start the server (defaults to port 3000)
182
- npx agent-orcha start
183
-
184
- # Or specify a custom port
185
- PORT=8080 npx agent-orcha start
186
- ```
187
-
188
- Agent Orcha exposes a complete REST API that your frontend can consume:
189
-
190
- ```javascript
191
- // Example: Invoke an agent from your frontend
192
- const response = await fetch('http://localhost:3000/api/agents/researcher/invoke', {
193
- method: 'POST',
194
- headers: { 'Content-Type': 'application/json' },
195
- body: JSON.stringify({
196
- input: { topic: 'AI trends' },
197
- sessionId: 'user-session-123' // Optional for conversation memory
198
- })
199
- });
200
-
201
- const result = await response.json();
202
- console.log(result.output);
203
-
204
- // Example: Search a knowledge store
205
- const searchResponse = await fetch('http://localhost:3000/api/knowledge/docs/search', {
206
- method: 'POST',
207
- headers: { 'Content-Type': 'application/json' },
208
- body: JSON.stringify({
209
- query: 'authentication best practices',
210
- k: 5
211
- })
212
- });
213
-
214
- const searchResults = await searchResponse.json();
215
-
216
- // Example: Stream agent responses (SSE)
217
- const eventSource = new EventSource(
218
- 'http://localhost:3000/api/agents/chatbot/stream?' +
219
- new URLSearchParams({
220
- input: JSON.stringify({ message: 'Hello!' }),
221
- sessionId: 'user-123'
222
- })
223
- );
224
-
225
- eventSource.onmessage = (event) => {
226
- const data = JSON.parse(event.data);
227
- console.log(data.chunk); // Streaming response chunk
228
- };
229
- ```
230
-
231
- **CORS Configuration:**
232
- For production deployments, configure CORS in your server startup or use a reverse proxy (nginx, Caddy, etc.) to handle CORS headers.
233
-
234
- **Security Note:**
235
- Agent Orcha is currently in ALPHA with no built-in authentication. Always deploy behind a firewall or add your own authentication layer (JWT, API keys, etc.) before exposing to clients.
236
-
237
- ## CLI Commands
238
-
239
- | Command | Description |
240
- |---------|-------------|
241
- | `npx agent-orcha init [dir]` | Initialize a new project with example configs |
242
- | `npx agent-orcha start` | Start the agent orchestrator server |
243
- | `npx agent-orcha help` | Show help information |
244
-
245
- ## Development Scripts
246
-
247
- For development on the agent-orcha framework itself:
248
-
249
- | Command | Description |
250
- |---------|-------------|
251
- | `npm run dev` | Start development server with auto-reload |
252
- | `npm run build` | Build |
253
- | `npm start` | Run build |
254
- | `npm run lint` | Run ESLint |
255
- | `npm run typecheck` | Run TypeScript type checking |
256
-
257
107
  ## Configuration
258
108
 
259
109
  ### LLM Configuration (llm.json)
260
110
 
261
- All LLM and embedding configurations are defined in `llm.json` at the project root. Agents and knowledge stores reference these configs by name.
111
+ All LLM and embedding configs are defined in `llm.json`. Agents and knowledge stores reference these by name.
262
112
 
263
113
  ```json
264
114
  {
@@ -266,153 +116,56 @@ All LLM and embedding configurations are defined in `llm.json` at the project ro
266
116
  "models": {
267
117
  "default": {
268
118
  "baseUrl": "http://localhost:1234/v1",
269
- "apiKey": "not-needed",
119
+ "apiKey": "${OPENAI_API_KEY}",
270
120
  "model": "qwen/qwen3-4b-2507",
271
- "temperature": 0.7
272
- },
273
- "openai": {
274
- "apiKey": "sk-your-openai-key",
275
- "model": "gpt-4o",
276
- "temperature": 0.7
121
+ "temperature": 0.7,
122
+ "thinkingBudget": 10000
277
123
  }
278
124
  },
279
125
  "embeddings": {
280
126
  "default": {
281
127
  "baseUrl": "http://localhost:1234/v1",
282
- "apiKey": "not-needed",
128
+ "apiKey": "${OPENAI_API_KEY}",
283
129
  "model": "text-embedding-nomic-embed-text-v1.5",
284
130
  "eosToken": " "
285
- },
286
- "openai": {
287
- "apiKey": "sk-your-openai-key",
288
- "model": "text-embedding-3-small",
289
- "dimensions": 1536
290
- },
291
- "gemini": {
292
- "apiKey": "sk-your-gemini-key",
293
- "model": "text-embedding-004"
294
131
  }
295
132
  }
296
133
  }
297
134
  ```
298
135
 
299
136
  All providers are treated as OpenAI-compatible APIs. For local inference:
300
- - **LM Studio**: Use `baseUrl: "http://localhost:1234/v1"`
301
- - **Ollama**: Use `baseUrl: "http://localhost:11434/v1"`
302
- - **OpenAI**: Omit `baseUrl` (uses default OpenAI endpoint)
137
+ - **LM Studio**: `baseUrl: "http://localhost:1234/v1"`
138
+ - **Ollama**: `baseUrl: "http://localhost:11434/v1"`
139
+ - **OpenAI**: Omit `baseUrl` (uses default endpoint)
303
140
 
304
- #### Embedding Configuration Options
305
-
306
- Embedding configurations support the following options:
307
-
308
- - **model** (required): The embedding model name
309
- - **apiKey** (required): API key for the embedding service
310
- - **baseUrl** (optional): Custom API endpoint URL for local or alternative services
311
- - **provider** (optional): Provider type (openai, gemini, local). Auto-detected if omitted
312
- - **dimensions** (optional): Output embedding dimensions (e.g., 1536 for OpenAI text-embedding-3-small)
313
- - **eosToken** (optional): Token to append to all text inputs (e.g., " " for Nomic models to avoid SEP warnings)
314
-
315
-
316
- **Example configurations:**
317
-
318
- ```json
319
- {
320
- "embeddings": {
321
- "nomic-local": {
322
- "baseUrl": "http://localhost:1234/v1",
323
- "apiKey": "not-needed",
324
- "model": "text-embedding-nomic-embed-text-v1.5",
325
- "eosToken": " "
326
- },
327
- "openai-small": {
328
- "apiKey": "sk-your-key",
329
- "model": "text-embedding-3-small",
330
- "dimensions": 1536
331
- },
332
- "openai-large": {
333
- "apiKey": "sk-your-key",
334
- "model": "text-embedding-3-large",
335
- "dimensions": 3072
336
- },
337
- "gemini": {
338
- "apiKey": "sk-your-key",
339
- "model": "text-embedding-004"
340
- }
341
- }
342
- }
343
- ```
344
-
345
- ### Environment Variables (Optional)
141
+ ### Environment Variables
346
142
 
347
143
  ```bash
348
- # Server configuration
349
- PORT=3000
350
- HOST=0.0.0.0
351
-
352
- # Base directory for config files (optional)
353
- ORCHA_BASE_DIR=/path/to/project
144
+ PORT=3000 # Server port
145
+ HOST=0.0.0.0 # Server host
146
+ WORKSPACE=/path/to/project # Base directory for config files
147
+ AUTH_PASSWORD=your-secret-password # Password auth for all API routes and Studio
148
+ CORS_ORIGIN=https://your-frontend.com # Cross-origin policy (default: same-origin)
354
149
  ```
355
150
 
356
151
  ## Agents
357
152
 
358
- Agents are AI-powered units that can use tools and respond to queries. Define agents in YAML files within the `agents/` directory.
359
-
360
- ### Agent Schema
361
-
362
- ```yaml
363
- # agents/<name>.agent.yaml
364
-
365
- name: string # Unique identifier (required)
366
- description: string # Human-readable description (required)
367
- version: string # Semantic version (default: "1.0.0")
368
-
369
- llm: string | object # Reference to LLM config in llm.json
370
- # Simple: llm: default
371
- # With override: llm: { name: default, temperature: 0.3 }
372
-
373
- prompt: # Prompt configuration (required)
374
- system: string # System message/instructions
375
- inputVariables: [string] # Variables to interpolate in the prompt
376
-
377
- tools: # Tools available to agent (optional)
378
- - mcp:<server-name> # MCP server tools
379
- - knowledge:<store-name> # Knowledge store search
380
- - function:<function-name> # Custom function
381
- - builtin:<tool-name> # Built-in tools
382
-
383
- output: # Output formatting (optional)
384
- format: text | json | structured
385
- schema: # Required when format is "structured"
386
- type: object
387
- properties: { ... }
388
- required: [string]
389
-
390
- metadata: # Custom metadata (optional)
391
- category: string
392
- tags: [string]
393
- ```
394
-
395
- ### Example Agent
153
+ Agents are AI-powered units defined in YAML within the `agents/` directory.
396
154
 
397
155
  ```yaml
398
156
  # agents/researcher.agent.yaml
399
-
400
157
  name: researcher
401
158
  description: Researches topics using web fetch and knowledge search
402
159
  version: "1.0.0"
403
160
 
404
161
  llm:
405
162
  name: default
406
- temperature: 0.5 # Override default temperature
163
+ temperature: 0.5
407
164
 
408
165
  prompt:
409
166
  system: |
410
- You are a thorough researcher. Your task is to:
411
- 1. Search through available knowledge bases
412
- 2. Fetch additional information from the web
413
- 3. Synthesize findings into a comprehensive report
414
-
415
- Use the available tools to gather information before responding.
167
+ You are a thorough researcher. Search knowledge bases,
168
+ fetch web information, and synthesize findings.
416
169
  inputVariables:
417
170
  - topic
418
171
  - context
@@ -424,116 +177,45 @@ tools:
424
177
  output:
425
178
  format: text
426
179
 
427
- metadata:
428
- category: research
429
- tags: [research, web, knowledge]
430
- ```
180
+ maxIterations: 50 # Override default iteration limit (optional)
181
+ memory: true # Enable persistent memory (optional)
182
+ skills: # Skills to attach (optional)
183
+ - skill-name
184
+ publish: true # Standalone chat at /chat/researcher (optional)
185
+ ```
186
+
187
+ ### Agent Schema Reference
188
+
189
+ | Field | Description |
190
+ |-------|-------------|
191
+ | `name` | Unique identifier (required) |
192
+ | `description` | Human-readable description (required) |
193
+ | `version` | Semantic version (default: "1.0.0") |
194
+ | `llm` | LLM config reference — string or `{ name, temperature }` |
195
+ | `prompt.system` | System message/instructions |
196
+ | `prompt.inputVariables` | Variables to interpolate in the prompt |
197
+ | `tools` | Tool references: `mcp:`, `knowledge:`, `function:`, `builtin:`, `sandbox:`, `project:` |
198
+ | `output.format` | `text` or `structured` |
199
+ | `output.schema` | JSON Schema (required when format is `structured`) |
200
+ | `maxIterations` | Override default 200 iteration limit |
201
+ | `skills` | Skills to attach (list or `{ mode: all }`) |
202
+ | `memory` | Enable persistent memory |
203
+ | `integrations` | External integrations (collabnook, email) |
204
+ | `triggers` | Cron or webhook triggers |
205
+ | `publish` | Standalone chat page (`true` or `{ enabled, password }`) |
431
206
 
432
207
  ### Conversation Memory
433
208
 
434
- Agent Orcha supports session-based conversation memory, allowing agents to maintain context across multiple interactions. This is useful for building chatbots, multi-turn dialogues, and stateful applications.
435
-
436
- **Features:**
437
- - In-memory session storage using LangChain messages
438
- - Automatic FIFO message limit (default: 50 messages per session)
439
- - Optional TTL-based session cleanup (default: 1 hour)
440
- - Backward compatible (sessionId is optional)
441
-
442
- **API Usage:**
443
-
444
- ```bash
445
- # First message
446
- curl -X POST http://localhost:3000/api/agents/chatbot-memory/invoke \
447
- -H "Content-Type: application/json" \
448
- -d '{
449
- "input": {"message": "My name is Alice"},
450
- "sessionId": "user-123"
451
- }'
452
-
453
- # Second message (agent remembers the name)
454
- curl -X POST http://localhost:3000/api/agents/chatbot-memory/invoke \
455
- -H "Content-Type: application/json" \
456
- -d '{
457
- "input": {"message": "What is my name?"},
458
- "sessionId": "user-123"
459
- }'
460
- ```
461
-
462
- **Library Usage:**
209
+ Pass a `sessionId` to maintain context across interactions:
463
210
 
464
211
  ```typescript
465
- // Run agent with conversation memory
466
- const result1 = await orchestrator.runAgent(
467
- 'chatbot-memory',
468
- { message: 'My name is Alice' },
469
- 'user-123' // sessionId
470
- );
471
-
472
- const result2 = await orchestrator.runAgent(
473
- 'chatbot-memory',
474
- { message: 'What is my name?' },
475
- 'user-123' // Same sessionId maintains context
476
- );
477
- ```
478
-
479
- **Session Management API:**
480
-
481
- ```bash
482
- # Get session stats
483
- curl http://localhost:3000/api/agents/sessions/stats
484
-
485
- # Get session info
486
- curl http://localhost:3000/api/agents/sessions/user-123
487
-
488
- # Clear session
489
- curl -X DELETE http://localhost:3000/api/agents/sessions/user-123
490
- ```
491
-
492
- **Memory Management (Programmatic):**
493
-
494
- ```typescript
495
- // Access memory store
496
- const memory = orchestrator.memory;
497
-
498
- // Check if session exists
499
- const hasSession = memory.hasSession('user-123');
500
-
501
- // Get message count
502
- const count = memory.getMessageCount('user-123');
503
-
504
- // Clear a session
505
- memory.clearSession('user-123');
506
-
507
- // Get total sessions
508
- const totalSessions = memory.getSessionCount();
212
+ const result = await orchestrator.runAgent('chatbot', { message: 'My name is Alice' }, 'session-123');
213
+ const result2 = await orchestrator.runAgent('chatbot', { message: 'What is my name?' }, 'session-123');
509
214
  ```
510
215
 
511
216
  ### Structured Output
512
217
 
513
- Agents can return validated, structured JSON output by specifying an `output.schema` configuration. This leverages LangChain's `withStructuredOutput()` to ensure responses match your desired format.
514
-
515
- **Features:**
516
- - JSON Schema-based output validation
517
- - Type-safe structured responses
518
- - Automatic schema enforcement via LLM
519
- - Validation metadata in response
520
-
521
- **Example Agent Configuration:**
522
-
523
218
  ```yaml
524
- # agents/sentiment-structured.agent.yaml
525
-
526
- name: sentiment-structured
527
- description: Sentiment analysis with structured output
528
- llm:
529
- name: default
530
- temperature: 0
531
- prompt:
532
- system: |
533
- Analyze the sentiment of the provided text and return a structured response.
534
- Provide both the sentiment category and a confidence score.
535
- inputVariables:
536
- - text
537
219
  output:
538
220
  format: structured
539
221
  schema:
@@ -542,249 +224,52 @@ output:
542
224
  sentiment:
543
225
  type: string
544
226
  enum: [positive, negative, neutral]
545
- description: The overall sentiment
546
227
  confidence:
547
228
  type: number
548
- minimum: 0
549
- maximum: 1
550
- description: Confidence score
551
- keywords:
552
- type: array
553
- items:
554
- type: string
555
- description: Key sentiment-driving words
556
- required:
557
- - sentiment
558
- - confidence
559
- ```
560
-
561
- **API Usage:**
562
-
563
- ```bash
564
- curl -X POST http://localhost:3000/api/agents/sentiment-structured/invoke \
565
- -H "Content-Type: application/json" \
566
- -d '{
567
- "input": {"text": "I love this product! It works great!"}
568
- }'
569
- ```
570
-
571
- **Response:**
572
-
573
- ```json
574
- {
575
- "output": {
576
- "sentiment": "positive",
577
- "confidence": 0.95,
578
- "keywords": ["love", "great"]
579
- },
580
- "metadata": {
581
- "duration": 1234,
582
- "structuredOutputValid": true
583
- }
584
- }
585
- ```
586
-
587
- **Library Usage:**
588
-
589
- ```typescript
590
- const result = await orchestrator.runAgent('sentiment-structured', {
591
- text: 'This is amazing!'
592
- });
593
-
594
- // result.output is a typed object
595
- console.log(result.output.sentiment); // "positive"
596
- console.log(result.output.confidence); // 0.95
597
- console.log(result.metadata.structuredOutputValid); // true
229
+ required: [sentiment, confidence]
598
230
  ```
599
231
 
600
232
  ## Workflows
601
233
 
602
- Workflows orchestrate multiple agents in a defined sequence. Define workflows in YAML files within the `workflows/` directory. Agent Orcha supports two workflow types: **step-based** and **LangGraph**.
603
-
604
- ### Step-Based Workflows
605
-
606
- Traditional sequential/parallel agent orchestration with explicit step definitions.
607
-
608
- #### Workflow Schema
609
-
610
- ```yaml
611
- # workflows/<name>.workflow.yaml
612
-
613
- name: string # Unique identifier (required)
614
- description: string # Human-readable description (required)
615
- version: string # Semantic version (default: "1.0.0")
616
- type: steps # Optional (steps is default)
234
+ Workflows orchestrate multiple agents. Two types: **step-based** and **ReAct**.
617
235
 
618
- input: # Input schema (required)
619
- schema:
620
- <field_name>:
621
- type: string | number | boolean | array | object
622
- required: boolean # (default: false)
623
- default: any # Default value
624
- description: string # Field description
625
-
626
- steps: # Workflow steps (required)
627
- - id: string # Unique step identifier
628
- agent: string # Agent name to execute
629
- input: # Input mapping using templates
630
- <key>: "{{input.field}}" # From workflow input
631
- <key>: "{{steps.stepId.output}}" # From previous step
632
- condition: string # Optional conditional execution
633
- retry: # Optional retry configuration
634
- maxAttempts: number
635
- delay: number # Milliseconds
636
- output:
637
- key: string # Store output under this key
638
-
639
- # Parallel execution
640
- - parallel:
641
- - id: step1
642
- agent: agent1
643
- input: {...}
644
- - id: step2
645
- agent: agent2
646
- input: {...}
647
-
648
- config: # Workflow configuration (optional)
649
- timeout: number # Total timeout ms (default: 300000)
650
- onError: stop | continue | retry
651
-
652
- output: # Output mapping (required)
653
- <key>: "{{steps.stepId.output}}"
654
-
655
- metadata: # Custom metadata (optional)
656
- category: string
657
- tags: [string]
658
- ```
659
-
660
- #### Template Syntax
661
-
662
- Access data within workflows using double curly braces:
236
+ ### Step-Based
663
237
 
664
- | Template | Description |
665
- |----------|-------------|
666
- | `{{input.fieldName}}` | Access workflow input field |
667
- | `{{steps.stepId.output}}` | Access step output |
668
- | `{{steps.stepId.output.nested.path}}` | Access nested output |
669
- | `{{steps.stepId.metadata.duration}}` | Access step metadata |
670
-
671
- #### Example Workflow
238
+ Sequential/parallel agent orchestration with explicit step definitions.
672
239
 
673
240
  ```yaml
674
- # workflows/research-paper.workflow.yaml
675
-
676
241
  name: research-paper
677
- description: Research a topic and write a comprehensive paper
678
- version: "1.0.0"
242
+ description: Research a topic and write a paper
243
+ type: steps
679
244
 
680
245
  input:
681
246
  schema:
682
247
  topic:
683
248
  type: string
684
249
  required: true
685
- description: The topic to research
686
- style:
687
- type: string
688
- default: "professional"
689
250
 
690
251
  steps:
691
252
  - id: research
692
253
  agent: researcher
693
254
  input:
694
255
  topic: "{{input.topic}}"
695
- context: "Gather comprehensive information"
696
- output:
697
- key: researchFindings
698
-
699
- - id: summarize
700
- agent: summarizer
701
- input:
702
- content: "{{steps.research.output}}"
703
- maxPoints: "10"
704
- condition: "{{steps.research.metadata.success}}"
705
- output:
706
- key: summary
707
256
 
708
257
  - id: write
709
258
  agent: writer
710
259
  input:
711
260
  research: "{{steps.research.output}}"
712
- outline: "{{steps.summarize.output}}"
713
- style: "{{input.style}}"
714
- output:
715
- key: paper
716
-
717
- config:
718
- timeout: 600000
719
- onError: stop
720
261
 
721
262
  output:
722
263
  paper: "{{steps.write.output}}"
723
- summary: "{{steps.summarize.output}}"
724
- researchFindings: "{{steps.research.output}}"
725
- ```
726
-
727
- ### LangGraph Workflows
728
-
729
- Autonomous, prompt-driven workflows using LangGraph. The agent decides which tools and agents to call based on the system prompt, without explicit step definitions.
730
-
731
- #### LangGraph Schema
732
-
733
- ```yaml
734
- # workflows/<name>.workflow.yaml
735
-
736
- name: string # Unique identifier (required)
737
- description: string # Human-readable description (required)
738
- version: string # Semantic version (default: "1.0.0")
739
- type: langgraph # Required for LangGraph workflows
740
-
741
- input: # Input schema (required)
742
- schema:
743
- <field_name>:
744
- type: string | number | boolean | array | object
745
- required: boolean
746
- description: string
747
-
748
- prompt: # Prompt configuration (required)
749
- system: string # System message with instructions
750
- goal: string # Goal template (supports {{input.*}} interpolation)
751
-
752
- graph: # LangGraph configuration (required)
753
- model: string # LLM config name from llm.json
754
- executionMode: react | single-turn # Default: react
755
- tools: # Tool discovery
756
- mode: all | include | exclude | none
757
- sources: [mcp, knowledge, function, builtin]
758
- include: [string] # For mode: include
759
- exclude: [string] # For mode: exclude
760
- agents: # Agent discovery
761
- mode: all | include | exclude | none
762
- include: [string]
763
- exclude: [string]
764
- maxIterations: number # Default: 10
765
- timeout: number # Default: 300000
766
-
767
- output: # Output extraction
768
- <key>: "{{state.messages[-1].content}}"
769
-
770
- config: # Optional
771
- onError: stop | continue | retry
772
264
  ```
773
265
 
774
- #### Execution Modes
775
-
776
- | Mode | Behavior | Best For |
777
- |------|----------|----------|
778
- | `single-turn` | Calls tools once, then returns | Research, data gathering, straightforward tasks |
779
- | `react` | Multiple rounds of tool calls with analysis | Complex problems, iterative refinement |
266
+ ### ReAct
780
267
 
781
- #### Example LangGraph Workflow
268
+ Autonomous, prompt-driven workflows. The agent decides which tools and agents to call.
782
269
 
783
270
  ```yaml
784
- name: langgraph-research
785
- description: Autonomous research using tool discovery
786
- version: "1.0.0"
787
- type: langgraph
271
+ name: react-research
272
+ type: react
788
273
 
789
274
  input:
790
275
  schema:
@@ -796,21 +281,17 @@ prompt:
796
281
  system: |
797
282
  You are a research assistant with access to tools and agents.
798
283
  Identify all tools you need, call them in parallel, then synthesize results.
799
-
800
- If the user hasn't provided required information, use the ask_user tool
801
- to request it before proceeding.
802
284
  goal: "Research and analyze: {{input.topic}}"
803
285
 
804
286
  graph:
805
287
  model: default
806
- executionMode: single-turn
288
+ executionMode: single-turn # or: react (multi-round)
807
289
  tools:
808
290
  mode: all
809
291
  sources: [mcp, knowledge, function, builtin]
810
292
  agents:
811
293
  mode: all
812
294
  maxIterations: 10
813
- timeout: 300000
814
295
 
815
296
  output:
816
297
  analysis: "{{state.messages[-1].content}}"
@@ -818,63 +299,16 @@ output:
818
299
 
819
300
  ## Knowledge Stores
820
301
 
821
- Knowledge stores enable semantic search and RAG capabilities. Define knowledge stores in YAML files within the `knowledge/` directory. Two kinds are supported: **vector** (default) and **graph-rag**.
822
-
823
- ### Vector Knowledge Stores
824
-
825
- Traditional vector stores with embeddings for semantic search.
826
-
827
- #### Vector Knowledge Schema
302
+ Semantic search and RAG using **SQLite + sqlite-vec** no external vector databases required. Define in the `knowledge/` directory.
828
303
 
829
304
  ```yaml
830
- # knowledge/<name>.knowledge.yaml
831
-
832
- name: string # Unique identifier (required)
833
- description: string # Human-readable description (required)
834
- kind: vector # Optional (vector is default)
835
-
836
- source: # Data source (required)
837
- type: directory | file | database | web | s3
838
- # See "Data Source Types" below for type-specific fields
839
-
840
- loader: # Document loader (required)
841
- type: text | pdf | csv | json | markdown
842
-
843
- splitter: # Text chunking (required)
844
- type: character | recursive | token | markdown
845
- chunkSize: number # Characters per chunk (default: 1000)
846
- chunkOverlap: number # Overlap between chunks (default: 200)
847
-
848
- embedding: string # Reference to embedding config in llm.json (default: "default")
849
-
850
- store: # Vector store backend (required)
851
- type: memory | chroma | pinecone | qdrant
852
- options: # Store-specific options (optional)
853
- path: string # Storage path (for chroma)
854
- collectionName: string # Collection name (for chroma)
855
- url: string # Server URL (for chroma, qdrant)
856
-
857
- search: # Search configuration (optional)
858
- defaultK: number # Results per search (default: 4)
859
- scoreThreshold: number # Minimum similarity (0-1)
860
- ```
861
-
862
- #### Example Vector Knowledge Store
863
-
864
- ```yaml
865
- # knowledge/transcripts.knowledge.yaml
866
-
867
305
  name: transcripts
868
- description: Meeting transcripts for context retrieval
869
-
306
+ description: Meeting transcripts
870
307
  source:
871
308
  type: directory
872
309
  path: knowledge/sample-data
873
310
  pattern: "*.txt"
874
311
 
875
- loader:
876
- type: text
877
-
878
312
  splitter:
879
313
  type: character
880
314
  chunkSize: 1000
@@ -882,388 +316,67 @@ splitter:
882
316
 
883
317
  embedding: default
884
318
 
885
- store:
886
- type: memory
887
-
888
319
  search:
889
320
  defaultK: 4
890
321
  scoreThreshold: 0.2
891
322
  ```
892
323
 
893
- **Note:** Knowledge stores are initialized on startup, loading documents and creating embeddings immediately.
324
+ ### Data Sources
894
325
 
895
- ### GraphRAG Knowledge Stores
326
+ - **directory/file** Local files with glob patterns
327
+ - **database** — PostgreSQL/MySQL via SQL queries
328
+ - **web** — HTML scraping, JSON APIs (with `jsonPath`), raw text
896
329
 
897
- GraphRAG extracts entities and relationships from documents, builds a knowledge graph, detects communities, and enables both entity-level and thematic search.
330
+ ### Knowledge Graph (Direct Mapping)
898
331
 
899
- #### GraphRAG Schema
332
+ Add `graph.directMapping` to build entity graphs from structured data:
900
333
 
901
334
  ```yaml
902
- # knowledge/<name>.knowledge.yaml
903
-
904
- name: string # Unique identifier (required)
905
- kind: graph-rag # Required for GraphRAG
906
- description: string # Human-readable description (required)
907
-
908
- source: # Same source types as vector
909
- type: directory | file | database | web | s3
910
-
911
- loader:
912
- type: text | pdf | csv | json | markdown
913
-
914
- splitter:
915
- type: character | recursive | token | markdown
916
- chunkSize: number
917
- chunkOverlap: number
918
-
919
- embedding: string # Embedding config from llm.json
920
-
921
- graph: # Graph configuration (required)
922
- extraction: # Entity extraction
923
- llm: string # LLM from llm.json (default: "default")
924
- entityTypes: # Optional schema (omit for auto-extraction)
925
- - name: string
926
- description: string
927
- relationshipTypes: # Optional schema
928
- - name: string
929
- description: string
930
-
931
- communities: # Community detection
932
- algorithm: louvain # Currently only supported algorithm
933
- resolution: number # Louvain resolution (default: 1.0)
934
- minSize: number # Minimum community size (default: 2)
935
- summaryLlm: string # LLM for summaries (default: "default")
936
-
937
- store: # Graph store backend
938
- type: memory | neo4j # Default: memory
939
- options: {}
940
-
941
- cache: # Graph cache
942
- enabled: boolean # Default: true
943
- directory: string # Default: ".graph-cache"
944
-
945
- search: # Search configuration
946
- defaultK: number # Results per search (default: 10)
947
- localSearch: # Entity neighborhood search
948
- maxDepth: number # Traversal depth (default: 2)
949
- globalSearch: # Community-level search
950
- topCommunities: number # Communities to consider (default: 5)
951
- llm: string # LLM for synthesis (default: "default")
952
- ```
953
-
954
- #### Example GraphRAG Knowledge Store
955
-
956
- ```yaml
957
- # knowledge/call-center.knowledge.yaml
958
-
959
- name: call-center-analysis
960
- kind: graph-rag
961
- description: GraphRAG for analyzing call center transcripts
962
-
963
- source:
964
- type: directory
965
- path: knowledge/transcripts
966
- pattern: "*.txt"
967
-
968
- loader:
969
- type: text
970
-
971
- splitter:
972
- type: recursive
973
- chunkSize: 2000
974
- chunkOverlap: 200
975
-
976
- embedding: default
977
-
978
335
  graph:
979
- extraction:
980
- llm: default
981
- entityTypes:
982
- - name: Agent
983
- description: "Call center representative"
984
- - name: Customer
985
- description: "Person calling"
986
- - name: Vehicle
987
- description: "Car discussed"
988
- - name: Outcome
989
- description: "Result of the call"
990
- relationshipTypes:
991
- - name: HANDLED_BY
992
- description: "Call was handled by an agent"
993
- - name: INTERESTED_IN
994
- description: "Customer interest in vehicle"
995
- - name: RESULTED_IN
996
- description: "Call resulted in outcome"
997
-
998
- communities:
999
- algorithm: louvain
1000
- resolution: 1.0
1001
- minSize: 2
1002
- summaryLlm: default
1003
-
1004
- store:
1005
- type: memory
1006
-
1007
- cache:
1008
- enabled: true
1009
- directory: .graph-cache
1010
-
1011
- search:
1012
- defaultK: 10
1013
- localSearch:
1014
- maxDepth: 2
1015
- globalSearch:
1016
- topCommunities: 5
1017
- llm: default
1018
- ```
1019
-
1020
- ### Data Source Types
1021
-
1022
- Agent Orcha supports multiple data source types for knowledge stores:
1023
-
1024
- #### Directory/File Sources
1025
- Load documents from local files or directories:
1026
- ```yaml
1027
- source:
1028
- type: directory
1029
- path: knowledge/sample-data
1030
- pattern: "*.txt"
1031
- recursive: true
1032
- ```
1033
-
1034
- #### Database Sources
1035
- Load documents from PostgreSQL or MySQL databases:
1036
- ```yaml
1037
- source:
1038
- type: database
1039
- connectionString: postgresql://user:password@localhost:5432/docs_db
1040
- query: SELECT content, title, category FROM documents WHERE published = true
1041
- contentColumn: content
1042
- metadataColumns:
1043
- - title
1044
- - category
1045
- batchSize: 100
1046
- ```
1047
-
1048
- See `templates/knowledge/postgres-docs.knowledge.yaml` and `templates/knowledge/mysql-docs.knowledge.yaml` for complete examples.
1049
-
1050
- #### Web Scraping Sources
1051
- Load documents from websites using CSS selectors:
1052
- ```yaml
1053
- source:
1054
- type: web
1055
- url: https://docs.example.com/guide/
1056
- selector: article.documentation # CSS selector for targeted extraction
1057
- ```
1058
-
1059
- See `templates/knowledge/web-docs.knowledge.yaml` for a complete example.
1060
-
1061
- #### S3 Sources
1062
- Load documents from AWS S3 or S3-compatible services (MinIO, Wasabi, etc.):
1063
- ```yaml
1064
- source:
1065
- type: s3
1066
- bucket: my-knowledge-base
1067
- prefix: documentation/
1068
- region: us-east-1
1069
- pattern: "*.{pdf,txt,md}"
1070
- # Optional for S3-compatible services:
1071
- endpoint: http://localhost:9000 # For MinIO, Wasabi, etc.
1072
- forcePathStyle: true # Required for MinIO and some S3-compatible services
1073
- ```
1074
-
1075
- See `templates/knowledge/s3-pdfs.knowledge.yaml` and `templates/knowledge/s3-minio.knowledge.yaml` for complete examples.
1076
-
1077
- ### Store Types
1078
-
1079
- #### Memory (Development)
1080
- In-memory storage. Fast but not persistent - embeddings are recreated on every startup.
1081
-
1082
- ```yaml
1083
- store:
1084
- type: memory
1085
- ```
1086
-
1087
- **Use cases:** Development, testing, small datasets
1088
-
1089
- #### Chroma (Production - Local)
1090
- Persistent local storage using Chroma. Embeddings are cached and reused across restarts.
1091
-
1092
- ```yaml
1093
- store:
1094
- type: chroma
1095
- options:
1096
- path: .chroma # Storage directory (default: .chroma)
1097
- collectionName: my-collection # Collection name (default: store name)
1098
- url: http://localhost:8000 # Chroma server URL (default: http://localhost:8000)
1099
- ```
1100
-
1101
- **Setup:**
1102
- ```bash
1103
- # Option 1: Run Chroma server with Docker
1104
- docker run -p 8000:8000 chromadb/chroma
1105
-
1106
- # Option 2: Install and run Chroma locally
1107
- pip install chromadb
1108
- chroma run --path .chroma --port 8000
1109
- ```
1110
-
336
+ directMapping:
337
+ entities:
338
+ - type: Post
339
+ idColumn: id
340
+ nameColumn: title
341
+ properties: [title, slug, content]
342
+ - type: Author
343
+ idColumn: author_email
344
+ nameColumn: author_name
345
+ relationships:
346
+ - type: WROTE
347
+ source: Author
348
+ target: Post
349
+ sourceIdColumn: author_email
350
+ targetIdColumn: id
351
+ ```
352
+
353
+ Stores with entities get additional graph tools: `entity_lookup`, `traverse`, `graph_schema`, `sql`.
1111
354
 
1112
355
  ## Functions
1113
356
 
1114
- Functions are custom JavaScript tools that extend agent capabilities with your own code. They're simple to create and require no dependencies.
1115
-
1116
- ### Function Schema
1117
-
1118
- Create a file in `functions/` ending with `.function.js`:
1119
-
1120
- ```javascript
1121
- /**
1122
- * Function description
1123
- */
1124
- export default {
1125
- name: 'function-name', // Unique identifier (required)
1126
- description: 'What it does', // Clear description (required)
1127
-
1128
- parameters: { // Input parameters (required)
1129
- param1: {
1130
- type: 'number', // string | number | boolean | array | object | enum
1131
- description: 'Parameter description',
1132
- required: true, // Optional, defaults to true
1133
- default: 0, // Optional default value
1134
- },
1135
- },
1136
-
1137
- execute: async ({ param1 }) => { // Execution function (required)
1138
- // Your logic here
1139
- return `Result: ${param1}`;
1140
- },
1141
- };
1142
-
1143
- // Optional metadata for documentation
1144
- export const metadata = {
1145
- name: 'function-name',
1146
- version: '1.0.0',
1147
- author: 'Your Name',
1148
- tags: ['category'],
1149
- };
1150
- ```
1151
-
1152
- ### Example Function
357
+ Custom JavaScript tools in `functions/`:
1153
358
 
1154
359
  ```javascript
1155
360
  // functions/fibonacci.function.js
1156
-
1157
361
  export default {
1158
362
  name: 'fibonacci',
1159
- description: 'Returns the nth Fibonacci number (0-based indexing)',
1160
-
363
+ description: 'Returns the nth Fibonacci number',
1161
364
  parameters: {
1162
- n: {
1163
- type: 'number',
1164
- description: 'The index (0-based, max 100)',
1165
- },
365
+ n: { type: 'number', description: 'The index (0-based, max 100)' },
1166
366
  },
1167
-
1168
367
  execute: async ({ n }) => {
1169
- if (n < 0 || !Number.isInteger(n)) {
1170
- throw new Error('Index must be a non-negative integer');
1171
- }
1172
- if (n > 100) {
1173
- throw new Error('Index too large (max 100)');
1174
- }
1175
-
1176
- if (n === 0) return 'Fibonacci(0) = 0';
1177
- if (n === 1) return 'Fibonacci(1) = 1';
1178
-
1179
368
  let prev = 0, curr = 1;
1180
- for (let i = 2; i <= n; i++) {
1181
- [prev, curr] = [curr, prev + curr];
1182
- }
1183
-
1184
- return `Fibonacci(${n}) = ${curr}`;
369
+ for (let i = 2; i <= n; i++) [prev, curr] = [curr, prev + curr];
370
+ return `Fibonacci(${n}) = ${n < 2 ? n : curr}`;
1185
371
  },
1186
372
  };
1187
373
  ```
1188
374
 
1189
- ### Using Functions in Agents
1190
-
1191
- Reference functions in your agent's tools list with the `function:` prefix:
1192
-
1193
- ```yaml
1194
- name: math-assistant
1195
- description: Assistant that can calculate Fibonacci numbers
1196
-
1197
- llm:
1198
- name: default
1199
- temperature: 0.3
1200
-
1201
- prompt:
1202
- system: |
1203
- You are a math assistant. Use the fibonacci tool to calculate
1204
- Fibonacci numbers when asked.
1205
- inputVariables:
1206
- - query
1207
-
1208
- tools:
1209
- - function:fibonacci # References fibonacci.function.js
1210
-
1211
- output:
1212
- format: text
1213
- ```
1214
-
1215
- ### Parameter Types
1216
-
1217
- - **string**: Text value
1218
- - **number**: Numeric value
1219
- - **boolean**: true/false
1220
- - **array**: Array of values
1221
- - **object**: JSON object
1222
- - **enum**: One of a fixed set (requires `values` array)
1223
-
1224
- Example enum parameter:
1225
- ```javascript
1226
- parameters: {
1227
- operation: {
1228
- type: 'enum',
1229
- values: ['add', 'subtract', 'multiply', 'divide'],
1230
- description: 'Math operation to perform',
1231
- },
1232
- }
1233
- ```
375
+ Reference in agents with `function:fibonacci`.
1234
376
 
1235
377
  ## MCP Servers
1236
378
 
1237
- Model Context Protocol (MCP) servers provide external tools to agents. Configure MCP servers in `mcp.json` at the project root.
1238
-
1239
- ### MCP Configuration
1240
-
1241
- ```json
1242
- {
1243
- "version": "1.0.0",
1244
- "servers": {
1245
- "<server-name>": {
1246
- "transport": "streamable-http | stdio | sse | sse-only",
1247
- "url": "https://server-url/mcp",
1248
- "command": "node",
1249
- "args": ["./mcp-server.js"],
1250
- "env": { "KEY": "VALUE" },
1251
- "headers": { "Authorization": "Bearer TOKEN" },
1252
- "timeout": 30000,
1253
- "enabled": true,
1254
- "description": "Server description"
1255
- }
1256
- },
1257
- "globalOptions": {
1258
- "throwOnLoadError": false,
1259
- "prefixToolNameWithServerName": true,
1260
- "additionalToolNamePrefix": "",
1261
- "defaultToolTimeout": 30000
1262
- }
1263
- }
1264
- ```
1265
-
1266
- ### Example MCP Configuration
379
+ Configure in `mcp.json`:
1267
380
 
1268
381
  ```json
1269
382
  {
@@ -1271,312 +384,92 @@ Model Context Protocol (MCP) servers provide external tools to agents. Configure
1271
384
  "servers": {
1272
385
  "fetch": {
1273
386
  "transport": "streamable-http",
1274
- "url": "https://remote.mcpservers.org/fetch/mcp",
1275
- "description": "Web fetch capabilities",
1276
- "timeout": 30000,
1277
- "enabled": true
387
+ "url": "https://remote.mcpservers.org/fetch/mcp"
1278
388
  },
1279
389
  "filesystem": {
1280
390
  "transport": "stdio",
1281
391
  "command": "npx",
1282
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
1283
- "description": "File system access"
392
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
1284
393
  }
1285
394
  }
1286
395
  }
1287
396
  ```
1288
397
 
1289
- Reference MCP tools in agents:
1290
- ```yaml
1291
- tools:
1292
- - mcp:fetch # All tools from "fetch" server
1293
- ```
1294
-
1295
- ## Agent Orcha Studio
1296
-
1297
- Agent Orcha includes a built-in web dashboard accessible at `http://localhost:3000` when the server is running. The Studio provides a visual interface for managing and testing your entire Agent Orcha instance.
1298
-
1299
- ### Tabs
1300
-
1301
- - **Agents**: Browse all configured agents, invoke them with custom input, stream responses in real-time, and manage conversation sessions
1302
- - **Knowledge**: Browse and search knowledge stores (both vector and GraphRAG), view entities and communities for GraphRAG stores
1303
- - **MCP**: Browse MCP servers, view available tools per server, and call tools directly
1304
- - **Workflows**: Browse and execute workflows (both step-based and LangGraph), stream execution progress
1305
- - **IDE**: Full in-browser file editor with file tree navigation, syntax highlighting for YAML, JSON, and JavaScript, and hot-reload on save
1306
-
1307
- ## API Reference
1308
-
1309
- ### Health Check
1310
-
1311
- ```
1312
- GET /health
1313
- Response: { "status": "ok", "timestamp": "..." }
1314
- ```
1315
-
1316
- ### Agents
1317
-
1318
- | Method | Endpoint | Description |
1319
- |--------|----------|-------------|
1320
- | GET | `/api/agents` | List all agents |
1321
- | GET | `/api/agents/:name` | Get agent details |
1322
- | POST | `/api/agents/:name/invoke` | Run agent |
1323
- | POST | `/api/agents/:name/stream` | Stream agent response (SSE) |
1324
- | GET | `/api/agents/sessions/stats` | Get session statistics |
1325
- | GET | `/api/agents/sessions/:sessionId` | Get session details |
1326
- | DELETE | `/api/agents/sessions/:sessionId` | Clear session messages |
1327
-
1328
- **Invoke Request:**
1329
- ```json
1330
- {
1331
- "input": {
1332
- "topic": "your topic",
1333
- "context": "additional context"
1334
- },
1335
- "sessionId": "optional-session-id"
1336
- }
1337
- ```
1338
-
1339
- **Response:**
1340
- ```json
1341
- {
1342
- "output": "Agent response text",
1343
- "metadata": {
1344
- "tokensUsed": 150,
1345
- "toolCalls": [],
1346
- "duration": 1234,
1347
- "sessionId": "optional-session-id",
1348
- "messagesInSession": 4,
1349
- "structuredOutputValid": true
1350
- }
1351
- }
1352
- ```
1353
-
1354
- ### Workflows
1355
-
1356
- | Method | Endpoint | Description |
1357
- |--------|----------|-------------|
1358
- | GET | `/api/workflows` | List all workflows |
1359
- | GET | `/api/workflows/:name` | Get workflow details |
1360
- | POST | `/api/workflows/:name/run` | Execute workflow |
1361
- | POST | `/api/workflows/:name/stream` | Stream workflow execution (SSE) |
1362
-
1363
- **Run Request:**
1364
- ```json
1365
- {
1366
- "input": {
1367
- "topic": "research topic",
1368
- "style": "professional"
1369
- }
1370
- }
1371
- ```
1372
-
1373
- **Response:**
1374
- ```json
1375
- {
1376
- "output": {
1377
- "paper": "Final content",
1378
- "summary": "Key points"
1379
- },
1380
- "metadata": {
1381
- "duration": 5000,
1382
- "stepsExecuted": 3,
1383
- "success": true
1384
- },
1385
- "stepResults": {
1386
- "research": { "output": "...", "metadata": {} },
1387
- "summarize": { "output": "...", "metadata": {} }
1388
- }
1389
- }
1390
- ```
1391
-
1392
- ### Knowledge Stores
1393
-
1394
- | Method | Endpoint | Description |
1395
- |--------|----------|-------------|
1396
- | GET | `/api/knowledge` | List all knowledge stores |
1397
- | GET | `/api/knowledge/:name` | Get knowledge store config |
1398
- | POST | `/api/knowledge/:name/search` | Search knowledge store |
1399
- | POST | `/api/knowledge/:name/refresh` | Reload documents |
1400
- | POST | `/api/knowledge/:name/add` | Add documents |
1401
- | GET | `/api/knowledge/:name/entities` | Get GraphRAG entities |
1402
- | GET | `/api/knowledge/:name/communities` | Get GraphRAG communities |
1403
- | GET | `/api/knowledge/:name/edges` | Get GraphRAG edges |
398
+ Reference in agents with `mcp:fetch`.
1404
399
 
1405
- **Search Request:**
1406
- ```json
1407
- {
1408
- "query": "search term",
1409
- "k": 4
1410
- }
1411
- ```
1412
-
1413
- ### LLM
1414
-
1415
- | Method | Endpoint | Description |
1416
- |--------|----------|-------------|
1417
- | GET | `/api/llm` | List all LLM configurations |
1418
- | GET | `/api/llm/:name` | Get LLM config details |
1419
- | POST | `/api/llm/:name/chat` | Chat with LLM (non-streaming) |
1420
- | POST | `/api/llm/:name/stream` | Chat with LLM (SSE streaming) |
1421
-
1422
- **Chat Request:**
1423
- ```json
1424
- {
1425
- "message": "Your message"
1426
- }
1427
- ```
1428
-
1429
- ### Functions
1430
-
1431
- | Method | Endpoint | Description |
1432
- |--------|----------|-------------|
1433
- | GET | `/api/functions` | List all functions |
1434
- | GET | `/api/functions/:name` | Get function details and schema |
1435
- | POST | `/api/functions/:name/call` | Call a function |
1436
-
1437
- **Call Request:**
1438
- ```json
1439
- {
1440
- "arguments": {
1441
- "a": 5,
1442
- "b": 3,
1443
- "operation": "add"
1444
- }
1445
- }
1446
- ```
1447
-
1448
- ### MCP
1449
-
1450
- | Method | Endpoint | Description |
1451
- |--------|----------|-------------|
1452
- | GET | `/api/mcp` | List all MCP servers |
1453
- | GET | `/api/mcp/:name` | Get MCP server config |
1454
- | GET | `/api/mcp/:name/tools` | List tools from server |
1455
- | POST | `/api/mcp/:name/call` | Call a tool on server |
1456
-
1457
- **Call Tool Request:**
1458
- ```json
1459
- {
1460
- "tool": "tool-name",
1461
- "arguments": { "url": "https://example.com" }
1462
- }
1463
- ```
1464
-
1465
- ### Files
400
+ ## Tool Types
1466
401
 
1467
- | Method | Endpoint | Description |
1468
- |--------|----------|-------------|
1469
- | GET | `/api/files/tree` | Get project directory tree |
1470
- | GET | `/api/files/read?path=...` | Read file contents |
1471
- | PUT | `/api/files/write` | Write file contents |
1472
-
1473
- **Write File Request:**
1474
- ```json
1475
- {
1476
- "path": "agents/new-agent.agent.yaml",
1477
- "content": "name: new-agent\n..."
1478
- }
1479
- ```
402
+ | Prefix | Description |
403
+ |--------|-------------|
404
+ | `mcp:<server>` | External tools from MCP servers |
405
+ | `knowledge:<store>` | Semantic search on knowledge stores |
406
+ | `function:<name>` | Custom JavaScript functions |
407
+ | `builtin:<name>` | Framework tools (`ask_user`, `memory_save`) |
408
+ | `sandbox:exec` | JavaScript execution in sandboxed VM |
409
+ | `sandbox:shell` | Shell commands (non-root sandbox user) |
410
+ | `sandbox:web_fetch` | URL fetching with SSRF protection |
411
+ | `sandbox:web_search` | Web search |
412
+ | `sandbox:browser_*` | CDP-based Chromium control (navigate, observe, click, type, screenshot, evaluate) |
413
+ | `sandbox:file_*` | Sandboxed file tools (read, write, edit, insert, replace_lines) scoped to `/tmp` |
414
+ | `project:read/write/delete` | Workspace file access |
415
+
416
+ ### Vision Browser (Experimental)
417
+
418
+ Pixel-coordinate browser control for vision LLMs. Enable with `EXPERIMENTAL_VISION=true`:
419
+
420
+ | Tool | Description |
421
+ |------|-------------|
422
+ | `sandbox_vision_screenshot` | Capture JPEG screenshot |
423
+ | `sandbox_vision_navigate` | Navigate to URL |
424
+ | `sandbox_vision_click` | Click at x,y coordinates |
425
+ | `sandbox_vision_type` | Type text |
426
+ | `sandbox_vision_scroll` | Scroll page |
427
+ | `sandbox_vision_key` | Press keyboard key |
428
+ | `sandbox_vision_drag` | Drag between coordinates |
429
+
430
+ Every action tool auto-captures a screenshot, cutting the screenshot-infer-act loop to one call per action.
431
+
432
+ ## API
433
+
434
+ Full API documentation is available at [agentorcha.com](https://agentorcha.com). Key endpoint groups:
435
+
436
+ | Group | Base Path | Description |
437
+ |-------|-----------|-------------|
438
+ | Health | `GET /health` | Health check |
439
+ | Auth | `/api/auth/*` | Login, logout, session check |
440
+ | Agents | `/api/agents/*` | List, invoke, stream, session management |
441
+ | Chat | `/api/chat/*` | Published agent standalone chat |
442
+ | Workflows | `/api/workflows/*` | List, run, stream |
443
+ | Knowledge | `/api/knowledge/*` | List, search, refresh, graph entities/edges |
444
+ | LLM | `/api/llm/*` | List configs, chat, stream |
445
+ | Functions | `/api/functions/*` | List, call |
446
+ | MCP | `/api/mcp/*` | List servers, list tools, call tools |
447
+ | Skills | `/api/skills/*` | List, inspect |
448
+ | Tasks | `/api/tasks/*` | Submit, track, cancel |
449
+ | Files | `/api/files/*` | File tree, read, write |
1480
450
 
1481
451
  ## Directory Structure
1482
452
 
1483
453
  ```
1484
454
  my-project/
1485
- ├── agents/ # Agent definitions (YAML)
1486
- ├── workflows/ # Workflow definitions (YAML)
1487
- ├── knowledge/ # Knowledge store configs and data
1488
- ├── functions/ # Custom function tools (JavaScript)
1489
- ├── public/ # Web UI (Studio)
1490
-
1491
- ├── llm.json # LLM and embedding configurations
1492
- ├── mcp.json # MCP server configuration
1493
- └── .env # Environment variables
1494
- ```
1495
-
1496
- **Framework source structure:**
1497
-
1498
- ```
1499
- agent-orcha/
1500
- ├── src/ # Server/API code
1501
- │ ├── index.ts # Entry point
1502
- │ ├── server.ts # Fastify server setup
1503
- │ ├── cli/ # CLI commands
1504
- │ └── routes/ # API route handlers
1505
- │ ├── agents.route.ts
1506
- │ ├── workflows.route.ts
1507
- │ ├── knowledge.route.ts
1508
- │ ├── llm.route.ts
1509
- │ ├── functions.route.ts
1510
- │ ├── mcp.route.ts
1511
- │ └── files.route.ts
1512
-
1513
- ├── lib/ # Core library
1514
- │ ├── orchestrator.ts # Main orchestrator class
1515
- │ ├── agents/ # Agent system
1516
- │ │ ├── types.ts
1517
- │ │ ├── agent-loader.ts
1518
- │ │ ├── agent-executor.ts
1519
- │ │ └── structured-output-wrapper.ts
1520
- │ ├── workflows/ # Workflow system
1521
- │ │ ├── types.ts
1522
- │ │ ├── workflow-loader.ts
1523
- │ │ ├── workflow-executor.ts
1524
- │ │ └── langgraph-executor.ts
1525
- │ ├── knowledge/ # Knowledge store system
1526
- │ │ ├── types.ts
1527
- │ │ ├── knowledge-store-manager.ts
1528
- │ │ └── graph-rag/
1529
- │ │ └── types.ts
1530
- │ ├── memory/ # Conversation memory
1531
- │ │ └── conversation-store.ts
1532
- │ ├── llm/ # LLM factory
1533
- │ │ └── llm-factory.ts
1534
- │ ├── mcp/ # MCP client
1535
- │ │ └── mcp-client.ts
1536
- │ ├── functions/ # Function loader
1537
- │ └── tools/ # Tool registry and discovery
1538
- │ ├── tool-registry.ts
1539
- │ └── tool-discovery.ts
1540
-
1541
- ├── public/ # Web UI (Studio)
1542
- │ └── src/
1543
- │ ├── components/ # Web components
1544
- │ └── services/ # API client
1545
-
1546
- ├── templates/ # Project initialization templates
1547
- └── docs/ # Documentation website
1548
- ```
1549
-
1550
- ## Tool Types
1551
-
1552
- ### Function Tools
1553
- Custom JavaScript functions you create in the `functions/` directory:
1554
- ```yaml
1555
- tools:
1556
- - function:fibonacci # References fibonacci.function.js
1557
- - function:calculator
455
+ ├── agents/ # Agent definitions (YAML)
456
+ ├── workflows/ # Workflow definitions (YAML)
457
+ ├── knowledge/ # Knowledge store configs and data
458
+ ├── functions/ # Custom function tools (JavaScript)
459
+ ├── skills/ # Skill prompt files (Markdown)
460
+ ├── llm.json # LLM and embedding configurations
461
+ ├── mcp.json # MCP server configuration
462
+ └── .env # Environment variables
1558
463
  ```
1559
464
 
1560
- ### MCP Tools
1561
- External tools from MCP servers:
1562
- ```yaml
1563
- tools:
1564
- - mcp:fetch # All tools from "fetch" server
1565
- ```
465
+ ## Development
1566
466
 
1567
- ### Knowledge Tools
1568
- Semantic search on knowledge stores:
1569
- ```yaml
1570
- tools:
1571
- - knowledge:transcripts # Search "transcripts" store
1572
- - knowledge:docs # Search "docs" store
1573
- ```
1574
-
1575
- ### Built-in Tools
1576
- Framework-provided tools:
1577
- ```yaml
1578
- tools:
1579
- - builtin:ask_user # Human-in-the-loop (LangGraph only)
467
+ ```bash
468
+ npm run dev # Dev server with auto-reload
469
+ npm run build # Build
470
+ npm start # Run build
471
+ npm run lint # ESLint
472
+ npm run typecheck # TypeScript type checking
1580
473
  ```
1581
474
 
1582
475
  ## License