agent-orcha 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +777 -100
- package/dist/lib/agents/agent-executor.d.ts +6 -1
- package/dist/lib/agents/agent-executor.d.ts.map +1 -1
- package/dist/lib/agents/agent-executor.js +241 -45
- package/dist/lib/agents/agent-executor.js.map +1 -1
- package/dist/lib/agents/agent-loader.d.ts.map +1 -1
- package/dist/lib/agents/agent-loader.js +3 -1
- package/dist/lib/agents/agent-loader.js.map +1 -1
- package/dist/lib/agents/index.d.ts +2 -1
- package/dist/lib/agents/index.d.ts.map +1 -1
- package/dist/lib/agents/index.js +1 -0
- package/dist/lib/agents/index.js.map +1 -1
- package/dist/lib/agents/structured-output-wrapper.d.ts +19 -0
- package/dist/lib/agents/structured-output-wrapper.d.ts.map +1 -0
- package/dist/lib/agents/structured-output-wrapper.js +104 -0
- package/dist/lib/agents/structured-output-wrapper.js.map +1 -0
- package/dist/lib/agents/types.d.ts +17 -10
- package/dist/lib/agents/types.d.ts.map +1 -1
- package/dist/lib/agents/types.js +1 -1
- package/dist/lib/agents/types.js.map +1 -1
- package/dist/lib/index.d.ts +9 -7
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +7 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/knowledge/graph-rag/community-detector.d.ts +16 -0
- package/dist/lib/knowledge/graph-rag/community-detector.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/community-detector.js +81 -0
- package/dist/lib/knowledge/graph-rag/community-detector.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts +17 -0
- package/dist/lib/knowledge/graph-rag/community-summarizer.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/community-summarizer.js +87 -0
- package/dist/lib/knowledge/graph-rag/community-summarizer.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts +36 -0
- package/dist/lib/knowledge/graph-rag/entity-extractor.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/entity-extractor.js +192 -0
- package/dist/lib/knowledge/graph-rag/entity-extractor.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts +30 -0
- package/dist/lib/knowledge/graph-rag/extraction-cache.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/extraction-cache.js +88 -0
- package/dist/lib/knowledge/graph-rag/extraction-cache.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/global-search.d.ts +19 -0
- package/dist/lib/knowledge/graph-rag/global-search.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/global-search.js +96 -0
- package/dist/lib/knowledge/graph-rag/global-search.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts +24 -0
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.js +239 -0
- package/dist/lib/knowledge/graph-rag/graph-rag-factory.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/index.d.ts +14 -0
- package/dist/lib/knowledge/graph-rag/index.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/index.js +12 -0
- package/dist/lib/knowledge/graph-rag/index.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/local-search.d.ts +20 -0
- package/dist/lib/knowledge/graph-rag/local-search.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/local-search.js +110 -0
- package/dist/lib/knowledge/graph-rag/local-search.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts +31 -0
- package/dist/lib/knowledge/graph-rag/memory-graph-store.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/memory-graph-store.js +165 -0
- package/dist/lib/knowledge/graph-rag/memory-graph-store.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts +38 -0
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js +190 -0
- package/dist/lib/knowledge/graph-rag/neo4j-graph-store.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts +11 -0
- package/dist/lib/knowledge/graph-rag/search-mode-detector.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/search-mode-detector.js +50 -0
- package/dist/lib/knowledge/graph-rag/search-mode-detector.js.map +1 -0
- package/dist/lib/knowledge/graph-rag/types.d.ts +368 -0
- package/dist/lib/knowledge/graph-rag/types.d.ts.map +1 -0
- package/dist/lib/knowledge/graph-rag/types.js +48 -0
- package/dist/lib/knowledge/graph-rag/types.js.map +1 -0
- package/dist/lib/knowledge/index.d.ts +9 -0
- package/dist/lib/knowledge/index.d.ts.map +1 -0
- package/dist/lib/knowledge/index.js +8 -0
- package/dist/lib/knowledge/index.js.map +1 -0
- package/dist/lib/knowledge/knowledge-store-factory.d.ts +16 -0
- package/dist/lib/knowledge/knowledge-store-factory.d.ts.map +1 -0
- package/dist/lib/{vectors/vector-store-factory.js → knowledge/knowledge-store-factory.js} +36 -10
- package/dist/lib/knowledge/knowledge-store-factory.js.map +1 -0
- package/dist/lib/knowledge/knowledge-store-manager.d.ts +18 -0
- package/dist/lib/knowledge/knowledge-store-manager.d.ts.map +1 -0
- package/dist/lib/knowledge/knowledge-store-manager.js +98 -0
- package/dist/lib/knowledge/knowledge-store-manager.js.map +1 -0
- package/dist/lib/knowledge/loaders/database-loader.d.ts +18 -0
- package/dist/lib/knowledge/loaders/database-loader.d.ts.map +1 -0
- package/dist/lib/knowledge/loaders/database-loader.js +115 -0
- package/dist/lib/knowledge/loaders/database-loader.js.map +1 -0
- package/dist/lib/knowledge/loaders/index.d.ts +4 -0
- package/dist/lib/knowledge/loaders/index.d.ts.map +1 -0
- package/dist/lib/knowledge/loaders/index.js +4 -0
- package/dist/lib/knowledge/loaders/index.js.map +1 -0
- package/dist/lib/knowledge/loaders/s3-loader.d.ts +17 -0
- package/dist/lib/knowledge/loaders/s3-loader.d.ts.map +1 -0
- package/dist/lib/knowledge/loaders/s3-loader.js +185 -0
- package/dist/lib/knowledge/loaders/s3-loader.js.map +1 -0
- package/dist/lib/knowledge/loaders/web-loader.d.ts +12 -0
- package/dist/lib/knowledge/loaders/web-loader.d.ts.map +1 -0
- package/dist/lib/knowledge/loaders/web-loader.js +56 -0
- package/dist/lib/knowledge/loaders/web-loader.js.map +1 -0
- package/dist/lib/knowledge/types.d.ts +1839 -0
- package/dist/lib/knowledge/types.d.ts.map +1 -0
- package/dist/lib/knowledge/types.js +111 -0
- package/dist/lib/knowledge/types.js.map +1 -0
- package/dist/lib/knowledge/utils/connection-pool.d.ts +18 -0
- package/dist/lib/knowledge/utils/connection-pool.d.ts.map +1 -0
- package/dist/lib/knowledge/utils/connection-pool.js +77 -0
- package/dist/lib/knowledge/utils/connection-pool.js.map +1 -0
- package/dist/lib/knowledge/utils/file-type-detector.d.ts +10 -0
- package/dist/lib/knowledge/utils/file-type-detector.d.ts.map +1 -0
- package/dist/lib/knowledge/utils/file-type-detector.js +32 -0
- package/dist/lib/knowledge/utils/file-type-detector.js.map +1 -0
- package/dist/lib/knowledge/utils/index.d.ts +3 -0
- package/dist/lib/knowledge/utils/index.d.ts.map +1 -0
- package/dist/lib/knowledge/utils/index.js +3 -0
- package/dist/lib/knowledge/utils/index.js.map +1 -0
- package/dist/lib/mcp/mcp-client.d.ts +9 -1
- package/dist/lib/mcp/mcp-client.d.ts.map +1 -1
- package/dist/lib/mcp/mcp-client.js +33 -0
- package/dist/lib/mcp/mcp-client.js.map +1 -1
- package/dist/lib/memory/conversation-store.d.ts +43 -0
- package/dist/lib/memory/conversation-store.d.ts.map +1 -0
- package/dist/lib/memory/conversation-store.js +109 -0
- package/dist/lib/memory/conversation-store.js.map +1 -0
- package/dist/lib/memory/index.d.ts +3 -0
- package/dist/lib/memory/index.d.ts.map +1 -0
- package/dist/lib/memory/index.js +3 -0
- package/dist/lib/memory/index.js.map +1 -0
- package/dist/lib/memory/types.d.ts +19 -0
- package/dist/lib/memory/types.d.ts.map +1 -0
- package/dist/lib/memory/types.js +6 -0
- package/dist/lib/memory/types.js.map +1 -0
- package/dist/lib/orchestrator.d.ts +56 -14
- package/dist/lib/orchestrator.d.ts.map +1 -1
- package/dist/lib/orchestrator.js +182 -25
- package/dist/lib/orchestrator.js.map +1 -1
- package/dist/lib/tools/agent-tool-wrapper.d.ts +22 -0
- package/dist/lib/tools/agent-tool-wrapper.d.ts.map +1 -0
- package/dist/lib/tools/agent-tool-wrapper.js +56 -0
- package/dist/lib/tools/agent-tool-wrapper.js.map +1 -0
- package/dist/lib/tools/built-in/ask-user.tool.d.ts +7 -0
- package/dist/lib/tools/built-in/ask-user.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/ask-user.tool.js +23 -0
- package/dist/lib/tools/built-in/ask-user.tool.js.map +1 -0
- package/dist/lib/tools/built-in/index.d.ts +2 -1
- package/dist/lib/tools/built-in/index.d.ts.map +1 -1
- package/dist/lib/tools/built-in/index.js +2 -1
- package/dist/lib/tools/built-in/index.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-search.tool.d.ts +4 -0
- package/dist/lib/tools/built-in/knowledge-search.tool.d.ts.map +1 -0
- package/dist/lib/tools/built-in/{vector-search.tool.js → knowledge-search.tool.js} +4 -4
- package/dist/lib/tools/built-in/knowledge-search.tool.js.map +1 -0
- package/dist/lib/tools/index.d.ts +3 -1
- package/dist/lib/tools/index.d.ts.map +1 -1
- package/dist/lib/tools/index.js +3 -1
- package/dist/lib/tools/index.js.map +1 -1
- package/dist/lib/tools/tool-discovery.d.ts +50 -0
- package/dist/lib/tools/tool-discovery.d.ts.map +1 -0
- package/dist/lib/tools/tool-discovery.js +178 -0
- package/dist/lib/tools/tool-discovery.js.map +1 -0
- package/dist/lib/tools/tool-registry.d.ts +19 -3
- package/dist/lib/tools/tool-registry.d.ts.map +1 -1
- package/dist/lib/tools/tool-registry.js +63 -10
- package/dist/lib/tools/tool-registry.js.map +1 -1
- package/dist/lib/workflows/index.d.ts +4 -2
- package/dist/lib/workflows/index.d.ts.map +1 -1
- package/dist/lib/workflows/index.js +3 -1
- package/dist/lib/workflows/index.js.map +1 -1
- package/dist/lib/workflows/interrupt-manager.d.ts +42 -0
- package/dist/lib/workflows/interrupt-manager.d.ts.map +1 -0
- package/dist/lib/workflows/interrupt-manager.js +102 -0
- package/dist/lib/workflows/interrupt-manager.js.map +1 -0
- package/dist/lib/workflows/langgraph-executor.d.ts +51 -0
- package/dist/lib/workflows/langgraph-executor.d.ts.map +1 -0
- package/dist/lib/workflows/langgraph-executor.js +297 -0
- package/dist/lib/workflows/langgraph-executor.js.map +1 -0
- package/dist/lib/workflows/types.d.ts +911 -34
- package/dist/lib/workflows/types.d.ts.map +1 -1
- package/dist/lib/workflows/types.js +51 -2
- package/dist/lib/workflows/types.js.map +1 -1
- package/dist/lib/workflows/workflow-executor.d.ts.map +1 -1
- package/dist/lib/workflows/workflow-executor.js +4 -0
- package/dist/lib/workflows/workflow-executor.js.map +1 -1
- package/dist/lib/workflows/workflow-loader.d.ts.map +1 -1
- package/dist/lib/workflows/workflow-loader.js +3 -1
- package/dist/lib/workflows/workflow-loader.js.map +1 -1
- package/dist/public/index.html +133 -700
- package/dist/public/src/components/AgentsView.js +763 -0
- package/dist/public/src/components/AppRoot.js +76 -0
- package/dist/public/src/components/IdeView.js +330 -0
- package/dist/public/src/components/KnowledgeView.js +133 -0
- package/dist/public/src/components/LlmView.js +127 -0
- package/dist/public/src/components/McpView.js +387 -0
- package/dist/public/src/components/NavBar.js +71 -0
- package/dist/public/src/components/WorkflowsView.js +243 -0
- package/dist/public/src/main.js +9 -0
- package/dist/public/src/services/ApiService.js +142 -0
- package/dist/public/src/store.js +41 -0
- package/dist/public/src/utils/Component.js +23 -0
- package/dist/public/src/utils/markdown.js +82 -0
- package/dist/src/cli/commands/init.js +3 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/start.d.ts.map +1 -1
- package/dist/src/cli/commands/start.js +3 -2
- package/dist/src/cli/commands/start.js.map +1 -1
- package/dist/src/index.js +46 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/routes/agents.route.d.ts.map +1 -1
- package/dist/src/routes/agents.route.js +38 -5
- package/dist/src/routes/agents.route.js.map +1 -1
- package/dist/src/routes/files.route.d.ts +3 -0
- package/dist/src/routes/files.route.d.ts.map +1 -0
- package/dist/src/routes/files.route.js +160 -0
- package/dist/src/routes/files.route.js.map +1 -0
- package/dist/src/routes/functions.route.d.ts +3 -0
- package/dist/src/routes/functions.route.d.ts.map +1 -0
- package/dist/src/routes/functions.route.js +83 -0
- package/dist/src/routes/functions.route.js.map +1 -0
- package/dist/src/routes/knowledge.route.d.ts +3 -0
- package/dist/src/routes/knowledge.route.d.ts.map +1 -0
- package/dist/src/routes/knowledge.route.js +153 -0
- package/dist/src/routes/knowledge.route.js.map +1 -0
- package/dist/src/routes/mcp.route.d.ts +3 -0
- package/dist/src/routes/mcp.route.d.ts.map +1 -0
- package/dist/src/routes/mcp.route.js +79 -0
- package/dist/src/routes/mcp.route.js.map +1 -0
- package/dist/src/routes/workflows.route.d.ts.map +1 -1
- package/dist/src/routes/workflows.route.js +2 -1
- package/dist/src/routes/workflows.route.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +8 -2
- package/dist/src/server.js.map +1 -1
- package/dist/templates/.env.example +21 -0
- package/dist/templates/README.md +43 -152
- package/dist/templates/agents/call-center-analyst-simple.agent.yaml +36 -0
- package/dist/templates/agents/math.agent.yaml +4 -14
- package/dist/templates/agents/sentiment-structured.agent.yaml +42 -0
- package/dist/templates/functions/calculator.function.js +69 -0
- package/dist/templates/functions/text-formatter.function.js +66 -0
- package/dist/templates/{vectors/example.vector.yaml → knowledge/example.knowledge.yaml} +1 -1
- package/dist/templates/knowledge/transcripts/call-001.txt +40 -0
- package/dist/templates/knowledge/transcripts/call-002.txt +36 -0
- package/dist/templates/knowledge/transcripts/call-003.txt +42 -0
- package/dist/templates/llm.md +1195 -0
- package/dist/templates/workflows/example.workflow.yaml +8 -19
- package/dist/templates/workflows/langgraph-example.workflow.yaml +84 -0
- package/package.json +21 -12
- package/dist/lib/tools/built-in/vector-search.tool.d.ts +0 -4
- package/dist/lib/tools/built-in/vector-search.tool.d.ts.map +0 -1
- package/dist/lib/tools/built-in/vector-search.tool.js.map +0 -1
- package/dist/lib/vectors/index.d.ts +0 -5
- package/dist/lib/vectors/index.d.ts.map +0 -1
- package/dist/lib/vectors/index.js +0 -4
- package/dist/lib/vectors/index.js.map +0 -1
- package/dist/lib/vectors/types.d.ts +0 -212
- package/dist/lib/vectors/types.d.ts.map +0 -1
- package/dist/lib/vectors/types.js +0 -39
- package/dist/lib/vectors/types.js.map +0 -1
- package/dist/lib/vectors/vector-store-factory.d.ts +0 -14
- package/dist/lib/vectors/vector-store-factory.d.ts.map +0 -1
- package/dist/lib/vectors/vector-store-factory.js.map +0 -1
- package/dist/lib/vectors/vector-store-manager.d.ts +0 -18
- package/dist/lib/vectors/vector-store-manager.d.ts.map +0 -1
- package/dist/lib/vectors/vector-store-manager.js +0 -79
- package/dist/lib/vectors/vector-store-manager.js.map +0 -1
- package/dist/src/routes/vectors.route.d.ts +0 -3
- package/dist/src/routes/vectors.route.d.ts.map +0 -1
- package/dist/src/routes/vectors.route.js +0 -74
- package/dist/src/routes/vectors.route.js.map +0 -1
- package/dist/templates/agents/example.agent.yaml +0 -32
- package/dist/templates/agents/knowledge.agent.yaml +0 -36
- package/dist/templates/agents/time.agent.yaml +0 -42
- package/dist/templates/functions/README.md +0 -195
- package/dist/templates/functions/fibonacci.function.js +0 -55
- package/dist/templates/vectors/sample-data/example-document.txt +0 -15
package/README.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="docs/assets/images/logo.png" alt="Agent Orcha Logo" width="300">
|
|
3
|
-
</p>
|
|
1
|
+

|
|
4
2
|
|
|
5
3
|
# Agent Orcha
|
|
6
4
|
|
|
7
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.
|
|
8
6
|
|
|
7
|
+
**[Documentation](https://ddalcu.github.io/agent-orcha)** | **[NPM Package](https://www.npmjs.com/package/agent-orcha)** | **[Docker Hub](https://hub.docker.com/r/ddalcu/agent-orcha)**
|
|
8
|
+
|
|
9
9
|
## Why Agent Orcha?
|
|
10
10
|
|
|
11
11
|
- **Declarative AI**: Define agents, workflows, and infrastructure in clear, version-controlled YAML files. No more spaghetti code.
|
|
12
12
|
- **Model Agnostic**: Seamlessly swap between OpenAI, Gemini, Anthropic, or local LLMs (Ollama, LM Studio) without rewriting logic.
|
|
13
13
|
- **Universal Tooling**: Leverage the **Model Context Protocol (MCP)** to connect agents to any external service, API, or database instantly.
|
|
14
|
-
- **
|
|
15
|
-
- **Robust Workflow Engine**: Orchestrate complex multi-agent sequences with parallel execution, conditional logic,
|
|
16
|
-
- **
|
|
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.
|
|
17
19
|
- **Developer Experience**: Fully typed interfaces, intuitive CLI tooling, and a modular architecture designed for rapid iteration from prototype to production.
|
|
18
20
|
- **Extensible Functions**: Drop in simple JavaScript functions to extend agent capabilities with zero boilerplate.
|
|
19
21
|
|
|
@@ -22,10 +24,11 @@ Agent Orcha is a declarative framework designed to build, manage, and scale mult
|
|
|
22
24
|
Agent Orcha enables you to:
|
|
23
25
|
|
|
24
26
|
- **Define agents** using YAML configuration files with customizable LLM providers, prompts, and tools
|
|
25
|
-
- **Create workflows** that coordinate multiple agents in sequential or
|
|
26
|
-
- **Integrate
|
|
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
|
|
27
29
|
- **Connect MCP servers** to extend agent capabilities with external tools
|
|
28
|
-
- **Create local
|
|
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
|
|
29
32
|
|
|
30
33
|
### Alpha Status and Security Notice
|
|
31
34
|
|
|
@@ -33,11 +36,16 @@ Agent Orcha enables you to:
|
|
|
33
36
|
|
|
34
37
|
|
|
35
38
|
## Usage
|
|
36
|
-
- **Use as is** check out and run
|
|
37
|
-
- **Use as a library** in your TypeScript/JavaScript projects
|
|
38
|
-
- **Use as a CLI** with npx for standalone agent orchestration (recommended)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Agent Orcha can be used in multiple ways depending on your needs:
|
|
41
|
+
|
|
42
|
+
1. **CLI Tool (Recommended)** - Use `npx agent-orcha` to initialize and run Agent Orcha projects standalone
|
|
43
|
+
2. **Backend API Server** - Run Agent Orcha as a REST API backend for your existing frontends or applications
|
|
44
|
+
3. **Docker Image** - Use the official Docker image ([ddalcu/agent-orcha](https://hub.docker.com/r/ddalcu/agent-orcha)) for local and server deployments
|
|
45
|
+
4. **Library** - Import and use Agent Orcha programmatically in your TypeScript/JavaScript projects
|
|
46
|
+
5. **Source** - Clone and run directly from source for development or customization
|
|
47
|
+
|
|
48
|
+
**Requirements:** Node.js >= 20.0.0 (or Docker for containerized deployment)
|
|
41
49
|
|
|
42
50
|
|
|
43
51
|
## Quick Start
|
|
@@ -86,6 +94,42 @@ curl -X POST http://localhost:3000/api/agents/example/invoke \
|
|
|
86
94
|
-d '{"input": {"query": "Hello, how are you?"}}'
|
|
87
95
|
```
|
|
88
96
|
|
|
97
|
+
### Docker Usage
|
|
98
|
+
|
|
99
|
+
Run Agent Orcha using the official Docker image:
|
|
100
|
+
|
|
101
|
+
1. **Initialize a project:**
|
|
102
|
+
```bash
|
|
103
|
+
docker run -v ./my-agent-orcha-project:/data ddalcu/agent-orcha init
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
2. **Start the server:**
|
|
107
|
+
```bash
|
|
108
|
+
docker run -p 3000:3000 -v ./my-agent-orcha-project:/data ddalcu/agent-orcha start
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
3. **Or use Docker Compose:**
|
|
112
|
+
```yaml
|
|
113
|
+
version: '3.8'
|
|
114
|
+
|
|
115
|
+
services:
|
|
116
|
+
agent-orcha:
|
|
117
|
+
image: ddalcu/agent-orcha
|
|
118
|
+
ports:
|
|
119
|
+
- "3000:3000"
|
|
120
|
+
volumes:
|
|
121
|
+
- ./my-agent-orcha-project:/data
|
|
122
|
+
environment:
|
|
123
|
+
- ORCHA_BASE_DIR=/data
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Then run:
|
|
127
|
+
```bash
|
|
128
|
+
docker-compose up
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
See the [Docker Hub page](https://hub.docker.com/r/ddalcu/agent-orcha) for more details and available tags.
|
|
132
|
+
|
|
89
133
|
### Library Usage
|
|
90
134
|
|
|
91
135
|
```typescript
|
|
@@ -112,10 +156,84 @@ const workflowResult = await orchestrator.workflows.run('research-paper', {
|
|
|
112
156
|
|
|
113
157
|
console.log(workflowResult.output);
|
|
114
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
|
+
|
|
115
172
|
// Clean up
|
|
116
173
|
await orchestrator.close();
|
|
117
174
|
```
|
|
118
175
|
|
|
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
|
+
|
|
119
237
|
## CLI Commands
|
|
120
238
|
|
|
121
239
|
| Command | Description |
|
|
@@ -131,8 +249,8 @@ For development on the agent-orcha framework itself:
|
|
|
131
249
|
| Command | Description |
|
|
132
250
|
|---------|-------------|
|
|
133
251
|
| `npm run dev` | Start development server with auto-reload |
|
|
134
|
-
| `npm run build` | Build
|
|
135
|
-
| `npm start` | Run
|
|
252
|
+
| `npm run build` | Build |
|
|
253
|
+
| `npm start` | Run build |
|
|
136
254
|
| `npm run lint` | Run ESLint |
|
|
137
255
|
| `npm run typecheck` | Run TypeScript type checking |
|
|
138
256
|
|
|
@@ -140,7 +258,7 @@ For development on the agent-orcha framework itself:
|
|
|
140
258
|
|
|
141
259
|
### LLM Configuration (llm.json)
|
|
142
260
|
|
|
143
|
-
All LLM and embedding configurations are defined in `llm.json` at the project root. Agents and
|
|
261
|
+
All LLM and embedding configurations are defined in `llm.json` at the project root. Agents and knowledge stores reference these configs by name.
|
|
144
262
|
|
|
145
263
|
```json
|
|
146
264
|
{
|
|
@@ -230,6 +348,9 @@ Embedding configurations support the following options:
|
|
|
230
348
|
# Server configuration
|
|
231
349
|
PORT=3000
|
|
232
350
|
HOST=0.0.0.0
|
|
351
|
+
|
|
352
|
+
# Base directory for config files (optional)
|
|
353
|
+
ORCHA_BASE_DIR=/path/to/project
|
|
233
354
|
```
|
|
234
355
|
|
|
235
356
|
## Agents
|
|
@@ -255,11 +376,16 @@ prompt: # Prompt configuration (required)
|
|
|
255
376
|
|
|
256
377
|
tools: # Tools available to agent (optional)
|
|
257
378
|
- mcp:<server-name> # MCP server tools
|
|
258
|
-
-
|
|
379
|
+
- knowledge:<store-name> # Knowledge store search
|
|
380
|
+
- function:<function-name> # Custom function
|
|
259
381
|
- builtin:<tool-name> # Built-in tools
|
|
260
382
|
|
|
261
383
|
output: # Output formatting (optional)
|
|
262
384
|
format: text | json | structured
|
|
385
|
+
schema: # Required when format is "structured"
|
|
386
|
+
type: object
|
|
387
|
+
properties: { ... }
|
|
388
|
+
required: [string]
|
|
263
389
|
|
|
264
390
|
metadata: # Custom metadata (optional)
|
|
265
391
|
category: string
|
|
@@ -272,7 +398,7 @@ metadata: # Custom metadata (optional)
|
|
|
272
398
|
# agents/researcher.agent.yaml
|
|
273
399
|
|
|
274
400
|
name: researcher
|
|
275
|
-
description: Researches topics using web fetch and
|
|
401
|
+
description: Researches topics using web fetch and knowledge search
|
|
276
402
|
version: "1.0.0"
|
|
277
403
|
|
|
278
404
|
llm:
|
|
@@ -293,21 +419,193 @@ prompt:
|
|
|
293
419
|
|
|
294
420
|
tools:
|
|
295
421
|
- mcp:fetch
|
|
296
|
-
-
|
|
422
|
+
- knowledge:transcripts
|
|
297
423
|
|
|
298
424
|
output:
|
|
299
425
|
format: text
|
|
300
426
|
|
|
301
427
|
metadata:
|
|
302
428
|
category: research
|
|
303
|
-
tags: [research, web,
|
|
429
|
+
tags: [research, web, knowledge]
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Conversation Memory
|
|
433
|
+
|
|
434
|
+
Agent Orcha supports session-based conversation memory, allowing agents to maintain context across multiple interactions. This is useful for building chatbots, multi-turn dialogues, and stateful applications.
|
|
435
|
+
|
|
436
|
+
**Features:**
|
|
437
|
+
- In-memory session storage using LangChain messages
|
|
438
|
+
- Automatic FIFO message limit (default: 50 messages per session)
|
|
439
|
+
- Optional TTL-based session cleanup (default: 1 hour)
|
|
440
|
+
- Backward compatible (sessionId is optional)
|
|
441
|
+
|
|
442
|
+
**API Usage:**
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
# First message
|
|
446
|
+
curl -X POST http://localhost:3000/api/agents/chatbot-memory/invoke \
|
|
447
|
+
-H "Content-Type: application/json" \
|
|
448
|
+
-d '{
|
|
449
|
+
"input": {"message": "My name is Alice"},
|
|
450
|
+
"sessionId": "user-123"
|
|
451
|
+
}'
|
|
452
|
+
|
|
453
|
+
# Second message (agent remembers the name)
|
|
454
|
+
curl -X POST http://localhost:3000/api/agents/chatbot-memory/invoke \
|
|
455
|
+
-H "Content-Type: application/json" \
|
|
456
|
+
-d '{
|
|
457
|
+
"input": {"message": "What is my name?"},
|
|
458
|
+
"sessionId": "user-123"
|
|
459
|
+
}'
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Library Usage:**
|
|
463
|
+
|
|
464
|
+
```typescript
|
|
465
|
+
// Run agent with conversation memory
|
|
466
|
+
const result1 = await orchestrator.runAgent(
|
|
467
|
+
'chatbot-memory',
|
|
468
|
+
{ message: 'My name is Alice' },
|
|
469
|
+
'user-123' // sessionId
|
|
470
|
+
);
|
|
471
|
+
|
|
472
|
+
const result2 = await orchestrator.runAgent(
|
|
473
|
+
'chatbot-memory',
|
|
474
|
+
{ message: 'What is my name?' },
|
|
475
|
+
'user-123' // Same sessionId maintains context
|
|
476
|
+
);
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
**Session Management API:**
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
# Get session stats
|
|
483
|
+
curl http://localhost:3000/api/agents/sessions/stats
|
|
484
|
+
|
|
485
|
+
# Get session info
|
|
486
|
+
curl http://localhost:3000/api/agents/sessions/user-123
|
|
487
|
+
|
|
488
|
+
# Clear session
|
|
489
|
+
curl -X DELETE http://localhost:3000/api/agents/sessions/user-123
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Memory Management (Programmatic):**
|
|
493
|
+
|
|
494
|
+
```typescript
|
|
495
|
+
// Access memory store
|
|
496
|
+
const memory = orchestrator.memory;
|
|
497
|
+
|
|
498
|
+
// Check if session exists
|
|
499
|
+
const hasSession = memory.hasSession('user-123');
|
|
500
|
+
|
|
501
|
+
// Get message count
|
|
502
|
+
const count = memory.getMessageCount('user-123');
|
|
503
|
+
|
|
504
|
+
// Clear a session
|
|
505
|
+
memory.clearSession('user-123');
|
|
506
|
+
|
|
507
|
+
// Get total sessions
|
|
508
|
+
const totalSessions = memory.getSessionCount();
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
### Structured Output
|
|
512
|
+
|
|
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
|
+
```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
|
+
output:
|
|
538
|
+
format: structured
|
|
539
|
+
schema:
|
|
540
|
+
type: object
|
|
541
|
+
properties:
|
|
542
|
+
sentiment:
|
|
543
|
+
type: string
|
|
544
|
+
enum: [positive, negative, neutral]
|
|
545
|
+
description: The overall sentiment
|
|
546
|
+
confidence:
|
|
547
|
+
type: number
|
|
548
|
+
minimum: 0
|
|
549
|
+
maximum: 1
|
|
550
|
+
description: Confidence score
|
|
551
|
+
keywords:
|
|
552
|
+
type: array
|
|
553
|
+
items:
|
|
554
|
+
type: string
|
|
555
|
+
description: Key sentiment-driving words
|
|
556
|
+
required:
|
|
557
|
+
- sentiment
|
|
558
|
+
- confidence
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
**API Usage:**
|
|
562
|
+
|
|
563
|
+
```bash
|
|
564
|
+
curl -X POST http://localhost:3000/api/agents/sentiment-structured/invoke \
|
|
565
|
+
-H "Content-Type: application/json" \
|
|
566
|
+
-d '{
|
|
567
|
+
"input": {"text": "I love this product! It works great!"}
|
|
568
|
+
}'
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
**Response:**
|
|
572
|
+
|
|
573
|
+
```json
|
|
574
|
+
{
|
|
575
|
+
"output": {
|
|
576
|
+
"sentiment": "positive",
|
|
577
|
+
"confidence": 0.95,
|
|
578
|
+
"keywords": ["love", "great"]
|
|
579
|
+
},
|
|
580
|
+
"metadata": {
|
|
581
|
+
"duration": 1234,
|
|
582
|
+
"structuredOutputValid": true
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
**Library Usage:**
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
const result = await orchestrator.runAgent('sentiment-structured', {
|
|
591
|
+
text: 'This is amazing!'
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
// result.output is a typed object
|
|
595
|
+
console.log(result.output.sentiment); // "positive"
|
|
596
|
+
console.log(result.output.confidence); // 0.95
|
|
597
|
+
console.log(result.metadata.structuredOutputValid); // true
|
|
304
598
|
```
|
|
305
599
|
|
|
306
600
|
## Workflows
|
|
307
601
|
|
|
308
|
-
Workflows orchestrate multiple agents in a defined sequence. Define workflows in YAML files within the `workflows/` directory.
|
|
602
|
+
Workflows orchestrate multiple agents in a defined sequence. Define workflows in YAML files within the `workflows/` directory. Agent Orcha supports two workflow types: **step-based** and **LangGraph**.
|
|
603
|
+
|
|
604
|
+
### Step-Based Workflows
|
|
309
605
|
|
|
310
|
-
|
|
606
|
+
Traditional sequential/parallel agent orchestration with explicit step definitions.
|
|
607
|
+
|
|
608
|
+
#### Workflow Schema
|
|
311
609
|
|
|
312
610
|
```yaml
|
|
313
611
|
# workflows/<name>.workflow.yaml
|
|
@@ -315,6 +613,7 @@ Workflows orchestrate multiple agents in a defined sequence. Define workflows in
|
|
|
315
613
|
name: string # Unique identifier (required)
|
|
316
614
|
description: string # Human-readable description (required)
|
|
317
615
|
version: string # Semantic version (default: "1.0.0")
|
|
616
|
+
type: steps # Optional (steps is default)
|
|
318
617
|
|
|
319
618
|
input: # Input schema (required)
|
|
320
619
|
schema:
|
|
@@ -358,7 +657,7 @@ metadata: # Custom metadata (optional)
|
|
|
358
657
|
tags: [string]
|
|
359
658
|
```
|
|
360
659
|
|
|
361
|
-
|
|
660
|
+
#### Template Syntax
|
|
362
661
|
|
|
363
662
|
Access data within workflows using double curly braces:
|
|
364
663
|
|
|
@@ -369,7 +668,7 @@ Access data within workflows using double curly braces:
|
|
|
369
668
|
| `{{steps.stepId.output.nested.path}}` | Access nested output |
|
|
370
669
|
| `{{steps.stepId.metadata.duration}}` | Access step metadata |
|
|
371
670
|
|
|
372
|
-
|
|
671
|
+
#### Example Workflow
|
|
373
672
|
|
|
374
673
|
```yaml
|
|
375
674
|
# workflows/research-paper.workflow.yaml
|
|
@@ -425,23 +724,118 @@ output:
|
|
|
425
724
|
researchFindings: "{{steps.research.output}}"
|
|
426
725
|
```
|
|
427
726
|
|
|
428
|
-
|
|
727
|
+
### LangGraph Workflows
|
|
429
728
|
|
|
430
|
-
|
|
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.
|
|
431
730
|
|
|
432
|
-
|
|
731
|
+
#### LangGraph Schema
|
|
433
732
|
|
|
434
733
|
```yaml
|
|
435
|
-
#
|
|
734
|
+
# workflows/<name>.workflow.yaml
|
|
436
735
|
|
|
437
736
|
name: string # Unique identifier (required)
|
|
438
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
|
+
```
|
|
773
|
+
|
|
774
|
+
#### Execution Modes
|
|
775
|
+
|
|
776
|
+
| Mode | Behavior | Best For |
|
|
777
|
+
|------|----------|----------|
|
|
778
|
+
| `single-turn` | Calls tools once, then returns | Research, data gathering, straightforward tasks |
|
|
779
|
+
| `react` | Multiple rounds of tool calls with analysis | Complex problems, iterative refinement |
|
|
780
|
+
|
|
781
|
+
#### Example LangGraph Workflow
|
|
782
|
+
|
|
783
|
+
```yaml
|
|
784
|
+
name: langgraph-research
|
|
785
|
+
description: Autonomous research using tool discovery
|
|
786
|
+
version: "1.0.0"
|
|
787
|
+
type: langgraph
|
|
788
|
+
|
|
789
|
+
input:
|
|
790
|
+
schema:
|
|
791
|
+
topic:
|
|
792
|
+
type: string
|
|
793
|
+
required: true
|
|
794
|
+
|
|
795
|
+
prompt:
|
|
796
|
+
system: |
|
|
797
|
+
You are a research assistant with access to tools and agents.
|
|
798
|
+
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
|
+
goal: "Research and analyze: {{input.topic}}"
|
|
803
|
+
|
|
804
|
+
graph:
|
|
805
|
+
model: default
|
|
806
|
+
executionMode: single-turn
|
|
807
|
+
tools:
|
|
808
|
+
mode: all
|
|
809
|
+
sources: [mcp, knowledge, function, builtin]
|
|
810
|
+
agents:
|
|
811
|
+
mode: all
|
|
812
|
+
maxIterations: 10
|
|
813
|
+
timeout: 300000
|
|
814
|
+
|
|
815
|
+
output:
|
|
816
|
+
analysis: "{{state.messages[-1].content}}"
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
## Knowledge Stores
|
|
820
|
+
|
|
821
|
+
Knowledge stores enable semantic search and RAG capabilities. Define knowledge stores in YAML files within the `knowledge/` directory. Two kinds are supported: **vector** (default) and **graph-rag**.
|
|
822
|
+
|
|
823
|
+
### Vector Knowledge Stores
|
|
824
|
+
|
|
825
|
+
Traditional vector stores with embeddings for semantic search.
|
|
826
|
+
|
|
827
|
+
#### Vector Knowledge Schema
|
|
828
|
+
|
|
829
|
+
```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)
|
|
439
835
|
|
|
440
836
|
source: # Data source (required)
|
|
441
|
-
type: directory | file |
|
|
442
|
-
|
|
443
|
-
pattern: string # Glob pattern for directories
|
|
444
|
-
recursive: boolean # Recursive search (default: true)
|
|
837
|
+
type: directory | file | database | web | s3
|
|
838
|
+
# See "Data Source Types" below for type-specific fields
|
|
445
839
|
|
|
446
840
|
loader: # Document loader (required)
|
|
447
841
|
type: text | pdf | csv | json | markdown
|
|
@@ -454,7 +848,7 @@ splitter: # Text chunking (required)
|
|
|
454
848
|
embedding: string # Reference to embedding config in llm.json (default: "default")
|
|
455
849
|
|
|
456
850
|
store: # Vector store backend (required)
|
|
457
|
-
type: memory | chroma
|
|
851
|
+
type: memory | chroma | pinecone | qdrant
|
|
458
852
|
options: # Store-specific options (optional)
|
|
459
853
|
path: string # Storage path (for chroma)
|
|
460
854
|
collectionName: string # Collection name (for chroma)
|
|
@@ -465,17 +859,17 @@ search: # Search configuration (optional)
|
|
|
465
859
|
scoreThreshold: number # Minimum similarity (0-1)
|
|
466
860
|
```
|
|
467
861
|
|
|
468
|
-
|
|
862
|
+
#### Example Vector Knowledge Store
|
|
469
863
|
|
|
470
864
|
```yaml
|
|
471
|
-
#
|
|
865
|
+
# knowledge/transcripts.knowledge.yaml
|
|
472
866
|
|
|
473
867
|
name: transcripts
|
|
474
868
|
description: Meeting transcripts for context retrieval
|
|
475
869
|
|
|
476
870
|
source:
|
|
477
871
|
type: directory
|
|
478
|
-
path:
|
|
872
|
+
path: knowledge/sample-data
|
|
479
873
|
pattern: "*.txt"
|
|
480
874
|
|
|
481
875
|
loader:
|
|
@@ -486,7 +880,7 @@ splitter:
|
|
|
486
880
|
chunkSize: 1000
|
|
487
881
|
chunkOverlap: 200
|
|
488
882
|
|
|
489
|
-
embedding: default
|
|
883
|
+
embedding: default
|
|
490
884
|
|
|
491
885
|
store:
|
|
492
886
|
type: memory
|
|
@@ -496,12 +890,194 @@ search:
|
|
|
496
890
|
scoreThreshold: 0.2
|
|
497
891
|
```
|
|
498
892
|
|
|
499
|
-
**Note:**
|
|
893
|
+
**Note:** Knowledge stores are initialized on startup, loading documents and creating embeddings immediately.
|
|
894
|
+
|
|
895
|
+
### GraphRAG Knowledge Stores
|
|
896
|
+
|
|
897
|
+
GraphRAG extracts entities and relationships from documents, builds a knowledge graph, detects communities, and enables both entity-level and thematic search.
|
|
898
|
+
|
|
899
|
+
#### GraphRAG Schema
|
|
900
|
+
|
|
901
|
+
```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
|
+
graph:
|
|
979
|
+
extraction:
|
|
980
|
+
llm: default
|
|
981
|
+
entityTypes:
|
|
982
|
+
- name: Agent
|
|
983
|
+
description: "Call center representative"
|
|
984
|
+
- name: Customer
|
|
985
|
+
description: "Person calling"
|
|
986
|
+
- name: Vehicle
|
|
987
|
+
description: "Car discussed"
|
|
988
|
+
- name: Outcome
|
|
989
|
+
description: "Result of the call"
|
|
990
|
+
relationshipTypes:
|
|
991
|
+
- name: HANDLED_BY
|
|
992
|
+
description: "Call was handled by an agent"
|
|
993
|
+
- name: INTERESTED_IN
|
|
994
|
+
description: "Customer interest in vehicle"
|
|
995
|
+
- name: RESULTED_IN
|
|
996
|
+
description: "Call resulted in outcome"
|
|
997
|
+
|
|
998
|
+
communities:
|
|
999
|
+
algorithm: louvain
|
|
1000
|
+
resolution: 1.0
|
|
1001
|
+
minSize: 2
|
|
1002
|
+
summaryLlm: default
|
|
1003
|
+
|
|
1004
|
+
store:
|
|
1005
|
+
type: memory
|
|
1006
|
+
|
|
1007
|
+
cache:
|
|
1008
|
+
enabled: true
|
|
1009
|
+
directory: .graph-cache
|
|
1010
|
+
|
|
1011
|
+
search:
|
|
1012
|
+
defaultK: 10
|
|
1013
|
+
localSearch:
|
|
1014
|
+
maxDepth: 2
|
|
1015
|
+
globalSearch:
|
|
1016
|
+
topCommunities: 5
|
|
1017
|
+
llm: default
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
### Data Source Types
|
|
500
1021
|
|
|
501
|
-
|
|
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
|
|
502
1078
|
|
|
503
1079
|
#### Memory (Development)
|
|
504
|
-
In-memory
|
|
1080
|
+
In-memory storage. Fast but not persistent - embeddings are recreated on every startup.
|
|
505
1081
|
|
|
506
1082
|
```yaml
|
|
507
1083
|
store:
|
|
@@ -511,14 +1087,14 @@ store:
|
|
|
511
1087
|
**Use cases:** Development, testing, small datasets
|
|
512
1088
|
|
|
513
1089
|
#### Chroma (Production - Local)
|
|
514
|
-
Persistent local
|
|
1090
|
+
Persistent local storage using Chroma. Embeddings are cached and reused across restarts.
|
|
515
1091
|
|
|
516
1092
|
```yaml
|
|
517
1093
|
store:
|
|
518
1094
|
type: chroma
|
|
519
1095
|
options:
|
|
520
1096
|
path: .chroma # Storage directory (default: .chroma)
|
|
521
|
-
collectionName: my-collection # Collection name (default:
|
|
1097
|
+
collectionName: my-collection # Collection name (default: store name)
|
|
522
1098
|
url: http://localhost:8000 # Chroma server URL (default: http://localhost:8000)
|
|
523
1099
|
```
|
|
524
1100
|
|
|
@@ -667,10 +1243,12 @@ Model Context Protocol (MCP) servers provide external tools to agents. Configure
|
|
|
667
1243
|
"version": "1.0.0",
|
|
668
1244
|
"servers": {
|
|
669
1245
|
"<server-name>": {
|
|
670
|
-
"transport": "streamable-http | stdio | sse",
|
|
1246
|
+
"transport": "streamable-http | stdio | sse | sse-only",
|
|
671
1247
|
"url": "https://server-url/mcp",
|
|
672
1248
|
"command": "node",
|
|
673
1249
|
"args": ["./mcp-server.js"],
|
|
1250
|
+
"env": { "KEY": "VALUE" },
|
|
1251
|
+
"headers": { "Authorization": "Bearer TOKEN" },
|
|
674
1252
|
"timeout": 30000,
|
|
675
1253
|
"enabled": true,
|
|
676
1254
|
"description": "Server description"
|
|
@@ -679,6 +1257,7 @@ Model Context Protocol (MCP) servers provide external tools to agents. Configure
|
|
|
679
1257
|
"globalOptions": {
|
|
680
1258
|
"throwOnLoadError": false,
|
|
681
1259
|
"prefixToolNameWithServerName": true,
|
|
1260
|
+
"additionalToolNamePrefix": "",
|
|
682
1261
|
"defaultToolTimeout": 30000
|
|
683
1262
|
}
|
|
684
1263
|
}
|
|
@@ -696,6 +1275,12 @@ Model Context Protocol (MCP) servers provide external tools to agents. Configure
|
|
|
696
1275
|
"description": "Web fetch capabilities",
|
|
697
1276
|
"timeout": 30000,
|
|
698
1277
|
"enabled": true
|
|
1278
|
+
},
|
|
1279
|
+
"filesystem": {
|
|
1280
|
+
"transport": "stdio",
|
|
1281
|
+
"command": "npx",
|
|
1282
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
|
|
1283
|
+
"description": "File system access"
|
|
699
1284
|
}
|
|
700
1285
|
}
|
|
701
1286
|
}
|
|
@@ -707,6 +1292,18 @@ tools:
|
|
|
707
1292
|
- mcp:fetch # All tools from "fetch" server
|
|
708
1293
|
```
|
|
709
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
|
+
|
|
710
1307
|
## API Reference
|
|
711
1308
|
|
|
712
1309
|
### Health Check
|
|
@@ -724,6 +1321,9 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
724
1321
|
| GET | `/api/agents/:name` | Get agent details |
|
|
725
1322
|
| POST | `/api/agents/:name/invoke` | Run agent |
|
|
726
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 |
|
|
727
1327
|
|
|
728
1328
|
**Invoke Request:**
|
|
729
1329
|
```json
|
|
@@ -731,7 +1331,8 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
731
1331
|
"input": {
|
|
732
1332
|
"topic": "your topic",
|
|
733
1333
|
"context": "additional context"
|
|
734
|
-
}
|
|
1334
|
+
},
|
|
1335
|
+
"sessionId": "optional-session-id"
|
|
735
1336
|
}
|
|
736
1337
|
```
|
|
737
1338
|
|
|
@@ -742,7 +1343,10 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
742
1343
|
"metadata": {
|
|
743
1344
|
"tokensUsed": 150,
|
|
744
1345
|
"toolCalls": [],
|
|
745
|
-
"duration": 1234
|
|
1346
|
+
"duration": 1234,
|
|
1347
|
+
"sessionId": "optional-session-id",
|
|
1348
|
+
"messagesInSession": 4,
|
|
1349
|
+
"structuredOutputValid": true
|
|
746
1350
|
}
|
|
747
1351
|
}
|
|
748
1352
|
```
|
|
@@ -754,6 +1358,7 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
754
1358
|
| GET | `/api/workflows` | List all workflows |
|
|
755
1359
|
| GET | `/api/workflows/:name` | Get workflow details |
|
|
756
1360
|
| POST | `/api/workflows/:name/run` | Execute workflow |
|
|
1361
|
+
| POST | `/api/workflows/:name/stream` | Stream workflow execution (SSE) |
|
|
757
1362
|
|
|
758
1363
|
**Run Request:**
|
|
759
1364
|
```json
|
|
@@ -778,21 +1383,24 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
778
1383
|
"success": true
|
|
779
1384
|
},
|
|
780
1385
|
"stepResults": {
|
|
781
|
-
"research": { "output": "...", "metadata": {
|
|
782
|
-
"summarize": { "output": "...", "metadata": {
|
|
1386
|
+
"research": { "output": "...", "metadata": {} },
|
|
1387
|
+
"summarize": { "output": "...", "metadata": {} }
|
|
783
1388
|
}
|
|
784
1389
|
}
|
|
785
1390
|
```
|
|
786
1391
|
|
|
787
|
-
###
|
|
1392
|
+
### Knowledge Stores
|
|
788
1393
|
|
|
789
1394
|
| Method | Endpoint | Description |
|
|
790
1395
|
|--------|----------|-------------|
|
|
791
|
-
| GET | `/api/
|
|
792
|
-
| GET | `/api/
|
|
793
|
-
| POST | `/api/
|
|
794
|
-
| POST | `/api/
|
|
795
|
-
| POST | `/api/
|
|
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 |
|
|
796
1404
|
|
|
797
1405
|
**Search Request:**
|
|
798
1406
|
```json
|
|
@@ -802,71 +1410,151 @@ Response: { "status": "ok", "timestamp": "..." }
|
|
|
802
1410
|
}
|
|
803
1411
|
```
|
|
804
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
|
|
1466
|
+
|
|
1467
|
+
| Method | Endpoint | Description |
|
|
1468
|
+
|--------|----------|-------------|
|
|
1469
|
+
| GET | `/api/files/tree` | Get project directory tree |
|
|
1470
|
+
| GET | `/api/files/read?path=...` | Read file contents |
|
|
1471
|
+
| PUT | `/api/files/write` | Write file contents |
|
|
1472
|
+
|
|
1473
|
+
**Write File Request:**
|
|
1474
|
+
```json
|
|
1475
|
+
{
|
|
1476
|
+
"path": "agents/new-agent.agent.yaml",
|
|
1477
|
+
"content": "name: new-agent\n..."
|
|
1478
|
+
}
|
|
1479
|
+
```
|
|
1480
|
+
|
|
805
1481
|
## Directory Structure
|
|
806
1482
|
|
|
1483
|
+
```
|
|
1484
|
+
my-project/
|
|
1485
|
+
├── agents/ # Agent definitions (YAML)
|
|
1486
|
+
├── workflows/ # Workflow definitions (YAML)
|
|
1487
|
+
├── knowledge/ # Knowledge store configs and data
|
|
1488
|
+
├── functions/ # Custom function tools (JavaScript)
|
|
1489
|
+
├── public/ # Web UI (Studio)
|
|
1490
|
+
│
|
|
1491
|
+
├── llm.json # LLM and embedding configurations
|
|
1492
|
+
├── mcp.json # MCP server configuration
|
|
1493
|
+
└── .env # Environment variables
|
|
1494
|
+
```
|
|
1495
|
+
|
|
1496
|
+
**Framework source structure:**
|
|
1497
|
+
|
|
807
1498
|
```
|
|
808
1499
|
agent-orcha/
|
|
809
1500
|
├── src/ # Server/API code
|
|
810
1501
|
│ ├── index.ts # Entry point
|
|
811
1502
|
│ ├── server.ts # Fastify server setup
|
|
1503
|
+
│ ├── cli/ # CLI commands
|
|
812
1504
|
│ └── routes/ # API route handlers
|
|
813
1505
|
│ ├── agents.route.ts
|
|
814
1506
|
│ ├── workflows.route.ts
|
|
815
|
-
│
|
|
1507
|
+
│ ├── knowledge.route.ts
|
|
1508
|
+
│ ├── llm.route.ts
|
|
1509
|
+
│ ├── functions.route.ts
|
|
1510
|
+
│ ├── mcp.route.ts
|
|
1511
|
+
│ └── files.route.ts
|
|
816
1512
|
│
|
|
817
1513
|
├── lib/ # Core library
|
|
818
1514
|
│ ├── orchestrator.ts # Main orchestrator class
|
|
819
1515
|
│ ├── agents/ # Agent system
|
|
820
1516
|
│ │ ├── types.ts
|
|
821
1517
|
│ │ ├── agent-loader.ts
|
|
822
|
-
│ │
|
|
1518
|
+
│ │ ├── agent-executor.ts
|
|
1519
|
+
│ │ └── structured-output-wrapper.ts
|
|
823
1520
|
│ ├── workflows/ # Workflow system
|
|
824
1521
|
│ │ ├── types.ts
|
|
825
1522
|
│ │ ├── workflow-loader.ts
|
|
826
|
-
│ │
|
|
827
|
-
│
|
|
1523
|
+
│ │ ├── workflow-executor.ts
|
|
1524
|
+
│ │ └── langgraph-executor.ts
|
|
1525
|
+
│ ├── knowledge/ # Knowledge store system
|
|
828
1526
|
│ │ ├── types.ts
|
|
829
|
-
│ │
|
|
1527
|
+
│ │ ├── knowledge-store-manager.ts
|
|
1528
|
+
│ │ └── graph-rag/
|
|
1529
|
+
│ │ └── types.ts
|
|
1530
|
+
│ ├── memory/ # Conversation memory
|
|
1531
|
+
│ │ └── conversation-store.ts
|
|
830
1532
|
│ ├── llm/ # LLM factory
|
|
831
1533
|
│ │ └── llm-factory.ts
|
|
832
1534
|
│ ├── mcp/ # MCP client
|
|
833
1535
|
│ │ └── mcp-client.ts
|
|
834
|
-
│
|
|
835
|
-
│
|
|
1536
|
+
│ ├── functions/ # Function loader
|
|
1537
|
+
│ └── tools/ # Tool registry and discovery
|
|
1538
|
+
│ ├── tool-registry.ts
|
|
1539
|
+
│ └── tool-discovery.ts
|
|
836
1540
|
│
|
|
837
|
-
├──
|
|
838
|
-
|
|
839
|
-
├──
|
|
840
|
-
|
|
841
|
-
├── public/ # Web UI
|
|
1541
|
+
├── public/ # Web UI (Studio)
|
|
1542
|
+
│ └── src/
|
|
1543
|
+
│ ├── components/ # Web components
|
|
1544
|
+
│ └── services/ # API client
|
|
842
1545
|
│
|
|
843
|
-
├──
|
|
844
|
-
|
|
845
|
-
├── llm.json # LLM and embedding configurations
|
|
846
|
-
├── mcp.json # MCP server configuration
|
|
847
|
-
└── .env # Environment variables
|
|
848
|
-
```
|
|
849
|
-
|
|
850
|
-
**Referencing in agents:**
|
|
851
|
-
|
|
852
|
-
```yaml
|
|
853
|
-
# Simple reference
|
|
854
|
-
llm: default
|
|
855
|
-
|
|
856
|
-
# With temperature override
|
|
857
|
-
llm:
|
|
858
|
-
name: default
|
|
859
|
-
temperature: 0.3
|
|
1546
|
+
├── templates/ # Project initialization templates
|
|
1547
|
+
└── docs/ # Documentation website
|
|
860
1548
|
```
|
|
861
1549
|
|
|
862
1550
|
## Tool Types
|
|
863
1551
|
|
|
864
1552
|
### Function Tools
|
|
865
|
-
Custom JavaScript
|
|
1553
|
+
Custom JavaScript functions you create in the `functions/` directory:
|
|
866
1554
|
```yaml
|
|
867
1555
|
tools:
|
|
868
1556
|
- function:fibonacci # References fibonacci.function.js
|
|
869
|
-
- function:
|
|
1557
|
+
- function:calculator
|
|
870
1558
|
```
|
|
871
1559
|
|
|
872
1560
|
### MCP Tools
|
|
@@ -876,32 +1564,21 @@ tools:
|
|
|
876
1564
|
- mcp:fetch # All tools from "fetch" server
|
|
877
1565
|
```
|
|
878
1566
|
|
|
879
|
-
###
|
|
880
|
-
Semantic search on
|
|
1567
|
+
### Knowledge Tools
|
|
1568
|
+
Semantic search on knowledge stores:
|
|
881
1569
|
```yaml
|
|
882
1570
|
tools:
|
|
883
|
-
-
|
|
1571
|
+
- knowledge:transcripts # Search "transcripts" store
|
|
1572
|
+
- knowledge:docs # Search "docs" store
|
|
884
1573
|
```
|
|
885
1574
|
|
|
886
1575
|
### Built-in Tools
|
|
887
1576
|
Framework-provided tools:
|
|
888
1577
|
```yaml
|
|
889
1578
|
tools:
|
|
890
|
-
- builtin:
|
|
1579
|
+
- builtin:ask_user # Human-in-the-loop (LangGraph only)
|
|
891
1580
|
```
|
|
892
1581
|
|
|
893
|
-
## Web UI
|
|
894
|
-
|
|
895
|
-
Access the web interface at `http://localhost:3000` after starting the server. The UI provides:
|
|
896
|
-
|
|
897
|
-
- **Agents Tab**: Select and run individual agents with custom input
|
|
898
|
-
- **Workflows Tab**: Select workflows, view flow diagrams, and execute with inputs
|
|
899
|
-
|
|
900
|
-
The workflow flow diagram visualizes:
|
|
901
|
-
- Step sequence with agent names
|
|
902
|
-
- Tool badges (MCP servers, vector databases)
|
|
903
|
-
- Input/output nodes
|
|
904
|
-
|
|
905
1582
|
## License
|
|
906
1583
|
|
|
907
1584
|
MIT
|