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.
- package/README.md +216 -1323
- package/dist/lib/agents/agent-executor.d.ts +15 -4
- package/dist/lib/agents/agent-executor.d.ts.map +1 -1
- package/dist/lib/agents/agent-executor.js +337 -87
- package/dist/lib/agents/agent-executor.js.map +1 -1
- package/dist/lib/agents/agent-loader.d.ts +4 -1
- package/dist/lib/agents/agent-loader.d.ts.map +1 -1
- package/dist/lib/agents/agent-loader.js +20 -4
- package/dist/lib/agents/agent-loader.js.map +1 -1
- package/dist/lib/agents/index.d.ts +5 -5
- package/dist/lib/agents/index.js +4 -4
- package/dist/lib/agents/react-loop.d.ts +30 -0
- package/dist/lib/agents/react-loop.d.ts.map +1 -0
- package/dist/lib/agents/react-loop.js +193 -0
- package/dist/lib/agents/react-loop.js.map +1 -0
- package/dist/lib/agents/structured-output-wrapper.d.ts +3 -3
- package/dist/lib/agents/structured-output-wrapper.d.ts.map +1 -1
- package/dist/lib/agents/structured-output-wrapper.js +2 -2
- package/dist/lib/agents/structured-output-wrapper.js.map +1 -1
- package/dist/lib/agents/types.d.ts +306 -19
- package/dist/lib/agents/types.d.ts.map +1 -1
- package/dist/lib/agents/types.js +34 -4
- package/dist/lib/agents/types.js.map +1 -1
- package/dist/lib/functions/function-loader.d.ts +3 -1
- package/dist/lib/functions/function-loader.d.ts.map +1 -1
- package/dist/lib/functions/function-loader.js +23 -5
- package/dist/lib/functions/function-loader.js.map +1 -1
- package/dist/lib/functions/index.d.ts +2 -2
- package/dist/lib/functions/index.js +1 -1
- package/dist/lib/functions/simple-function-wrapper.d.ts +2 -11
- package/dist/lib/functions/simple-function-wrapper.d.ts.map +1 -1
- package/dist/lib/functions/simple-function-wrapper.js +3 -3
- package/dist/lib/functions/simple-function-wrapper.js.map +1 -1
- package/dist/lib/index.d.ts +29 -17
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +21 -9
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/integrations/collabnook.d.ts +56 -0
- package/dist/lib/integrations/collabnook.d.ts.map +1 -0
- package/dist/lib/integrations/collabnook.js +307 -0
- package/dist/lib/integrations/collabnook.js.map +1 -0
- package/dist/lib/integrations/email.d.ts +38 -0
- package/dist/lib/integrations/email.d.ts.map +1 -0
- package/dist/lib/integrations/email.js +249 -0
- package/dist/lib/integrations/email.js.map +1 -0
- package/dist/lib/integrations/integration-manager.d.ts +19 -0
- package/dist/lib/integrations/integration-manager.d.ts.map +1 -0
- package/dist/lib/integrations/integration-manager.js +159 -0
- package/dist/lib/integrations/integration-manager.js.map +1 -0
- package/dist/lib/integrations/types.d.ts +232 -0
- package/dist/lib/integrations/types.d.ts.map +1 -0
- package/dist/lib/integrations/types.js +37 -0
- package/dist/lib/integrations/types.js.map +1 -0
- package/dist/lib/knowledge/direct-mapper.d.ts +21 -0
- package/dist/lib/knowledge/direct-mapper.d.ts.map +1 -0
- package/dist/lib/knowledge/direct-mapper.js +134 -0
- package/dist/lib/knowledge/direct-mapper.js.map +1 -0
- package/dist/lib/knowledge/index.d.ts +9 -8
- package/dist/lib/knowledge/index.d.ts.map +1 -1
- package/dist/lib/knowledge/index.js +9 -7
- package/dist/lib/knowledge/index.js.map +1 -1
- package/dist/lib/knowledge/knowledge-store-metadata.d.ts +40 -0
- package/dist/lib/knowledge/knowledge-store-metadata.d.ts.map +1 -0
- package/dist/lib/knowledge/knowledge-store-metadata.js +93 -0
- package/dist/lib/knowledge/knowledge-store-metadata.js.map +1 -0
- package/dist/lib/knowledge/knowledge-store.d.ts +49 -0
- package/dist/lib/knowledge/knowledge-store.d.ts.map +1 -0
- package/dist/lib/knowledge/knowledge-store.js +670 -0
- package/dist/lib/knowledge/knowledge-store.js.map +1 -0
- package/dist/lib/knowledge/loaders/database-loader.d.ts +5 -5
- package/dist/lib/knowledge/loaders/database-loader.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/database-loader.js +21 -10
- package/dist/lib/knowledge/loaders/database-loader.js.map +1 -1
- package/dist/lib/knowledge/loaders/file-loaders.d.ts +45 -0
- package/dist/lib/knowledge/loaders/file-loaders.d.ts.map +1 -0
- package/dist/lib/knowledge/loaders/file-loaders.js +160 -0
- package/dist/lib/knowledge/loaders/file-loaders.js.map +1 -0
- package/dist/lib/knowledge/loaders/index.d.ts +3 -3
- package/dist/lib/knowledge/loaders/index.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/index.js +3 -3
- package/dist/lib/knowledge/loaders/index.js.map +1 -1
- package/dist/lib/knowledge/loaders/web-loader.d.ts +14 -5
- package/dist/lib/knowledge/loaders/web-loader.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/web-loader.js +64 -29
- package/dist/lib/knowledge/loaders/web-loader.js.map +1 -1
- package/dist/lib/knowledge/sqlite-store.d.ts +107 -0
- package/dist/lib/knowledge/sqlite-store.d.ts.map +1 -0
- package/dist/lib/knowledge/sqlite-store.js +327 -0
- package/dist/lib/knowledge/sqlite-store.js.map +1 -0
- package/dist/lib/knowledge/types.d.ts +124 -1448
- package/dist/lib/knowledge/types.d.ts.map +1 -1
- package/dist/lib/knowledge/types.js +54 -60
- package/dist/lib/knowledge/types.js.map +1 -1
- package/dist/lib/knowledge/utils/connection-pool.d.ts +3 -2
- package/dist/lib/knowledge/utils/connection-pool.d.ts.map +1 -1
- package/dist/lib/knowledge/utils/connection-pool.js +20 -10
- package/dist/lib/knowledge/utils/connection-pool.js.map +1 -1
- package/dist/lib/knowledge/utils/index.d.ts +2 -2
- package/dist/lib/knowledge/utils/index.js +2 -2
- package/dist/lib/llm/index.d.ts +5 -5
- package/dist/lib/llm/index.d.ts.map +1 -1
- package/dist/lib/llm/index.js +3 -3
- package/dist/lib/llm/index.js.map +1 -1
- package/dist/lib/llm/llm-call-logger.d.ts +39 -0
- package/dist/lib/llm/llm-call-logger.d.ts.map +1 -0
- package/dist/lib/llm/llm-call-logger.js +110 -0
- package/dist/lib/llm/llm-call-logger.js.map +1 -0
- package/dist/lib/llm/llm-config.d.ts +30 -16
- package/dist/lib/llm/llm-config.d.ts.map +1 -1
- package/dist/lib/llm/llm-config.js +22 -4
- package/dist/lib/llm/llm-config.js.map +1 -1
- package/dist/lib/llm/llm-factory.d.ts +3 -16
- package/dist/lib/llm/llm-factory.d.ts.map +1 -1
- package/dist/lib/llm/llm-factory.js +33 -48
- package/dist/lib/llm/llm-factory.js.map +1 -1
- package/dist/lib/llm/provider-detector.d.ts +1 -1
- package/dist/lib/llm/providers/anthropic-chat-model.d.ts +31 -0
- package/dist/lib/llm/providers/anthropic-chat-model.d.ts.map +1 -0
- package/dist/lib/llm/providers/anthropic-chat-model.js +262 -0
- package/dist/lib/llm/providers/anthropic-chat-model.js.map +1 -0
- package/dist/lib/llm/providers/gemini-chat-model.d.ts +30 -0
- package/dist/lib/llm/providers/gemini-chat-model.d.ts.map +1 -0
- package/dist/lib/llm/providers/gemini-chat-model.js +300 -0
- package/dist/lib/llm/providers/gemini-chat-model.js.map +1 -0
- package/dist/lib/llm/providers/gemini-embeddings.d.ts +14 -0
- package/dist/lib/llm/providers/gemini-embeddings.d.ts.map +1 -0
- package/dist/lib/llm/providers/gemini-embeddings.js +20 -0
- package/dist/lib/llm/providers/gemini-embeddings.js.map +1 -0
- package/dist/lib/llm/providers/openai-chat-model.d.ts +39 -0
- package/dist/lib/llm/providers/openai-chat-model.d.ts.map +1 -0
- package/dist/lib/llm/providers/openai-chat-model.js +397 -0
- package/dist/lib/llm/providers/openai-chat-model.js.map +1 -0
- package/dist/lib/llm/providers/openai-embeddings.d.ts +17 -0
- package/dist/lib/llm/providers/openai-embeddings.d.ts.map +1 -0
- package/dist/lib/llm/providers/openai-embeddings.js +35 -0
- package/dist/lib/llm/providers/openai-embeddings.js.map +1 -0
- package/dist/lib/llm/types.d.ts +2 -2
- package/dist/lib/llm/types.js +1 -1
- package/dist/lib/logger.d.ts +7 -0
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +42 -4
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/mcp/index.d.ts +3 -3
- package/dist/lib/mcp/index.js +2 -2
- package/dist/lib/mcp/mcp-client.d.ts +3 -2
- package/dist/lib/mcp/mcp-client.d.ts.map +1 -1
- package/dist/lib/mcp/mcp-client.js +10 -5
- package/dist/lib/mcp/mcp-client.js.map +1 -1
- package/dist/lib/mcp/types.d.ts +26 -25
- package/dist/lib/mcp/types.d.ts.map +1 -1
- package/dist/lib/mcp/types.js +12 -4
- package/dist/lib/mcp/types.js.map +1 -1
- package/dist/lib/memory/conversation-store.d.ts +2 -2
- package/dist/lib/memory/conversation-store.d.ts.map +1 -1
- package/dist/lib/memory/conversation-store.js +1 -1
- package/dist/lib/memory/index.d.ts +3 -2
- package/dist/lib/memory/index.d.ts.map +1 -1
- package/dist/lib/memory/index.js +3 -2
- package/dist/lib/memory/index.js.map +1 -1
- package/dist/lib/memory/memory-manager.d.ts +10 -0
- package/dist/lib/memory/memory-manager.d.ts.map +1 -0
- package/dist/lib/memory/memory-manager.js +43 -0
- package/dist/lib/memory/memory-manager.js.map +1 -0
- package/dist/lib/memory/types.d.ts +1 -1
- package/dist/lib/memory/types.d.ts.map +1 -1
- package/dist/lib/orchestrator.d.ts +72 -18
- package/dist/lib/orchestrator.d.ts.map +1 -1
- package/dist/lib/orchestrator.js +341 -56
- package/dist/lib/orchestrator.js.map +1 -1
- package/dist/lib/sandbox/cdp-client.d.ts +14 -0
- package/dist/lib/sandbox/cdp-client.d.ts.map +1 -0
- package/dist/lib/sandbox/cdp-client.js +113 -0
- package/dist/lib/sandbox/cdp-client.js.map +1 -0
- package/dist/lib/sandbox/html-to-markdown.d.ts +10 -0
- package/dist/lib/sandbox/html-to-markdown.d.ts.map +1 -0
- package/dist/lib/sandbox/html-to-markdown.js +121 -0
- package/dist/lib/sandbox/html-to-markdown.js.map +1 -0
- package/dist/lib/sandbox/index.d.ts +12 -0
- package/dist/lib/sandbox/index.d.ts.map +1 -0
- package/dist/lib/sandbox/index.js +10 -0
- package/dist/lib/sandbox/index.js.map +1 -0
- package/dist/lib/sandbox/page-readiness.d.ts +37 -0
- package/dist/lib/sandbox/page-readiness.d.ts.map +1 -0
- package/dist/lib/sandbox/page-readiness.js +235 -0
- package/dist/lib/sandbox/page-readiness.js.map +1 -0
- package/dist/lib/sandbox/sandbox-browser.d.ts +4 -0
- package/dist/lib/sandbox/sandbox-browser.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-browser.js +303 -0
- package/dist/lib/sandbox/sandbox-browser.js.map +1 -0
- package/dist/lib/sandbox/sandbox-exec.d.ts +5 -0
- package/dist/lib/sandbox/sandbox-exec.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-exec.js +35 -0
- package/dist/lib/sandbox/sandbox-exec.js.map +1 -0
- package/dist/lib/sandbox/sandbox-file.d.ts +4 -0
- package/dist/lib/sandbox/sandbox-file.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-file.js +168 -0
- package/dist/lib/sandbox/sandbox-file.js.map +1 -0
- package/dist/lib/sandbox/sandbox-shell.d.ts +4 -0
- package/dist/lib/sandbox/sandbox-shell.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-shell.js +93 -0
- package/dist/lib/sandbox/sandbox-shell.js.map +1 -0
- package/dist/lib/sandbox/sandbox-web.d.ts +5 -0
- package/dist/lib/sandbox/sandbox-web.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-web.js +226 -0
- package/dist/lib/sandbox/sandbox-web.js.map +1 -0
- package/dist/lib/sandbox/types.d.ts +30 -0
- package/dist/lib/sandbox/types.d.ts.map +1 -0
- package/dist/lib/sandbox/types.js +8 -0
- package/dist/lib/sandbox/types.js.map +1 -0
- package/dist/lib/sandbox/vision-browser.d.ts +4 -0
- package/dist/lib/sandbox/vision-browser.d.ts.map +1 -0
- package/dist/lib/sandbox/vision-browser.js +289 -0
- package/dist/lib/sandbox/vision-browser.js.map +1 -0
- package/dist/lib/sandbox/vm-executor.d.ts +12 -0
- package/dist/lib/sandbox/vm-executor.d.ts.map +1 -0
- package/dist/lib/sandbox/vm-executor.js +101 -0
- package/dist/lib/sandbox/vm-executor.js.map +1 -0
- package/dist/lib/skills/index.d.ts +4 -0
- package/dist/lib/skills/index.d.ts.map +1 -0
- package/dist/lib/skills/index.js +3 -0
- package/dist/lib/skills/index.js.map +1 -0
- package/dist/lib/skills/skill-loader.d.ts +21 -0
- package/dist/lib/skills/skill-loader.d.ts.map +1 -0
- package/dist/lib/skills/skill-loader.js +116 -0
- package/dist/lib/skills/skill-loader.js.map +1 -0
- package/dist/lib/skills/types.d.ts +17 -0
- package/dist/lib/skills/types.d.ts.map +1 -0
- package/dist/lib/skills/types.js +6 -0
- package/dist/lib/skills/types.js.map +1 -0
- package/dist/lib/tasks/index.d.ts +4 -0
- package/dist/lib/tasks/index.d.ts.map +1 -0
- package/dist/lib/tasks/index.js +4 -0
- package/dist/lib/tasks/index.js.map +1 -0
- package/dist/lib/tasks/task-manager.d.ts +27 -0
- package/dist/lib/tasks/task-manager.d.ts.map +1 -0
- package/dist/lib/tasks/task-manager.js +200 -0
- package/dist/lib/tasks/task-manager.js.map +1 -0
- package/dist/lib/tasks/task-store.d.ts +20 -0
- package/dist/lib/tasks/task-store.d.ts.map +1 -0
- package/dist/lib/tasks/task-store.js +102 -0
- package/dist/lib/tasks/task-store.js.map +1 -0
- package/dist/lib/tasks/types.d.ts +56 -0
- package/dist/lib/tasks/types.d.ts.map +1 -0
- package/dist/lib/tasks/types.js +2 -0
- package/dist/lib/tasks/types.js.map +1 -0
- package/dist/lib/templates/resource-templates.d.ts +6 -0
- package/dist/lib/templates/resource-templates.d.ts.map +1 -0
- package/dist/lib/templates/resource-templates.js +146 -0
- package/dist/lib/templates/resource-templates.js.map +1 -0
- package/dist/lib/tools/agent-tool-wrapper.d.ts +5 -5
- package/dist/lib/tools/agent-tool-wrapper.js +3 -3
- package/dist/lib/tools/agent-tool-wrapper.js.map +1 -1
- package/dist/lib/tools/built-in/ask-user.tool.d.ts +1 -1
- package/dist/lib/tools/built-in/ask-user.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/ask-user.tool.js +2 -2
- package/dist/lib/tools/built-in/ask-user.tool.js.map +1 -1
- package/dist/lib/tools/built-in/index.d.ts +9 -2
- package/dist/lib/tools/built-in/index.d.ts.map +1 -1
- package/dist/lib/tools/built-in/index.js +9 -2
- package/dist/lib/tools/built-in/index.js.map +1 -1
- package/dist/lib/tools/built-in/integration-tools.d.ts +4 -0
- package/dist/lib/tools/built-in/integration-tools.d.ts.map +1 -0
- package/dist/lib/tools/built-in/integration-tools.js +47 -0
- package/dist/lib/tools/built-in/integration-tools.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts +9 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js +108 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts +9 -0
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js +96 -0
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-search.tool.d.ts +2 -2
- package/dist/lib/tools/built-in/knowledge-search.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-search.tool.js +1 -1
- package/dist/lib/tools/built-in/knowledge-search.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts +7 -0
- package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/knowledge-sql.tool.js +128 -0
- package/dist/lib/tools/built-in/knowledge-sql.tool.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-tools-factory.d.ts +17 -0
- package/dist/lib/tools/built-in/knowledge-tools-factory.d.ts.map +1 -0
- package/dist/lib/tools/built-in/knowledge-tools-factory.js +54 -0
- package/dist/lib/tools/built-in/knowledge-tools-factory.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts +9 -0
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js +91 -0
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js.map +1 -0
- package/dist/lib/tools/built-in/memory-save.tool.d.ts +4 -0
- package/dist/lib/tools/built-in/memory-save.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/memory-save.tool.js +21 -0
- package/dist/lib/tools/built-in/memory-save.tool.js.map +1 -0
- package/dist/lib/tools/built-in/query-validators.d.ts +18 -0
- package/dist/lib/tools/built-in/query-validators.d.ts.map +1 -0
- package/dist/lib/tools/built-in/query-validators.js +91 -0
- package/dist/lib/tools/built-in/query-validators.js.map +1 -0
- package/dist/lib/tools/index.d.ts +4 -4
- package/dist/lib/tools/index.js +4 -4
- package/dist/lib/tools/tool-discovery.d.ts +11 -33
- package/dist/lib/tools/tool-discovery.d.ts.map +1 -1
- package/dist/lib/tools/tool-discovery.js +16 -43
- package/dist/lib/tools/tool-discovery.js.map +1 -1
- package/dist/lib/tools/tool-registry.d.ts +10 -18
- package/dist/lib/tools/tool-registry.d.ts.map +1 -1
- package/dist/lib/tools/tool-registry.js +37 -23
- package/dist/lib/tools/tool-registry.js.map +1 -1
- package/dist/lib/tools/workspace/workspace-tools.d.ts +61 -0
- package/dist/lib/tools/workspace/workspace-tools.d.ts.map +1 -0
- package/dist/lib/tools/workspace/workspace-tools.js +179 -0
- package/dist/lib/tools/workspace/workspace-tools.js.map +1 -0
- package/dist/lib/triggers/cron-trigger.d.ts +12 -0
- package/dist/lib/triggers/cron-trigger.d.ts.map +1 -0
- package/dist/lib/triggers/cron-trigger.js +45 -0
- package/dist/lib/triggers/cron-trigger.js.map +1 -0
- package/dist/lib/triggers/index.d.ts +6 -0
- package/dist/lib/triggers/index.d.ts.map +1 -0
- package/dist/lib/triggers/index.js +5 -0
- package/dist/lib/triggers/index.js.map +1 -0
- package/dist/lib/triggers/trigger-manager.d.ts +12 -0
- package/dist/lib/triggers/trigger-manager.d.ts.map +1 -0
- package/dist/lib/triggers/trigger-manager.js +77 -0
- package/dist/lib/triggers/trigger-manager.js.map +1 -0
- package/dist/lib/triggers/types.d.ts +57 -0
- package/dist/lib/triggers/types.d.ts.map +1 -0
- package/dist/lib/triggers/types.js +16 -0
- package/dist/lib/triggers/types.js.map +1 -0
- package/dist/lib/triggers/webhook-trigger.d.ts +12 -0
- package/dist/lib/triggers/webhook-trigger.d.ts.map +1 -0
- package/dist/lib/triggers/webhook-trigger.js +34 -0
- package/dist/lib/triggers/webhook-trigger.js.map +1 -0
- package/dist/lib/types/llm-types.d.ts +72 -0
- package/dist/lib/types/llm-types.d.ts.map +1 -0
- package/dist/lib/types/llm-types.js +72 -0
- package/dist/lib/types/llm-types.js.map +1 -0
- package/dist/lib/types/text-splitters.d.ts +27 -0
- package/dist/lib/types/text-splitters.d.ts.map +1 -0
- package/dist/lib/types/text-splitters.js +114 -0
- package/dist/lib/types/text-splitters.js.map +1 -0
- package/dist/lib/types/tool-factory.d.ts +9 -0
- package/dist/lib/types/tool-factory.d.ts.map +1 -0
- package/dist/lib/types/tool-factory.js +12 -0
- package/dist/lib/types/tool-factory.js.map +1 -0
- package/dist/lib/utils/env-substitution.d.ts +6 -0
- package/dist/lib/utils/env-substitution.d.ts.map +1 -0
- package/dist/lib/utils/env-substitution.js +15 -0
- package/dist/lib/utils/env-substitution.js.map +1 -0
- package/dist/lib/utils/file-utils.d.ts +11 -0
- package/dist/lib/utils/file-utils.d.ts.map +1 -0
- package/dist/lib/utils/file-utils.js +86 -0
- package/dist/lib/utils/file-utils.js.map +1 -0
- package/dist/lib/workflows/index.d.ts +6 -6
- package/dist/lib/workflows/index.d.ts.map +1 -1
- package/dist/lib/workflows/index.js +5 -5
- package/dist/lib/workflows/index.js.map +1 -1
- package/dist/lib/workflows/interrupt-manager.d.ts +1 -1
- package/dist/lib/workflows/interrupt-manager.js +1 -1
- package/dist/lib/workflows/react-workflow-executor.d.ts +26 -0
- package/dist/lib/workflows/react-workflow-executor.d.ts.map +1 -0
- package/dist/lib/workflows/react-workflow-executor.js +333 -0
- package/dist/lib/workflows/react-workflow-executor.js.map +1 -0
- package/dist/lib/workflows/types.d.ts +106 -107
- package/dist/lib/workflows/types.d.ts.map +1 -1
- package/dist/lib/workflows/types.js +5 -5
- package/dist/lib/workflows/types.js.map +1 -1
- package/dist/lib/workflows/workflow-executor.d.ts +3 -3
- package/dist/lib/workflows/workflow-executor.js +2 -2
- package/dist/lib/workflows/workflow-executor.js.map +1 -1
- package/dist/lib/workflows/workflow-loader.d.ts +4 -1
- package/dist/lib/workflows/workflow-loader.d.ts.map +1 -1
- package/dist/lib/workflows/workflow-loader.js +20 -4
- package/dist/lib/workflows/workflow-loader.js.map +1 -1
- package/dist/public/chat.html +114 -0
- package/dist/public/index.html +189 -0
- package/dist/public/src/components/AgentComposer.js +807 -0
- package/dist/public/src/components/AgentsView.js +1021 -344
- package/dist/public/src/components/AppRoot.js +150 -5
- package/dist/public/src/components/GraphView.js +420 -0
- package/dist/public/src/components/IdeView.js +625 -14
- package/dist/public/src/components/KnowledgeView.js +443 -66
- package/dist/public/src/components/MonitorView.js +526 -0
- package/dist/public/src/components/NavBar.js +3 -0
- package/dist/public/src/components/SkillsView.js +137 -0
- package/dist/public/src/components/StandaloneChat.js +889 -0
- package/dist/public/src/components/WorkflowsView.js +454 -129
- package/dist/public/src/services/ApiService.js +170 -25
- package/dist/public/src/services/SessionStore.js +83 -0
- package/dist/public/src/store.js +3 -4
- package/dist/public/src/utils/markdown.js +14 -0
- package/dist/src/cli/commands/init.js +2 -2
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/start.d.ts +0 -1
- package/dist/src/cli/commands/start.d.ts.map +1 -1
- package/dist/src/cli/commands/start.js +23 -14
- package/dist/src/cli/commands/start.js.map +1 -1
- package/dist/src/cli/index.js +8 -5
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +23 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/middleware/auth.d.ts +3 -0
- package/dist/src/middleware/auth.d.ts.map +1 -0
- package/dist/src/middleware/auth.js +129 -0
- package/dist/src/middleware/auth.js.map +1 -0
- package/dist/src/middleware/rate-limit.d.ts +8 -0
- package/dist/src/middleware/rate-limit.d.ts.map +1 -0
- package/dist/src/middleware/rate-limit.js +21 -0
- package/dist/src/middleware/rate-limit.js.map +1 -0
- package/dist/src/routes/agents.route.d.ts.map +1 -1
- package/dist/src/routes/agents.route.js +167 -12
- package/dist/src/routes/agents.route.js.map +1 -1
- package/dist/src/routes/chat.route.d.ts +3 -0
- package/dist/src/routes/chat.route.d.ts.map +1 -0
- package/dist/src/routes/chat.route.js +155 -0
- package/dist/src/routes/chat.route.js.map +1 -0
- package/dist/src/routes/files.route.d.ts.map +1 -1
- package/dist/src/routes/files.route.js +163 -87
- package/dist/src/routes/files.route.js.map +1 -1
- package/dist/src/routes/functions.route.js +1 -1
- package/dist/src/routes/graph.route.d.ts +3 -0
- package/dist/src/routes/graph.route.d.ts.map +1 -0
- package/dist/src/routes/graph.route.js +173 -0
- package/dist/src/routes/graph.route.js.map +1 -0
- package/dist/src/routes/knowledge.route.d.ts.map +1 -1
- package/dist/src/routes/knowledge.route.js +172 -69
- package/dist/src/routes/knowledge.route.js.map +1 -1
- package/dist/src/routes/llm.route.d.ts.map +1 -1
- package/dist/src/routes/llm.route.js +85 -9
- package/dist/src/routes/llm.route.js.map +1 -1
- package/dist/src/routes/mcp.route.js +1 -1
- package/dist/src/routes/skills.route.d.ts +3 -0
- package/dist/src/routes/skills.route.d.ts.map +1 -0
- package/dist/src/routes/skills.route.js +23 -0
- package/dist/src/routes/skills.route.js.map +1 -0
- package/dist/src/routes/tasks.route.d.ts +3 -0
- package/dist/src/routes/tasks.route.d.ts.map +1 -0
- package/dist/src/routes/tasks.route.js +149 -0
- package/dist/src/routes/tasks.route.js.map +1 -0
- package/dist/src/routes/vnc.route.d.ts +3 -0
- package/dist/src/routes/vnc.route.d.ts.map +1 -0
- package/dist/src/routes/vnc.route.js +49 -0
- package/dist/src/routes/vnc.route.js.map +1 -0
- package/dist/src/routes/workflows.route.d.ts.map +1 -1
- package/dist/src/routes/workflows.route.js +9 -1
- package/dist/src/routes/workflows.route.js.map +1 -1
- package/dist/src/server.d.ts +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +26 -9
- package/dist/src/server.js.map +1 -1
- package/dist/templates/.env.example +4 -19
- package/dist/templates/Demo.md +152 -0
- package/dist/templates/README.md +28 -11
- package/dist/templates/agents/architect.agent.yaml +57 -0
- package/dist/templates/agents/chatbot.agent.yaml +55 -0
- package/dist/templates/agents/corporate.agent.yaml +65 -0
- package/dist/templates/agents/investment-analyst.agent.yaml +80 -0
- package/dist/templates/agents/music-librarian.agent.yaml +70 -0
- package/dist/templates/agents/network-security.agent.yaml +82 -0
- package/dist/templates/agents/transport-security.agent.yaml +70 -0
- package/dist/templates/agents/web-engineer.agent.yaml +99 -0
- package/dist/templates/agents/web-pilot.agent.yaml +58 -0
- package/dist/templates/knowledge/music-store/LICENSE.md +11 -0
- package/dist/templates/knowledge/music-store/musicstore.sqlite +0 -0
- package/dist/templates/knowledge/music-store/tables.png +0 -0
- package/dist/templates/knowledge/music-store.knowledge.yaml +138 -0
- package/dist/templates/knowledge/org-chart/personnel.csv +21 -0
- package/dist/templates/knowledge/org-chart.knowledge.yaml +53 -0
- package/dist/templates/knowledge/pet-store/pet-store.db +0 -0
- package/dist/templates/knowledge/pet-store.knowledge.yaml +81 -0
- package/dist/templates/knowledge/security-incidents/incidents.json +55935 -0
- package/dist/templates/knowledge/security-incidents.knowledge.yaml +46 -0
- package/dist/templates/knowledge/transcripts.knowledge.yaml +29 -0
- package/dist/templates/knowledge/transport-ot/systems.csv +117 -0
- package/dist/templates/knowledge/transport-ot.knowledge.yaml +55 -0
- package/dist/templates/knowledge/web-docs.knowledge.yaml +20 -0
- package/dist/templates/llm.json +7 -30
- package/dist/templates/mcp.json +10 -4
- package/dist/templates/skills/orcha-builder/SKILL.md +219 -0
- package/dist/templates/skills/pii-guard/SKILL.md +22 -0
- package/dist/templates/skills/sandbox/SKILL.md +40 -0
- package/dist/templates/skills/web-pilot/SKILL.md +51 -0
- package/dist/templates/workflows/example.workflow.yaml +25 -30
- package/dist/templates/workflows/react-example.workflow.yaml +53 -0
- package/package.json +22 -20
- package/dist/lib/knowledge/graph-rag/community-detector.d.ts +0 -16
- package/dist/lib/knowledge/graph-rag/community-detector.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/community-detector.js +0 -81
- package/dist/lib/knowledge/graph-rag/community-detector.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts +0 -17
- package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/community-summarizer.js +0 -87
- package/dist/lib/knowledge/graph-rag/community-summarizer.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts +0 -36
- package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/entity-extractor.js +0 -192
- package/dist/lib/knowledge/graph-rag/entity-extractor.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts +0 -30
- package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/extraction-cache.js +0 -88
- package/dist/lib/knowledge/graph-rag/extraction-cache.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/global-search.d.ts +0 -19
- package/dist/lib/knowledge/graph-rag/global-search.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/global-search.js +0 -96
- package/dist/lib/knowledge/graph-rag/global-search.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts +0 -24
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.js +0 -239
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/index.d.ts +0 -14
- package/dist/lib/knowledge/graph-rag/index.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/index.js +0 -12
- package/dist/lib/knowledge/graph-rag/index.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/local-search.d.ts +0 -20
- package/dist/lib/knowledge/graph-rag/local-search.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/local-search.js +0 -110
- package/dist/lib/knowledge/graph-rag/local-search.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts +0 -31
- package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/memory-graph-store.js +0 -165
- package/dist/lib/knowledge/graph-rag/memory-graph-store.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts +0 -38
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js +0 -190
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts +0 -11
- package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/search-mode-detector.js +0 -50
- package/dist/lib/knowledge/graph-rag/search-mode-detector.js.map +0 -1
- package/dist/lib/knowledge/graph-rag/types.d.ts +0 -368
- package/dist/lib/knowledge/graph-rag/types.d.ts.map +0 -1
- package/dist/lib/knowledge/graph-rag/types.js +0 -48
- package/dist/lib/knowledge/graph-rag/types.js.map +0 -1
- package/dist/lib/knowledge/knowledge-store-factory.d.ts +0 -16
- package/dist/lib/knowledge/knowledge-store-factory.d.ts.map +0 -1
- package/dist/lib/knowledge/knowledge-store-factory.js +0 -376
- package/dist/lib/knowledge/knowledge-store-factory.js.map +0 -1
- package/dist/lib/knowledge/knowledge-store-manager.d.ts +0 -18
- package/dist/lib/knowledge/knowledge-store-manager.d.ts.map +0 -1
- package/dist/lib/knowledge/knowledge-store-manager.js +0 -98
- package/dist/lib/knowledge/knowledge-store-manager.js.map +0 -1
- package/dist/lib/knowledge/loaders/s3-loader.d.ts +0 -17
- package/dist/lib/knowledge/loaders/s3-loader.d.ts.map +0 -1
- package/dist/lib/knowledge/loaders/s3-loader.js +0 -185
- package/dist/lib/knowledge/loaders/s3-loader.js.map +0 -1
- package/dist/lib/workflows/langgraph-executor.d.ts +0 -51
- package/dist/lib/workflows/langgraph-executor.d.ts.map +0 -1
- package/dist/lib/workflows/langgraph-executor.js +0 -297
- package/dist/lib/workflows/langgraph-executor.js.map +0 -1
- package/dist/templates/agents/call-center-analyst-simple.agent.yaml +0 -36
- package/dist/templates/agents/math.agent.yaml +0 -28
- package/dist/templates/agents/sentiment-structured.agent.yaml +0 -42
- package/dist/templates/knowledge/example.knowledge.yaml +0 -28
- package/dist/templates/llm.md +0 -1195
- 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://
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
26
|
+
## Agent Orcha Studio
|
|
25
27
|
|
|
26
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
46
|
+
## Architecture
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
<p align="center">
|
|
49
|
+
<img src="docs/architecture.svg" alt="Agent Orcha Architecture" width="100%" />
|
|
50
|
+
</p>
|
|
41
51
|
|
|
42
|
-
|
|
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
|
-
|
|
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
|
-
|
|
60
|
+
Agent Orcha can be used in multiple ways:
|
|
52
61
|
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx agent-orcha start
|
|
88
|
-
```
|
|
71
|
+
### Docker
|
|
89
72
|
|
|
90
|
-
4. **Test your agent:**
|
|
91
73
|
```bash
|
|
92
|
-
|
|
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
|
-
|
|
77
|
+
An empty workspace is automatically scaffolded with example agents, workflows, and configurations.
|
|
98
78
|
|
|
99
|
-
|
|
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
|
-
|
|
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
|
-
|
|
127
|
-
|
|
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
|
|
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
|
|
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": "
|
|
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": "
|
|
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**:
|
|
301
|
-
- **Ollama**:
|
|
302
|
-
- **OpenAI**: Omit `baseUrl` (uses default
|
|
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
|
-
|
|
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
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
#
|
|
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
|
|
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
|
|
163
|
+
temperature: 0.5
|
|
407
164
|
|
|
408
165
|
prompt:
|
|
409
166
|
system: |
|
|
410
|
-
You are a thorough researcher.
|
|
411
|
-
|
|
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
|
-
|
|
428
|
-
|
|
429
|
-
|
|
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
|
-
|
|
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
|
-
|
|
466
|
-
const
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
678
|
-
|
|
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
|
-
|
|
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
|
-
|
|
268
|
+
Autonomous, prompt-driven workflows. The agent decides which tools and agents to call.
|
|
782
269
|
|
|
783
270
|
```yaml
|
|
784
|
-
name:
|
|
785
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
324
|
+
### Data Sources
|
|
894
325
|
|
|
895
|
-
|
|
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
|
-
|
|
330
|
+
### Knowledge Graph (Direct Mapping)
|
|
898
331
|
|
|
899
|
-
|
|
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
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
|
1468
|
-
|
|
1469
|
-
|
|
|
1470
|
-
|
|
|
1471
|
-
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
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/
|
|
1486
|
-
├── workflows/
|
|
1487
|
-
├── knowledge/
|
|
1488
|
-
├── functions/
|
|
1489
|
-
├──
|
|
1490
|
-
|
|
1491
|
-
├──
|
|
1492
|
-
|
|
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
|
-
|
|
1561
|
-
External tools from MCP servers:
|
|
1562
|
-
```yaml
|
|
1563
|
-
tools:
|
|
1564
|
-
- mcp:fetch # All tools from "fetch" server
|
|
1565
|
-
```
|
|
465
|
+
## Development
|
|
1566
466
|
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
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
|