agent-orcha 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +917 -0
  3. package/bin/cli.js +2 -0
  4. package/dist/lib/agents/agent-executor.d.ts +13 -0
  5. package/dist/lib/agents/agent-executor.d.ts.map +1 -0
  6. package/dist/lib/agents/agent-executor.js +158 -0
  7. package/dist/lib/agents/agent-executor.js.map +1 -0
  8. package/dist/lib/agents/agent-loader.d.ts +13 -0
  9. package/dist/lib/agents/agent-loader.d.ts.map +1 -0
  10. package/dist/lib/agents/agent-loader.js +39 -0
  11. package/dist/lib/agents/agent-loader.js.map +1 -0
  12. package/dist/lib/agents/index.d.ts +5 -0
  13. package/dist/lib/agents/index.d.ts.map +1 -0
  14. package/dist/lib/agents/index.js +4 -0
  15. package/dist/lib/agents/index.js.map +1 -0
  16. package/dist/lib/agents/types.d.ts +140 -0
  17. package/dist/lib/agents/types.d.ts.map +1 -0
  18. package/dist/lib/agents/types.js +28 -0
  19. package/dist/lib/agents/types.js.map +1 -0
  20. package/dist/lib/functions/function-loader.d.ts +30 -0
  21. package/dist/lib/functions/function-loader.d.ts.map +1 -0
  22. package/dist/lib/functions/function-loader.js +107 -0
  23. package/dist/lib/functions/function-loader.js.map +1 -0
  24. package/dist/lib/functions/index.d.ts +3 -0
  25. package/dist/lib/functions/index.d.ts.map +1 -0
  26. package/dist/lib/functions/index.js +2 -0
  27. package/dist/lib/functions/index.js.map +1 -0
  28. package/dist/lib/functions/simple-function-wrapper.d.ts +33 -0
  29. package/dist/lib/functions/simple-function-wrapper.d.ts.map +1 -0
  30. package/dist/lib/functions/simple-function-wrapper.js +66 -0
  31. package/dist/lib/functions/simple-function-wrapper.js.map +1 -0
  32. package/dist/lib/index.d.ts +16 -0
  33. package/dist/lib/index.d.ts.map +1 -0
  34. package/dist/lib/index.js +17 -0
  35. package/dist/lib/index.js.map +1 -0
  36. package/dist/lib/llm/index.d.ts +6 -0
  37. package/dist/lib/llm/index.d.ts.map +1 -0
  38. package/dist/lib/llm/index.js +4 -0
  39. package/dist/lib/llm/index.js.map +1 -0
  40. package/dist/lib/llm/llm-config.d.ts +138 -0
  41. package/dist/lib/llm/llm-config.d.ts.map +1 -0
  42. package/dist/lib/llm/llm-config.js +75 -0
  43. package/dist/lib/llm/llm-config.js.map +1 -0
  44. package/dist/lib/llm/llm-factory.d.ts +30 -0
  45. package/dist/lib/llm/llm-factory.d.ts.map +1 -0
  46. package/dist/lib/llm/llm-factory.js +103 -0
  47. package/dist/lib/llm/llm-factory.js.map +1 -0
  48. package/dist/lib/llm/provider-detector.d.ts +12 -0
  49. package/dist/lib/llm/provider-detector.d.ts.map +1 -0
  50. package/dist/lib/llm/provider-detector.js +46 -0
  51. package/dist/lib/llm/provider-detector.js.map +1 -0
  52. package/dist/lib/llm/types.d.ts +19 -0
  53. package/dist/lib/llm/types.d.ts.map +1 -0
  54. package/dist/lib/llm/types.js +18 -0
  55. package/dist/lib/llm/types.js.map +1 -0
  56. package/dist/lib/logger.d.ts +43 -0
  57. package/dist/lib/logger.d.ts.map +1 -0
  58. package/dist/lib/logger.js +113 -0
  59. package/dist/lib/logger.js.map +1 -0
  60. package/dist/lib/mcp/index.d.ts +4 -0
  61. package/dist/lib/mcp/index.d.ts.map +1 -0
  62. package/dist/lib/mcp/index.js +3 -0
  63. package/dist/lib/mcp/index.js.map +1 -0
  64. package/dist/lib/mcp/mcp-client.d.ts +17 -0
  65. package/dist/lib/mcp/mcp-client.d.ts.map +1 -0
  66. package/dist/lib/mcp/mcp-client.js +166 -0
  67. package/dist/lib/mcp/mcp-client.js.map +1 -0
  68. package/dist/lib/mcp/types.d.ts +146 -0
  69. package/dist/lib/mcp/types.d.ts.map +1 -0
  70. package/dist/lib/mcp/types.js +24 -0
  71. package/dist/lib/mcp/types.js.map +1 -0
  72. package/dist/lib/orchestrator.d.ts +64 -0
  73. package/dist/lib/orchestrator.d.ts.map +1 -0
  74. package/dist/lib/orchestrator.js +201 -0
  75. package/dist/lib/orchestrator.js.map +1 -0
  76. package/dist/lib/tools/built-in/index.d.ts +2 -0
  77. package/dist/lib/tools/built-in/index.d.ts.map +1 -0
  78. package/dist/lib/tools/built-in/index.js +2 -0
  79. package/dist/lib/tools/built-in/index.js.map +1 -0
  80. package/dist/lib/tools/built-in/vector-search.tool.d.ts +4 -0
  81. package/dist/lib/tools/built-in/vector-search.tool.d.ts.map +1 -0
  82. package/dist/lib/tools/built-in/vector-search.tool.js +26 -0
  83. package/dist/lib/tools/built-in/vector-search.tool.js.map +1 -0
  84. package/dist/lib/tools/index.d.ts +3 -0
  85. package/dist/lib/tools/index.d.ts.map +1 -0
  86. package/dist/lib/tools/index.js +3 -0
  87. package/dist/lib/tools/index.js.map +1 -0
  88. package/dist/lib/tools/tool-registry.d.ts +20 -0
  89. package/dist/lib/tools/tool-registry.d.ts.map +1 -0
  90. package/dist/lib/tools/tool-registry.js +76 -0
  91. package/dist/lib/tools/tool-registry.js.map +1 -0
  92. package/dist/lib/vectors/index.d.ts +5 -0
  93. package/dist/lib/vectors/index.d.ts.map +1 -0
  94. package/dist/lib/vectors/index.js +4 -0
  95. package/dist/lib/vectors/index.js.map +1 -0
  96. package/dist/lib/vectors/types.d.ts +212 -0
  97. package/dist/lib/vectors/types.d.ts.map +1 -0
  98. package/dist/lib/vectors/types.js +39 -0
  99. package/dist/lib/vectors/types.js.map +1 -0
  100. package/dist/lib/vectors/vector-store-factory.d.ts +14 -0
  101. package/dist/lib/vectors/vector-store-factory.d.ts.map +1 -0
  102. package/dist/lib/vectors/vector-store-factory.js +350 -0
  103. package/dist/lib/vectors/vector-store-factory.js.map +1 -0
  104. package/dist/lib/vectors/vector-store-manager.d.ts +18 -0
  105. package/dist/lib/vectors/vector-store-manager.d.ts.map +1 -0
  106. package/dist/lib/vectors/vector-store-manager.js +79 -0
  107. package/dist/lib/vectors/vector-store-manager.js.map +1 -0
  108. package/dist/lib/workflows/index.d.ts +5 -0
  109. package/dist/lib/workflows/index.d.ts.map +1 -0
  110. package/dist/lib/workflows/index.js +4 -0
  111. package/dist/lib/workflows/index.js.map +1 -0
  112. package/dist/lib/workflows/types.d.ts +630 -0
  113. package/dist/lib/workflows/types.d.ts.map +1 -0
  114. package/dist/lib/workflows/types.js +51 -0
  115. package/dist/lib/workflows/types.js.map +1 -0
  116. package/dist/lib/workflows/workflow-executor.d.ts +22 -0
  117. package/dist/lib/workflows/workflow-executor.d.ts.map +1 -0
  118. package/dist/lib/workflows/workflow-executor.js +276 -0
  119. package/dist/lib/workflows/workflow-executor.js.map +1 -0
  120. package/dist/lib/workflows/workflow-loader.d.ts +13 -0
  121. package/dist/lib/workflows/workflow-loader.d.ts.map +1 -0
  122. package/dist/lib/workflows/workflow-loader.js +39 -0
  123. package/dist/lib/workflows/workflow-loader.js.map +1 -0
  124. package/dist/public/index.html +762 -0
  125. package/dist/src/cli/commands/init.d.ts +2 -0
  126. package/dist/src/cli/commands/init.d.ts.map +1 -0
  127. package/dist/src/cli/commands/init.js +108 -0
  128. package/dist/src/cli/commands/init.js.map +1 -0
  129. package/dist/src/cli/commands/start.d.ts +3 -0
  130. package/dist/src/cli/commands/start.d.ts.map +1 -0
  131. package/dist/src/cli/commands/start.js +114 -0
  132. package/dist/src/cli/commands/start.js.map +1 -0
  133. package/dist/src/cli/index.d.ts +3 -0
  134. package/dist/src/cli/index.d.ts.map +1 -0
  135. package/dist/src/cli/index.js +59 -0
  136. package/dist/src/cli/index.js.map +1 -0
  137. package/dist/src/index.d.ts +2 -0
  138. package/dist/src/index.d.ts.map +1 -0
  139. package/dist/src/index.js +62 -0
  140. package/dist/src/index.js.map +1 -0
  141. package/dist/src/routes/agents.route.d.ts +3 -0
  142. package/dist/src/routes/agents.route.d.ts.map +1 -0
  143. package/dist/src/routes/agents.route.js +58 -0
  144. package/dist/src/routes/agents.route.js.map +1 -0
  145. package/dist/src/routes/llm.route.d.ts +3 -0
  146. package/dist/src/routes/llm.route.d.ts.map +1 -0
  147. package/dist/src/routes/llm.route.js +97 -0
  148. package/dist/src/routes/llm.route.js.map +1 -0
  149. package/dist/src/routes/vectors.route.d.ts +3 -0
  150. package/dist/src/routes/vectors.route.d.ts.map +1 -0
  151. package/dist/src/routes/vectors.route.js +74 -0
  152. package/dist/src/routes/vectors.route.js.map +1 -0
  153. package/dist/src/routes/workflows.route.d.ts +3 -0
  154. package/dist/src/routes/workflows.route.d.ts.map +1 -0
  155. package/dist/src/routes/workflows.route.js +58 -0
  156. package/dist/src/routes/workflows.route.js.map +1 -0
  157. package/dist/src/server.d.ts +9 -0
  158. package/dist/src/server.d.ts.map +1 -0
  159. package/dist/src/server.js +34 -0
  160. package/dist/src/server.js.map +1 -0
  161. package/dist/templates/.env.example +6 -0
  162. package/dist/templates/README.md +234 -0
  163. package/dist/templates/agents/example.agent.yaml +32 -0
  164. package/dist/templates/agents/knowledge.agent.yaml +36 -0
  165. package/dist/templates/agents/math.agent.yaml +38 -0
  166. package/dist/templates/agents/time.agent.yaml +42 -0
  167. package/dist/templates/functions/README.md +195 -0
  168. package/dist/templates/functions/fibonacci.function.js +55 -0
  169. package/dist/templates/llm.json +44 -0
  170. package/dist/templates/mcp.json +18 -0
  171. package/dist/templates/vectors/example-chroma.vector.yaml +43 -0
  172. package/dist/templates/vectors/example.vector.yaml +28 -0
  173. package/dist/templates/vectors/sample-data/example-document.txt +15 -0
  174. package/dist/templates/workflows/example.workflow.yaml +79 -0
  175. package/package.json +77 -0
@@ -0,0 +1,195 @@
1
+ # Custom Functions
2
+
3
+ This directory contains custom function tools that can be used by agents in the orchestrator.
4
+
5
+ ## Overview
6
+
7
+ Functions are JavaScript files that export tools with metadata. They provide a way to extend agent capabilities with custom logic and operations.
8
+
9
+ **No dependencies required!** Functions use a simple format that requires no npm packages or imports.
10
+
11
+ ## Creating a Function
12
+
13
+ Functions must follow this structure:
14
+
15
+ 1. File name must end with `.function.js`
16
+ 2. Must export a default object with `name`, `description`, `parameters`, and `execute`
17
+ 3. Optionally export metadata for better documentation
18
+
19
+ ### Simple Format (Recommended)
20
+
21
+ **No imports needed!** Just export a plain JavaScript object:
22
+
23
+ ```javascript
24
+ /**
25
+ * Your function description
26
+ */
27
+ export default {
28
+ name: 'your-function-name',
29
+ description: 'A clear description of what this function does',
30
+
31
+ parameters: {
32
+ param1: {
33
+ type: 'number',
34
+ description: 'Description of parameter 1',
35
+ },
36
+ param2: {
37
+ type: 'string',
38
+ description: 'Description of parameter 2',
39
+ },
40
+ optionalParam: {
41
+ type: 'boolean',
42
+ description: 'An optional parameter',
43
+ required: false,
44
+ default: true,
45
+ },
46
+ },
47
+
48
+ execute: async ({ param1, param2, optionalParam }) => {
49
+ // Your implementation here
50
+ return `Result: ${param1 + param2}`;
51
+ },
52
+ };
53
+
54
+ // Optional: Export metadata for discovery
55
+ export const metadata = {
56
+ name: 'your-function-name',
57
+ description: 'Function description',
58
+ version: '1.0.0',
59
+ author: 'Your Name',
60
+ tags: ['category1', 'category2'],
61
+ };
62
+ ```
63
+
64
+ ### Parameter Types
65
+
66
+ Supported parameter types:
67
+
68
+ - `'string'` - String value
69
+ - `'number'` - Numeric value
70
+ - `'boolean'` - Boolean true/false
71
+ - `'array'` - Array of values
72
+ - `'object'` - Object/JSON structure
73
+ - `'enum'` - One of a fixed set of values (requires `values` array)
74
+
75
+ ### Enum Parameters
76
+
77
+ For parameters with a fixed set of allowed values:
78
+
79
+ ```javascript
80
+ parameters: {
81
+ operation: {
82
+ type: 'enum',
83
+ values: ['add', 'subtract', 'multiply', 'divide'],
84
+ description: 'The operation to perform',
85
+ },
86
+ }
87
+ ```
88
+
89
+ ## Using Functions in Agents
90
+
91
+ To use a function in an agent, add it to the agent's `tools` array using the `function:` prefix:
92
+
93
+ ```yaml
94
+ name: my-agent
95
+ description: An agent that uses custom functions
96
+
97
+ tools:
98
+ - function:fibonacci # References fibonacci.function.js
99
+ - function:your-function-name
100
+
101
+ # ... rest of agent configuration
102
+ ```
103
+
104
+ ## Available Functions
105
+
106
+ ### fibonacci
107
+
108
+ **File:** `fibonacci.function.js`
109
+
110
+ **Description:** Returns the nth Fibonacci number
111
+
112
+ **Parameters:**
113
+ - `n` (number) - The index (0-based, max 100)
114
+
115
+ **Examples:**
116
+ - Fibonacci(0) returns: 0
117
+ - Fibonacci(5) returns: 5
118
+ - Fibonacci(10) returns: 55
119
+
120
+ **Usage in agent:**
121
+ ```yaml
122
+ tools:
123
+ - function:fibonacci
124
+ ```
125
+
126
+ ## Best Practices
127
+
128
+ 1. **Error Handling**: Always validate inputs and handle errors gracefully
129
+ 2. **Descriptive Names**: Use clear, descriptive names for functions and parameters
130
+ 3. **Documentation**: Include JSDoc comments explaining what the function does
131
+ 4. **Parameter Descriptions**: Provide clear descriptions for each parameter
132
+ 5. **Metadata**: Export metadata to make functions discoverable and well-documented
133
+ 6. **Async Operations**: Use async/await for operations that involve I/O or external calls
134
+ 7. **Return Values**: Return strings or serializable objects that agents can interpret
135
+
136
+ ## Development Tips
137
+
138
+ - Functions are loaded automatically on orchestrator initialization
139
+ - Function names must be unique across all loaded functions
140
+ - The simple format requires no npm packages or dependencies
141
+ - Test functions independently before integrating with agents
142
+ - Use the simple format unless you need advanced LangChain features
143
+
144
+ ## Example Agent Using Fibonacci
145
+
146
+ ```yaml
147
+ name: math-assistant
148
+ description: A Fibonacci number assistant
149
+
150
+ llm:
151
+ name: default
152
+ temperature: 0.3
153
+
154
+ prompt:
155
+ system: |
156
+ You are a math assistant specialized in Fibonacci numbers.
157
+ Use the fibonacci tool to calculate Fibonacci numbers or sequences.
158
+ inputVariables:
159
+ - query
160
+
161
+ tools:
162
+ - function:fibonacci
163
+
164
+ output:
165
+ format: text
166
+ ```
167
+
168
+ ## Extending the System
169
+
170
+ To add new function capabilities:
171
+
172
+ 1. Create a new `.function.js` file in this directory
173
+ 2. Export a default object with the simple format shown above
174
+ 3. Add it to your agent's tools array as `function:your-name`
175
+ 4. Restart the orchestrator to load the new function
176
+
177
+ **Example new function:**
178
+
179
+ ```javascript
180
+ // my-function.function.js
181
+ export default {
182
+ name: 'my-function',
183
+ description: 'Does something useful',
184
+ parameters: {
185
+ input: {
186
+ type: 'string',
187
+ description: 'The input to process',
188
+ },
189
+ },
190
+ execute: async ({ input }) => {
191
+ // Your logic here
192
+ return `Processed: ${input}`;
193
+ },
194
+ };
195
+ ```
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Fibonacci calculator function - Simple format example
3
+ *
4
+ * This demonstrates the simple function format that requires no imports.
5
+ * Just export a default object with name, description, parameters, and execute.
6
+ */
7
+
8
+ export default {
9
+ name: 'fibonacci',
10
+ description: 'Returns the nth Fibonacci number (0-based indexing).',
11
+
12
+ parameters: {
13
+ n: {
14
+ type: 'number',
15
+ description: 'The index of the Fibonacci number (0-based). For example, n=0 returns 0, n=5 returns 5.',
16
+ },
17
+ },
18
+
19
+ execute: async ({ n }) => {
20
+ // Validate input
21
+ if (n < 0) {
22
+ throw new Error('Index must be non-negative');
23
+ }
24
+ if (!Number.isInteger(n)) {
25
+ throw new Error('Index must be an integer');
26
+ }
27
+ if (n > 100) {
28
+ throw new Error('Index too large (max 100 to prevent overflow)');
29
+ }
30
+
31
+ // Calculate Fibonacci number
32
+ if (n === 0) return `Fibonacci(${n}) = 0`;
33
+ if (n === 1) return `Fibonacci(${n}) = 1`;
34
+
35
+ let prev = 0;
36
+ let curr = 1;
37
+
38
+ for (let i = 2; i <= n; i++) {
39
+ const next = prev + curr;
40
+ prev = curr;
41
+ curr = next;
42
+ }
43
+
44
+ return `Fibonacci(${n}) = ${curr}`;
45
+ },
46
+ };
47
+
48
+ // Optional: Export metadata for discovery
49
+ export const metadata = {
50
+ name: 'fibonacci',
51
+ description: 'Returns the nth Fibonacci number',
52
+ version: '1.0.0',
53
+ author: 'Agent Orchestrator',
54
+ tags: ['math', 'fibonacci'],
55
+ };
@@ -0,0 +1,44 @@
1
+ {
2
+ "version": "1.0",
3
+ "models": {
4
+ "default": {
5
+ "provider": "openai",
6
+ "baseUrl": "http://localhost:1234/v1",
7
+ "apiKey": "not-needed",
8
+ "model": "your-model-name",
9
+ "temperature": 0.7
10
+ },
11
+ "openai": {
12
+ "provider": "openai",
13
+ "apiKey": "sk-your-openai-key-here",
14
+ "model": "gpt-4o",
15
+ "temperature": 0.7
16
+ },
17
+ "gemini": {
18
+ "provider": "gemini",
19
+ "apiKey": "your-gemini-api-key-here",
20
+ "model": "gemini-2.0-flash-exp",
21
+ "temperature": 0.7
22
+ }
23
+ },
24
+ "embeddings": {
25
+ "default": {
26
+ "provider": "openai",
27
+ "baseUrl": "http://localhost:1234/v1",
28
+ "apiKey": "not-needed",
29
+ "model": "text-embedding-nomic-embed-text-v1.5",
30
+ "eosToken": " "
31
+ },
32
+ "openai": {
33
+ "provider": "openai",
34
+ "apiKey": "sk-your-openai-key-here",
35
+ "model": "text-embedding-3-small",
36
+ "dimensions": 1536
37
+ },
38
+ "gemini": {
39
+ "provider": "gemini",
40
+ "apiKey": "your-gemini-api-key-here",
41
+ "model": "text-embedding-004"
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "servers": {
4
+ "fetch": {
5
+ "transport": "streamable-http",
6
+ "url": "https://remote.mcpservers.org/fetch/mcp",
7
+ "description": "Web fetch capabilities for retrieving URLs and returning markdown",
8
+ "timeout": 30000,
9
+ "enabled": true
10
+ }
11
+ },
12
+ "globalOptions": {
13
+ "throwOnLoadError": false,
14
+ "prefixToolNameWithServerName": true,
15
+ "additionalToolNamePrefix": "",
16
+ "defaultToolTimeout": 30000
17
+ }
18
+ }
@@ -0,0 +1,43 @@
1
+ name: example-chroma
2
+ description: Example vector store using Chroma for persistent storage
3
+
4
+ source:
5
+ type: directory
6
+ path: vectors/sample-data
7
+ pattern: "*.txt"
8
+ recursive: false
9
+
10
+ loader:
11
+ type: text
12
+
13
+ splitter:
14
+ type: character
15
+ chunkSize: 1000
16
+ chunkOverlap: 200
17
+
18
+ embedding: default # References embedding config in llm.json
19
+
20
+ store:
21
+ type: chroma
22
+ options:
23
+ # Path where Chroma will store data (relative to project root)
24
+ # Default: .chroma
25
+ path: .chroma
26
+
27
+ # Collection name for this vector store
28
+ # Default: uses the vector store name
29
+ collectionName: example-chroma
30
+
31
+ # Chroma server URL
32
+ # Default: http://localhost:8000
33
+ # Note: You need to run Chroma server separately
34
+ # Docker: docker run -p 8000:8000 chromadb/chroma
35
+ url: http://localhost:8000
36
+
37
+ search:
38
+ defaultK: 4
39
+ scoreThreshold: 0.2
40
+
41
+ metadata:
42
+ category: example
43
+ persistence: chroma
@@ -0,0 +1,28 @@
1
+ name: example
2
+ description: Example vector store for semantic search
3
+
4
+ source:
5
+ type: directory
6
+ path: vectors/sample-data
7
+ pattern: "*.txt"
8
+ recursive: false
9
+
10
+ loader:
11
+ type: text
12
+
13
+ splitter:
14
+ type: character
15
+ chunkSize: 1000
16
+ chunkOverlap: 200
17
+
18
+ embedding: default # References embedding config in llm.json
19
+
20
+ store:
21
+ type: memory # Use 'chroma' for production with persistent storage
22
+
23
+ search:
24
+ defaultK: 4
25
+ scoreThreshold: 0.2
26
+
27
+ metadata:
28
+ category: example
@@ -0,0 +1,15 @@
1
+ Welcome to Agent Orchestrator
2
+
3
+ This is an example document for the vector store.
4
+
5
+ Agent Orchestrator is a TypeScript framework for building and orchestrating multi-agent AI systems with LangChain, Model Context Protocol (MCP), and vector store integration.
6
+
7
+ Key Features:
8
+ - Define agents using YAML configuration files
9
+ - Create workflows that coordinate multiple agents
10
+ - Integrate vector stores for RAG capabilities
11
+ - Connect MCP servers for extended functionality
12
+ - REST API for programmatic access
13
+
14
+ You can add more documents to this directory to build your knowledge base.
15
+ Each document will be chunked and embedded for semantic search.
@@ -0,0 +1,79 @@
1
+ name: example-workflow
2
+ description: A workflow demonstrating multi-agent orchestration with MCP, function, and vector tools
3
+ version: "1.0.0"
4
+
5
+ input:
6
+ schema:
7
+ topic:
8
+ type: string
9
+ required: true
10
+ description: The topic or question to process
11
+
12
+ steps:
13
+ # Step 1: Get current East Coast time
14
+ - id: get-time
15
+ agent: time
16
+ input:
17
+ timezone: "America/New_York"
18
+ output:
19
+ key: current_time
20
+
21
+ # Step 2: Search the knowledge base for relevant information
22
+ - id: search-knowledge
23
+ agent: knowledge
24
+ input:
25
+ query: "{{input.topic}}"
26
+ output:
27
+ key: knowledge_result
28
+
29
+ # Step 3: Calculate the 10th Fibonacci number
30
+ - id: perform-calculation
31
+ agent: math
32
+ input:
33
+ query: "Calculate the 10th Fibonacci number"
34
+ output:
35
+ key: calculation_result
36
+
37
+ # Step 4: Summarize results with the example agent
38
+ - id: summarize
39
+ agent: example
40
+ input:
41
+ query: |
42
+ Summarize the following information:
43
+
44
+ Current East Coast USA Time:
45
+ {{steps.get-time.output}}
46
+
47
+ Topic: {{input.topic}}
48
+
49
+ Knowledge Base Results:
50
+ {{steps.search-knowledge.output}}
51
+
52
+ Fibonacci Calculation Results:
53
+ {{steps.perform-calculation.output}}
54
+
55
+ Provide a coherent summary combining these results, and make sure to include the current time.
56
+ output:
57
+ key: final_summary
58
+
59
+ config:
60
+ timeout: 300000
61
+ onError: stop
62
+
63
+ output:
64
+ timestamp: "{{steps.get-time.output}}"
65
+ knowledge: "{{steps.search-knowledge.output}}"
66
+ calculation: "{{steps.perform-calculation.output}}"
67
+ summary: "{{steps.summarize.output}}"
68
+
69
+ metadata:
70
+ category: example
71
+ tags:
72
+ - demo
73
+ - workflow
74
+ - multi-agent
75
+ - function-tools
76
+ - vector-search
77
+ - mcp-tools
78
+ - time-api
79
+ - fibonacci
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "agent-orcha",
3
+ "version": "0.0.1",
4
+ "description": "TypeScript Agentic Orchestration http server and framework for building multi-agent workflows with MCP tools and vector stores",
5
+ "keywords": [
6
+ "ai",
7
+ "agents",
8
+ "llm",
9
+ "langchain",
10
+ "mcp",
11
+ "vector-store",
12
+ "rag",
13
+ "orchestrator",
14
+ "workflow",
15
+ "typescript",
16
+ "orca"
17
+ ],
18
+ "author": "David Dalcu <david.dalcu@gmail.com>",
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/ddalcu/agent-orcha.git"
23
+ },
24
+ "type": "module",
25
+ "main": "dist/lib/index.js",
26
+ "types": "dist/lib/index.d.ts",
27
+ "bin": {
28
+ "agent-orcha": "./bin/cli.js"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "bin",
33
+ "README.md",
34
+ "LICENSE"
35
+ ],
36
+ "scripts": {
37
+ "dev": "tsx watch src/index.ts",
38
+ "build": "tsc && npm run copy-assets",
39
+ "copy-assets": "mkdir -p dist && cp -r public dist/ && cp -r templates dist/",
40
+ "start": "node dist/src/index.js",
41
+ "prepublishOnly": "npm run build",
42
+ "lint": "eslint src lib --ext .ts",
43
+ "typecheck": "tsc --noEmit",
44
+ "test": "node --import tsx/esm --test test/**/*.test.ts"
45
+ },
46
+ "dependencies": {
47
+ "@fastify/cors": "^10.0.1",
48
+ "@fastify/static": "^8.0.4",
49
+ "@langchain/anthropic": "^1.3.10",
50
+ "@langchain/community": "^1.1.4",
51
+ "@langchain/core": "^1.1.15",
52
+ "@langchain/google-genai": "^2.1.10",
53
+ "@langchain/langgraph": "^1.1.0",
54
+ "@langchain/openai": "^1.2.2",
55
+ "@langchain/textsplitters": "^1.0.1",
56
+ "@modelcontextprotocol/sdk": "^1.0.0",
57
+ "chromadb": "^1.9.2",
58
+ "dotenv": "^16.4.7",
59
+ "fastify": "^5.2.0",
60
+ "glob": "^11.0.0",
61
+ "langchain": "^1.2.10",
62
+ "openai": "^4.104.0",
63
+ "pino": "^10.2.1",
64
+ "pino-pretty": "^13.1.3",
65
+ "yaml": "^2.6.1",
66
+ "zod": "^3.24.1"
67
+ },
68
+ "devDependencies": {
69
+ "@types/node": "^22.10.5",
70
+ "eslint": "^9.17.0",
71
+ "tsx": "^4.19.2",
72
+ "typescript": "^5.7.2"
73
+ },
74
+ "engines": {
75
+ "node": ">=20.0.0"
76
+ }
77
+ }