@j-o-r/hello-dave 0.1.1 → 0.1.5
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/CHANGELOG.md +42 -25
- package/README.md +81 -221
- package/TODO.md +173 -35
- package/agents/agent_creator.js +105 -0
- package/agents/agent_creator.prompt.md +371 -0
- package/agents/ask_agent.js +64 -127
- package/agents/claude_agent.js +68 -0
- package/agents/code_agent.js +55 -135
- package/agents/code_agent.prompt.md +50 -0
- package/agents/echo_agent.js +76 -0
- package/agents/financial_expert.js +75 -0
- package/agents/gpt_agent.js +52 -103
- package/agents/gpt_code.js +81 -0
- package/agents/grok_agent.js +58 -114
- package/agents/minimax_agent.js +92 -0
- package/agents/mureka_agent.js +77 -0
- package/agents/planner_agent.js +172 -0
- package/agents/stability_agent.js +87 -0
- package/agents/test_agent.js +75 -157
- package/agents/weather_agent.js +73 -0
- package/agents/workflow_agent.js +189 -0
- package/bin/dave.js +436 -184
- package/docs/bin-dave.md +85 -35
- package/docs/cdn-ssh.md +100 -0
- package/docs/creating-agents.md +301 -0
- package/docs/creating-toolsets.md +336 -0
- package/docs/docs-organization.md +48 -0
- package/docs/project-overview.md +86 -51
- package/lib/API/elevenlabs.io/music.compose.md +441 -0
- package/lib/API/elevenlabs.io/music.create-composition-plan.md +370 -0
- package/lib/API/elevenlabs.io/music.stream.md +425 -0
- package/lib/API/lalal.ai/lalal.js +445 -0
- package/lib/API/lalal.ai/openapi.json +2614 -0
- package/lib/API/minimax/ImageToolset.js +82 -37
- package/lib/API/minimax/MusicToolset.js +125 -79
- package/lib/API/minimax/VideoToolset.js +170 -167
- package/lib/API/minimax/image.js +5 -1
- package/lib/API/minimax/music.js +210 -23
- package/lib/API/minimax/video.js +242 -53
- package/lib/API/mureka/MusicToolset.js +646 -0
- package/lib/API/mureka/README.md +41 -0
- package/lib/API/mureka/index.js +7 -0
- package/lib/API/mureka/music.js +658 -0
- package/lib/API/openai.com/index.js +7 -0
- package/lib/API/openai.com/{reponses/text.js → responses.js} +64 -18
- package/lib/API/openai.com/video.create.character.md +40 -0
- package/lib/API/openai.com/video.create.md +219 -0
- package/lib/API/openai.com/video.delete.md +44 -0
- package/lib/API/openai.com/video.download.md +31 -0
- package/lib/API/openai.com/video.edit.md +155 -0
- package/lib/API/openai.com/video.extend.md +166 -0
- package/lib/API/openai.com/video.fetch.character.md +43 -0
- package/lib/API/openai.com/video.js +784 -0
- package/lib/API/openai.com/video.list.md +201 -0
- package/lib/API/openai.com/video.remix.md +175 -0
- package/lib/API/openai.com/video.retrieve.md +139 -0
- package/lib/API/openai.com/videoToolset.js +616 -0
- package/lib/API/stability.ai/ImageToolset.js +131 -40
- package/lib/API/stability.ai/MusicToolset.js +79 -47
- package/lib/API/stability.ai/audio.js +63 -131
- package/lib/API/x.ai/chat.responses.md +1040 -0
- package/lib/API/x.ai/image.js +229 -59
- package/lib/API/x.ai/imageToolset.js +376 -0
- package/lib/API/x.ai/index.js +1 -1
- package/lib/API/x.ai/responses.js +9 -18
- package/lib/Agent.js +271 -0
- package/lib/Agent.js.old +284 -0
- package/lib/AgentLauncher.js +593 -0
- package/lib/Cli.js +87 -13
- package/lib/Prompt.js +23 -1
- package/lib/Session.js +5 -4
- package/lib/ToolSet.js +102 -6
- package/lib/agentLoader.js +369 -0
- package/lib/cdn.js +67 -231
- package/lib/{CdnToolset.js → cdnToolset.js} +47 -64
- package/lib/defaultToolsets.js +43 -0
- package/lib/fafs.js +1 -1
- package/lib/genericToolset.js +442 -119
- package/lib/handOffToolset.js +179 -0
- package/lib/index.js +34 -27
- package/lib/toolsetLoader.js +248 -0
- package/package.json +10 -4
- package/types/API/lalal.ai/lalal.d.ts +116 -0
- package/types/API/minimax/image.d.ts +2 -1
- package/types/API/minimax/music.d.ts +189 -26
- package/types/API/minimax/video.d.ts +100 -31
- package/types/API/mureka/index.d.ts +7 -0
- package/types/API/mureka/music.d.ts +472 -0
- package/types/API/openai.com/index.d.ts +7 -0
- package/types/API/openai.com/{reponses/text.d.ts → responses.d.ts} +11 -11
- package/types/API/openai.com/video.d.ts +409 -0
- package/types/API/openai.com/videoToolset.d.ts +24 -0
- package/types/API/stability.ai/audio.d.ts +14 -103
- package/types/API/stability.ai/image.d.ts +2 -2
- package/types/API/x.ai/image.d.ts +138 -26
- package/types/API/x.ai/imageToolset.d.ts +3 -0
- package/types/API/x.ai/index.d.ts +1 -1
- package/types/API/x.ai/responses.d.ts +4 -4
- package/types/Agent.d.ts +123 -0
- package/types/AgentLauncher.d.ts +250 -0
- package/types/Cli.d.ts +28 -8
- package/types/Prompt.d.ts +23 -5
- package/types/Session.d.ts +1 -1
- package/types/ToolSet.d.ts +10 -0
- package/types/agentLoader.d.ts +78 -0
- package/types/cdn.d.ts +15 -90
- package/types/defaultToolsets.d.ts +9 -0
- package/types/fafs.d.ts +1 -1
- package/types/genericToolset.d.ts +1 -1
- package/types/handOffToolset.d.ts +28 -0
- package/types/index.d.ts +19 -17
- package/types/toolsetLoader.d.ts +114 -0
- package/utils/format_log.js +101 -23
- package/utils/launch_agent.js +18 -0
- package/utils/list_sessions.sh +13 -5
- package/utils/search_sessions.sh +65 -29
- package/utils/toolsets.js +33 -0
- package/README.md.bak.1779452127 +0 -240
- package/agents/codeserver.sh +0 -47
- package/agents/daisy_agent.js +0 -173
- package/agents/docs_agent.js +0 -148
- package/agents/memory_agent.js +0 -263
- package/agents/minimax.js +0 -173
- package/agents/npm_agent.js +0 -202
- package/agents/prompt_agent.js +0 -133
- package/agents/readme_agent.js +0 -148
- package/agents/spawn_agent.js +0 -160
- package/agents/stability.js +0 -173
- package/agents/todo_agent.js +0 -175
- package/bin/codeDave +0 -58
- package/docs/agent-dave-websocket-protocol.md +0 -180
- package/docs/agent-manager.md +0 -244
- package/docs/codeserver-pattern.md +0 -191
- package/docs/generic-toolset.md +0 -326
- package/docs/howtos/agent-networking.md +0 -253
- package/docs/howtos/spawn-agents.md.bak +0 -200
- package/docs/howtos/spawn-agents.md.bak_new +0 -200
- package/docs/multi-agent-clusters.md +0 -265
- package/docs/music-toolsets.md +0 -137
- package/docs/path-resolution-best-practices.md +0 -104
- package/docs/plans/minimax-music-generation.md +0 -80
- package/docs/plans/unified-agent-architecture.md +0 -146
- package/docs/plans/websocket-streaming-plan.md.bak +0 -317
- package/docs/prompt/spawn_agent.md +0 -175
- package/docs/prompt/spawn_agent.md.bak +0 -201
- package/docs/prompt/task_clarification_and_documentation.md +0 -35
- package/docs/prompt-class.md +0 -141
- package/docs/todo-archive-infra-2026-04-21.md +0 -15
- package/docs/todo-archive-v0.0.8.md +0 -1
- package/docs/todo-archive-v0.1.0.md +0 -32
- package/docs/todo-archive.md +0 -44
- package/docs/tools-syntax-validation.md +0 -121
- package/docs/toolset.md +0 -164
- package/docs/xai-responses.md +0 -111
- package/docs/xai_collections.md +0 -106
- package/lib/API/x.ai/ImageToolset.js +0 -165
- package/lib/API/x.ai/text.js +0 -415
- package/lib/AgentClient.js +0 -248
- package/lib/AgentManager.js +0 -245
- package/lib/AgentServer.js +0 -404
- package/lib/wsCli.js +0 -287
- package/lib/wsIO.js +0 -90
- package/types/API/x.ai/text.d.ts +0 -286
- package/types/AgentClient.d.ts +0 -109
- package/types/AgentManager.d.ts +0 -100
- package/types/AgentServer.d.ts +0 -89
- package/types/wsCli.d.ts +0 -17
- package/types/wsIO.d.ts +0 -30
- package/utils/test.sh +0 -46
- /package/docs/{suggestions.md → _notes/token-counts.md} +0 -0
- /package/lib/API/openai.com/{reponses/MESSAGES.md → MESSAGES.md} +0 -0
- /package/types/API/{x.ai/ImageToolset.d.ts → mureka/MusicToolset.d.ts} +0 -0
- /package/types/{CdnToolset.d.ts → cdnToolset.d.ts} +0 -0
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
# Spawning and Managing Agents
|
|
2
|
-
|
|
3
|
-
This guide covers how to directly call agents, use the Spawn Dave workflow, and utilize Spawn Agent for creating, testing, and improving agents. It includes practical examples in Bash and JavaScript, as well as concepts for self-improvement loops. For foundational concepts on agent interactions, refer to [agent-networking.md](./agent-networking.md).
|
|
4
|
-
|
|
5
|
-
## 1. Direct Agent Calls
|
|
6
|
-
|
|
7
|
-
Direct agent calls allow you to invoke specific agents from the command line or scripts without spawning a full workflow. This is useful for quick queries or testing individual agent behaviors.
|
|
8
|
-
|
|
9
|
-
### Real Project Example: Calling GPT Agent
|
|
10
|
-
|
|
11
|
-
In the project, you can directly invoke the GPT agent using the provided script.
|
|
12
|
-
|
|
13
|
-
**JavaScript Snippet (examples/gpt_agent.js):**
|
|
14
|
-
```javascript
|
|
15
|
-
// examples/gpt_agent.js
|
|
16
|
-
const { createAgent } = require('../lib/agent-factory'); // Assuming agent factory module
|
|
17
|
-
|
|
18
|
-
async function runAgent(query) {
|
|
19
|
-
const agent = createAgent('gpt'); // Initialize GPT agent
|
|
20
|
-
const response = await agent.process(query);
|
|
21
|
-
console.log(response);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (require.main === module) {
|
|
25
|
-
const query = process.argv[2];
|
|
26
|
-
if (!query) {
|
|
27
|
-
console.error('Usage: node examples/gpt_agent.js "your query"');
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
runAgent(query).catch(console.error);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Bash Command to Run:**
|
|
35
|
-
```bash
|
|
36
|
-
node examples/gpt_agent.js "What is the capital of France?"
|
|
37
|
-
# Output: Paris (or similar GPT response)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
This is a real example from the project, enabling straightforward execution. Extend it by passing additional flags for configuration, e.g., `--model gpt-4`.
|
|
41
|
-
|
|
42
|
-
## 2. Spawn Dave Workflow
|
|
43
|
-
|
|
44
|
-
The Spawn Dave workflow (examples/spawn_dave.js) is a predefined sequence for initializing a "Dave" agent instance, which handles complex tasks like multi-step reasoning or integration with external tools.
|
|
45
|
-
|
|
46
|
-
### Overview
|
|
47
|
-
- **Purpose:** Spawn a Dave agent that can orchestrate sub-agents or workflows.
|
|
48
|
-
- **Key Features:** Tool integration, state management, and logging.
|
|
49
|
-
|
|
50
|
-
### Example: Running Spawn Dave
|
|
51
|
-
|
|
52
|
-
**JavaScript Snippet (examples/spawn_dave.js):**
|
|
53
|
-
```javascript
|
|
54
|
-
// examples/spawn_dave.js
|
|
55
|
-
const { spawnDave } = require('../workflows/spawn-dave'); // Import workflow
|
|
56
|
-
|
|
57
|
-
async function main(task) {
|
|
58
|
-
const dave = await spawnDave({
|
|
59
|
-
tools: ['web_search', 'code_executor'],
|
|
60
|
-
model: 'gpt-4'
|
|
61
|
-
});
|
|
62
|
-
const outcome = await dave.execute(task);
|
|
63
|
-
console.log('Dave's response:', outcome);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (require.main === module) {
|
|
67
|
-
const task = process.argv[2] || 'Default task: Analyze market trends.';
|
|
68
|
-
main(task).catch(console.error);
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Bash Command:**
|
|
73
|
-
```bash
|
|
74
|
-
node examples/spawn_dave.js "Summarize recent AI advancements."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
This workflow automatically handles agent lifecycle: spawn, execute, and cleanup. For networking multiple Daves, see [agent-networking.md](./agent-networking.md).
|
|
78
|
-
|
|
79
|
-
## 3. Spawn Agent (examples/spawn_agent.js or agentDave)
|
|
80
|
-
|
|
81
|
-
Spawn Agent is a utility for dynamically creating, testing, and improving agents based on outcomes. It's ideal for iterative development, where agents self-improve through workflows and tests. The entry point is `examples/spawn_agent.js`, which can be aliased as `agentDave` via the `package.json` scripts (e.g., `npm run agentDave -- create ...`).
|
|
82
|
-
|
|
83
|
-
### Core Functionality
|
|
84
|
-
- **Creating Agents:** Define agent specs (prompts, tools, models) and spawn instances.
|
|
85
|
-
- **Testing:** Run predefined tests to evaluate performance.
|
|
86
|
-
- **Improving:** Use feedback loops to refine prompts or configurations based on outcomes.
|
|
87
|
-
- **Self-Improvement Loops:** Agents can analyze their own outputs and suggest updates.
|
|
88
|
-
|
|
89
|
-
### Example: Basic Spawn and Test
|
|
90
|
-
|
|
91
|
-
**Bash Usage (via examples/spawn_agent.js or npm run agentDave):**
|
|
92
|
-
```bash
|
|
93
|
-
# Spawn a new agent for math tasks
|
|
94
|
-
node examples/spawn_agent.js create --name math-solver --tools calculator --prompt "Solve math problems step-by-step."
|
|
95
|
-
|
|
96
|
-
# Or using alias
|
|
97
|
-
npm run agentDave -- create --name math-solver --tools calculator --prompt "Solve math problems step-by-step."
|
|
98
|
-
|
|
99
|
-
# Test the agent
|
|
100
|
-
node examples/spawn_agent.js test --name math-solver --input "2+2*3" --expected 8
|
|
101
|
-
|
|
102
|
-
# Improve based on outcomes
|
|
103
|
-
node examples/spawn_agent.js improve --name math-solver --feedback "Failed on algebra; add quadratic formula."
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**JavaScript Integration (Custom Script):**
|
|
107
|
-
```javascript
|
|
108
|
-
// test-spawn.js
|
|
109
|
-
const { spawnAgent, testAgent, improveAgent } = require('../examples/spawn_agent');
|
|
110
|
-
|
|
111
|
-
async function workflow() {
|
|
112
|
-
// Create
|
|
113
|
-
const agent = await spawnAgent({
|
|
114
|
-
name: 'researcher',
|
|
115
|
-
tools: ['web_search', 'browse_page'],
|
|
116
|
-
prompt: 'Conduct thorough research on topics.'
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// Test
|
|
120
|
-
const testResult = await testAgent(agent, { query: 'Latest on quantum computing', expected: /qubits/ });
|
|
121
|
-
console.log('Test passed:', testResult.passed);
|
|
122
|
-
|
|
123
|
-
// Self-Improvement Loop
|
|
124
|
-
if (!testResult.passed) {
|
|
125
|
-
const improvements = await improveAgent(agent, testResult.feedback);
|
|
126
|
-
console.log('Suggested improvements:', improvements);
|
|
127
|
-
// Re-spawn with updates
|
|
128
|
-
const updatedAgent = await spawnAgent({ ...agent.config, prompt: improvements.newPrompt });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
workflow().catch(console.error);
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Running the Script:**
|
|
136
|
-
```bash
|
|
137
|
-
node test-spawn.js
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Self-Improvement Loops
|
|
141
|
-
Implement loops where agents evaluate their performance using tools like `test_agent.js` for testing and `memory_agent` for storing past evaluations and improvements.
|
|
142
|
-
|
|
143
|
-
1. **Execute Task:** Run agent on input.
|
|
144
|
-
2. **Evaluate Outcome:** Use `test_agent.js` to compare against benchmarks.
|
|
145
|
-
3. **Store and Generate Improvements:** Leverage `memory_agent` to recall past failures and suggest refinements.
|
|
146
|
-
4. **Update and Iterate:** Apply changes and re-test.
|
|
147
|
-
|
|
148
|
-
**Example Loop in JS (using test_agent.js and memory_agent):**
|
|
149
|
-
```javascript
|
|
150
|
-
// self-improve-loop.js
|
|
151
|
-
const { spawnAgent } = require('../examples/spawn_agent');
|
|
152
|
-
const { testAgent } = require('../examples/test_agent');
|
|
153
|
-
const { memoryAgent } = require('../lib/memory_agent'); // Assuming memory agent for evaluation storage
|
|
154
|
-
|
|
155
|
-
async function selfImproveLoop(initialConfig, task, maxIterations = 5) {
|
|
156
|
-
let agent = await spawnAgent(initialConfig);
|
|
157
|
-
const memory = memoryAgent(); // For storing evaluations
|
|
158
|
-
|
|
159
|
-
for (let i = 0; i < maxIterations; i++) {
|
|
160
|
-
const result = await agent.execute(task);
|
|
161
|
-
const testResult = await testAgent(agent, { input: task, output: result, expected: /desired pattern/ });
|
|
162
|
-
|
|
163
|
-
// Store in memory
|
|
164
|
-
await memory.store({ iteration: i, test: testResult });
|
|
165
|
-
|
|
166
|
-
if (testResult.passed) {
|
|
167
|
-
console.log('Improvement loop converged.');
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Retrieve past suggestions from memory
|
|
172
|
-
const pastFeedback = await memory.retrieve('improvements');
|
|
173
|
-
const improvements = await agent.suggestImprovements(testResult.feedback, pastFeedback);
|
|
174
|
-
agent.updateConfig(improvements);
|
|
175
|
-
|
|
176
|
-
console.log(`Iteration ${i + 1}: Updated agent config.`);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return agent;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// Usage
|
|
183
|
-
selfImproveLoop(
|
|
184
|
-
{ name: 'improving-agent', prompt: 'Initial prompt.' },
|
|
185
|
-
'Complex query here.'
|
|
186
|
-
).catch(console.error);
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
For scaling to networks of agents, integrate with concepts from [agent-networking.md](./agent-networking.md), such as peer-to-peer spawning.
|
|
190
|
-
|
|
191
|
-
## Best Practices
|
|
192
|
-
- Always backup agent configs before improvements.
|
|
193
|
-
- Use version control for agent definitions (e.g., JSON specs in `./agents/`).
|
|
194
|
-
- Monitor resource usage in loops to avoid infinite iterations.
|
|
195
|
-
- Test in isolated environments.
|
|
196
|
-
|
|
197
|
-
## Upcoming Features (v0.0.7)
|
|
198
|
-
For planned enhancements related to agent spawning, testing, and self-improvement, refer to the tasks outlined in [TODO.md](../TODO.md). This includes improvements to loop efficiency, better memory integration, and expanded tool support.
|
|
199
|
-
|
|
200
|
-
For more on agent workflows, explore related docs like [agent-networking.md](./agent-networking.md).
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
# Spawning and Managing Agents
|
|
2
|
-
|
|
3
|
-
This guide covers how to directly call agents, use the Spawn Dave workflow, and utilize Spawn Agent for creating, testing, and improving agents. It includes practical examples in Bash and JavaScript, as well as concepts for self-improvement loops. For foundational concepts on agent interactions, refer to [agent-networking.md](./agent-networking.md).
|
|
4
|
-
|
|
5
|
-
## 1. Direct Agent Calls
|
|
6
|
-
|
|
7
|
-
Direct agent calls allow you to invoke specific agents from the command line or scripts without spawning a full workflow. This is useful for quick queries or testing individual agent behaviors.
|
|
8
|
-
|
|
9
|
-
### Real Project Example: Calling GPT Agent
|
|
10
|
-
|
|
11
|
-
In the project, you can directly invoke the GPT agent using the provided script.
|
|
12
|
-
|
|
13
|
-
**JavaScript Snippet (examples/gpt_agent.js):**
|
|
14
|
-
```javascript
|
|
15
|
-
// examples/gpt_agent.js
|
|
16
|
-
const { createAgent } = require('../lib/agent-factory'); // Assuming agent factory module
|
|
17
|
-
|
|
18
|
-
async function runAgent(query) {
|
|
19
|
-
const agent = createAgent('gpt'); // Initialize GPT agent
|
|
20
|
-
const response = await agent.process(query);
|
|
21
|
-
console.log(response);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (require.main === module) {
|
|
25
|
-
const query = process.argv[2];
|
|
26
|
-
if (!query) {
|
|
27
|
-
console.error('Usage: node examples/gpt_agent.js "your query"');
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
runAgent(query).catch(console.error);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Bash Command to Run:**
|
|
35
|
-
```bash
|
|
36
|
-
node examples/gpt_agent.js "What is the capital of France?"
|
|
37
|
-
# Output: Paris (or similar GPT response)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
This is a real example from the project, enabling straightforward execution. Extend it by passing additional flags for configuration, e.g., `--model gpt-4`.
|
|
41
|
-
|
|
42
|
-
## 2. Spawn Dave Workflow
|
|
43
|
-
|
|
44
|
-
The Spawn Dave workflow (examples/spawn_dave.js) is a predefined sequence for initializing a "Dave" agent instance, which handles complex tasks like multi-step reasoning or integration with external tools.
|
|
45
|
-
|
|
46
|
-
### Overview
|
|
47
|
-
- **Purpose:** Spawn a Dave agent that can orchestrate sub-agents or workflows.
|
|
48
|
-
- **Key Features:** Tool integration, state management, and logging.
|
|
49
|
-
|
|
50
|
-
### Example: Running Spawn Dave
|
|
51
|
-
|
|
52
|
-
**JavaScript Snippet (examples/spawn_dave.js):**
|
|
53
|
-
```javascript
|
|
54
|
-
// examples/spawn_dave.js
|
|
55
|
-
const { spawnDave } = require('../workflows/spawn-dave'); // Import workflow
|
|
56
|
-
|
|
57
|
-
async function main(task) {
|
|
58
|
-
const dave = await spawnDave({
|
|
59
|
-
tools: ['web_search', 'code_executor'],
|
|
60
|
-
model: 'gpt-4'
|
|
61
|
-
});
|
|
62
|
-
const outcome = await dave.execute(task);
|
|
63
|
-
console.log('Dave's response:', outcome);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (require.main === module) {
|
|
67
|
-
const task = process.argv[2] || 'Default task: Analyze market trends.';
|
|
68
|
-
main(task).catch(console.error);
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Bash Command:**
|
|
73
|
-
```bash
|
|
74
|
-
node examples/spawn_dave.js "Summarize recent AI advancements."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
This workflow automatically handles agent lifecycle: spawn, execute, and cleanup. For networking multiple Daves, see [agent-networking.md](./agent-networking.md).
|
|
78
|
-
|
|
79
|
-
## 3. Spawn Agent (examples/spawn_agent.js or agentDave)
|
|
80
|
-
|
|
81
|
-
Spawn Agent is a utility for dynamically creating, testing, and improving agents based on outcomes. It's ideal for iterative development, where agents self-improve through workflows and tests. The entry point is `examples/spawn_agent.js`, which can be aliased as `agentDave` via the `package.json` scripts (e.g., `npm run agentDave -- create ...`).
|
|
82
|
-
|
|
83
|
-
### Core Functionality
|
|
84
|
-
- **Creating Agents:** Define agent specs (prompts, tools, models) and spawn instances.
|
|
85
|
-
- **Testing:** Run predefined tests to evaluate performance.
|
|
86
|
-
- **Improving:** Use feedback loops to refine prompts or configurations based on outcomes.
|
|
87
|
-
- **Self-Improvement Loops:** Agents can analyze their own outputs and suggest updates.
|
|
88
|
-
|
|
89
|
-
### Example: Basic Spawn and Test
|
|
90
|
-
|
|
91
|
-
**Bash Usage (via examples/spawn_agent.js or npm run agentDave):**
|
|
92
|
-
```bash
|
|
93
|
-
# Spawn a new agent for math tasks
|
|
94
|
-
node examples/spawn_agent.js create --name math-solver --tools calculator --prompt "Solve math problems step-by-step."
|
|
95
|
-
|
|
96
|
-
# Or using alias
|
|
97
|
-
npm run agentDave -- create --name math-solver --tools calculator --prompt "Solve math problems step-by-step."
|
|
98
|
-
|
|
99
|
-
# Test the agent
|
|
100
|
-
node examples/spawn_agent.js test --name math-solver --input "2+2*3" --expected 8
|
|
101
|
-
|
|
102
|
-
# Improve based on outcomes
|
|
103
|
-
node examples/spawn_agent.js improve --name math-solver --feedback "Failed on algebra; add quadratic formula."
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**JavaScript Integration (Custom Script):**
|
|
107
|
-
```javascript
|
|
108
|
-
// test-spawn.js
|
|
109
|
-
const { spawnAgent, testAgent, improveAgent } = require('../examples/spawn_agent');
|
|
110
|
-
|
|
111
|
-
async function workflow() {
|
|
112
|
-
// Create
|
|
113
|
-
const agent = await spawnAgent({
|
|
114
|
-
name: 'researcher',
|
|
115
|
-
tools: ['web_search', 'browse_page'],
|
|
116
|
-
prompt: 'Conduct thorough research on topics.'
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// Test
|
|
120
|
-
const testResult = await testAgent(agent, { query: 'Latest on quantum computing', expected: /qubits/ });
|
|
121
|
-
console.log('Test passed:', testResult.passed);
|
|
122
|
-
|
|
123
|
-
// Self-Improvement Loop
|
|
124
|
-
if (!testResult.passed) {
|
|
125
|
-
const improvements = await improveAgent(agent, testResult.feedback);
|
|
126
|
-
console.log('Suggested improvements:', improvements);
|
|
127
|
-
// Re-spawn with updates
|
|
128
|
-
const updatedAgent = await spawnAgent({ ...agent.config, prompt: improvements.newPrompt });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
workflow().catch(console.error);
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Running the Script:**
|
|
136
|
-
```bash
|
|
137
|
-
node test-spawn.js
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Self-Improvement Loops
|
|
141
|
-
Implement loops where agents evaluate their performance using tools like `test_agent.js` for testing and `memory_agent` for storing past evaluations and improvements.
|
|
142
|
-
|
|
143
|
-
1. **Execute Task:** Run agent on input.
|
|
144
|
-
2. **Evaluate Outcome:** Use `test_agent.js` to compare against benchmarks.
|
|
145
|
-
3. **Store and Generate Improvements:** Leverage `memory_agent` to recall past failures and suggest refinements.
|
|
146
|
-
4. **Update and Iterate:** Apply changes and re-test.
|
|
147
|
-
|
|
148
|
-
**Example Loop in JS (using test_agent.js and memory_agent):**
|
|
149
|
-
```javascript
|
|
150
|
-
// self-improve-loop.js
|
|
151
|
-
const { spawnAgent } = require('../examples/spawn_agent');
|
|
152
|
-
const { testAgent } = require('../examples/test_agent');
|
|
153
|
-
const { memoryAgent } = require('../lib/memory_agent'); // Assuming memory agent for evaluation storage
|
|
154
|
-
|
|
155
|
-
async function selfImproveLoop(initialConfig, task, maxIterations = 5) {
|
|
156
|
-
let agent = await spawnAgent(initialConfig);
|
|
157
|
-
const memory = memoryAgent(); // For storing evaluations
|
|
158
|
-
|
|
159
|
-
for (let i = 0; i < maxIterations; i++) {
|
|
160
|
-
const result = await agent.execute(task);
|
|
161
|
-
const testResult = await testAgent(agent, { input: task, output: result, expected: /desired pattern/ });
|
|
162
|
-
|
|
163
|
-
// Store in memory
|
|
164
|
-
await memory.store({ iteration: i, test: testResult });
|
|
165
|
-
|
|
166
|
-
if (testResult.passed) {
|
|
167
|
-
console.log('Improvement loop converged.');
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Retrieve past suggestions from memory
|
|
172
|
-
const pastFeedback = await memory.retrieve('improvements');
|
|
173
|
-
const improvements = await agent.suggestImprovements(testResult.feedback, pastFeedback);
|
|
174
|
-
agent.updateConfig(improvements);
|
|
175
|
-
|
|
176
|
-
console.log(`Iteration ${i + 1}: Updated agent config.`);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return agent;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// Usage
|
|
183
|
-
selfImproveLoop(
|
|
184
|
-
{ name: 'improving-agent', prompt: 'Initial prompt.' },
|
|
185
|
-
'Complex query here.'
|
|
186
|
-
).catch(console.error);
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
For scaling to networks of agents, integrate with concepts from [agent-networking.md](./agent-networking.md), such as peer-to-peer spawning.
|
|
190
|
-
|
|
191
|
-
## Best Practices
|
|
192
|
-
- Always backup agent configs before improvements.
|
|
193
|
-
- Use version control for agent definitions (e.g., JSON specs in `./agents/`).
|
|
194
|
-
- Monitor resource usage in loops to avoid infinite iterations.
|
|
195
|
-
- Test in isolated environments.
|
|
196
|
-
|
|
197
|
-
## Upcoming Features (v0.0.7)
|
|
198
|
-
For planned enhancements related to agent spawning, testing, and self-improvement, refer to the tasks outlined in [TODO.md](../TODO.md). This includes improvements to loop efficiency, better memory integration, and expanded tool support.
|
|
199
|
-
|
|
200
|
-
For more on agent workflows, explore related docs like [agent-networking.md](./agent-networking.md).
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
# Multi-Agent Clusters in Dave: v0.0.9
|
|
2
|
-
|
|
3
|
-
Welcome to the exciting world of **Multi-Agent Clusters** in the Dave framework! 🚀 If you're ready to scale your AI agents into powerful, collaborative clusters, you've come to the right place. This guide walks you through setting up CodeServer with PM2, spawning agents, launching in server mode, connecting clients, querying sessions, managing with PM2, testing, and more. By the end, you'll have a robust cluster humming along, enabling self-aware, interconnected agents. Let's dive in step-by-step!
|
|
4
|
-
|
|
5
|
-
Note: Dave v0.0.9 is fully ESM (ECMAScript Modules) consistent. All JavaScript examples use `import`/`export` syntax—no CommonJS `require`/`module.exports`.
|
|
6
|
-
|
|
7
|
-
## CodeServer PM2 Setup
|
|
8
|
-
|
|
9
|
-
CodeServer is the backbone of your multi-agent cluster, providing a WebSocket-based server for agent communication. It integrates seamlessly with PM2 for process management, ensuring high availability and easy scaling.
|
|
10
|
-
|
|
11
|
-
### Prerequisites
|
|
12
|
-
- Node.js (v18+ recommended)
|
|
13
|
-
- PM2 installed globally: `npm install -g pm2`
|
|
14
|
-
- Dave project cloned and dependencies installed: `npm install`
|
|
15
|
-
|
|
16
|
-
### Step-by-Step Setup
|
|
17
|
-
1. **Choose Your Launch Method**:
|
|
18
|
-
- Use the binary script: `./bin/codeDave` (convenient for quick starts).
|
|
19
|
-
- Or the shell script: `./agents/codeserver.sh` (for more customization).
|
|
20
|
-
|
|
21
|
-
2. **Default Configuration**:
|
|
22
|
-
- **Port**: 9000 (change with `--port 8080` if needed).
|
|
23
|
-
- **Secret**: "123" (for secure WebSocket connections; override with `--secret your_secret`).
|
|
24
|
-
|
|
25
|
-
3. **Launch CodeServer with PM2**:
|
|
26
|
-
Run the following to start CodeServer as a PM2-managed process:
|
|
27
|
-
```
|
|
28
|
-
pm2 start ./bin/codeDave --name "hello-dave_code_9000" -- --serve --port 9000 --secret 123
|
|
29
|
-
```
|
|
30
|
-
- `--serve`: Enables server mode (detailed below).
|
|
31
|
-
- This creates a process named `hello-dave_code_9000` for easy identification.
|
|
32
|
-
|
|
33
|
-
4. **Verify Setup**:
|
|
34
|
-
- Check PM2 status: `pm2 list` (look for `hello-dave_code_9000` in "online" status).
|
|
35
|
-
- Test connection: Use a WebSocket client to connect to `ws://127.0.0.1:9000/ws` with secret "123".
|
|
36
|
-
|
|
37
|
-
## Creating Agents via spawn_agent
|
|
38
|
-
|
|
39
|
-
Spawning agents is where the magic happens! Use the `spawn_agent` function to dynamically create and integrate new agents into your cluster. In v0.0.9, spawning is primarily via CLI for seamless integration with the ESM project structure.
|
|
40
|
-
|
|
41
|
-
### Reference to spawn_agent Blueprint
|
|
42
|
-
For a deep dive into `spawn_agent`, check the [spawn_agent blueprint](../blueprints/spawn-agent.md) (or implement based on the core Dave agent manager patterns in [agent-manager.md](./agent-manager.md)).
|
|
43
|
-
|
|
44
|
-
### Step-by-Step Agent Creation
|
|
45
|
-
1. **CLI Spawning (Recommended)**:
|
|
46
|
-
Use the `./agents/spawn_agent.js` script to spawn agents directly from the command line, attaching them to the cluster:
|
|
47
|
-
```
|
|
48
|
-
./agents/spawn_agent.js "Create weather predictor agent with prompt: You are a weather prediction agent. Use tools to fetch data." --connect ws://127.0.0.1:9000/ws --secret 123 --tools web_search,weather_api
|
|
49
|
-
```
|
|
50
|
-
- This spawns the agent (e.g., named "weatherPredictor" based on description), registers it with CodeServer, and enables collaborative querying.
|
|
51
|
-
- Flags: `--connect` for cluster attachment, `--secret` for authentication, `--tools` for tool assignment.
|
|
52
|
-
|
|
53
|
-
2. **Integration with Cluster**:
|
|
54
|
-
- Agents auto-register with CodeServer upon spawn via the CLI.
|
|
55
|
-
- For programmatic control in ESM scripts, import and use as shown in examples below.
|
|
56
|
-
|
|
57
|
-
## Launching Server Mode (--serve)
|
|
58
|
-
|
|
59
|
-
Server mode turns CodeServer into a persistent hub for multi-agent interactions.
|
|
60
|
-
|
|
61
|
-
1. **Command**:
|
|
62
|
-
```
|
|
63
|
-
./bin/codeDave --serve --port 9000 --secret 123
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
2. **What Happens**:
|
|
67
|
-
- Listens on WebSocket endpoint `/ws`.
|
|
68
|
-
- Handles agent registrations and session management.
|
|
69
|
-
- Supports multiple concurrent clients.
|
|
70
|
-
|
|
71
|
-
3. **PM2 Integration**:
|
|
72
|
-
As shown in setup, wrap it in PM2 for daemonization and auto-restart.
|
|
73
|
-
|
|
74
|
-
## Attaching Clients (--connect)
|
|
75
|
-
|
|
76
|
-
Clients (like other Dave instances or tools) connect to the cluster for tool calls and session sharing.
|
|
77
|
-
|
|
78
|
-
1. **Basic Connection**:
|
|
79
|
-
```
|
|
80
|
-
./bin/dave.js --connect ws://127.0.0.1:9000/ws --secret 123
|
|
81
|
-
```
|
|
82
|
-
- This attaches the client as a tool-calling endpoint.
|
|
83
|
-
- Use in scripts for agent-to-agent communication.
|
|
84
|
-
|
|
85
|
-
2. **Advanced Usage**:
|
|
86
|
-
- Pipe inputs: `echo "query" | ./bin/dave.js --connect ...`
|
|
87
|
-
- Handle toolcalls: Clients receive and execute tools on behalf of the cluster.
|
|
88
|
-
|
|
89
|
-
## Querying via bin/dave.js --connect
|
|
90
|
-
|
|
91
|
-
For one-shot queries or building sessions, use `bin/dave.js` with connection flags.
|
|
92
|
-
|
|
93
|
-
### One-Shot Example
|
|
94
|
-
Predict weather with a quick query:
|
|
95
|
-
```
|
|
96
|
-
echo "predict weather in NYC" | ./bin/dave.js --connect ws://127.0.0.1:9000/ws --secret 123
|
|
97
|
-
```
|
|
98
|
-
- Builds a temporary session, routes to relevant agents (e.g., weatherPredictor), and returns results.
|
|
99
|
-
|
|
100
|
-
### Session Building
|
|
101
|
-
For persistent sessions:
|
|
102
|
-
```
|
|
103
|
-
./bin/dave.js --connect ws://127.0.0.1:9000/ws --secret 123 --session my_weather_session
|
|
104
|
-
```
|
|
105
|
-
- Follow with queries to maintain state across interactions.
|
|
106
|
-
|
|
107
|
-
## PM2 Start/Stop/Reload
|
|
108
|
-
|
|
109
|
-
PM2 makes cluster management a breeze!
|
|
110
|
-
|
|
111
|
-
1. **List Processes**:
|
|
112
|
-
```
|
|
113
|
-
pm2 list
|
|
114
|
-
```
|
|
115
|
-
- Shows status of `hello-dave_code_9000` and other agents.
|
|
116
|
-
|
|
117
|
-
2. **Start/Stop**:
|
|
118
|
-
```
|
|
119
|
-
pm2 start hello-dave_code_9000 # Start
|
|
120
|
-
pm2 stop hello-dave_code_9000 # Stop
|
|
121
|
-
pm2 restart hello-dave_code_9000 # Restart
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
3. **Reload (Zero-Downtime)**:
|
|
125
|
-
```
|
|
126
|
-
pm2 reload hello-dave_code_9000
|
|
127
|
-
```
|
|
128
|
-
- Ideal for updates without interrupting sessions.
|
|
129
|
-
|
|
130
|
-
4. **Logs and Monitoring**:
|
|
131
|
-
```
|
|
132
|
-
pm2 logs hello-dave_code_9000
|
|
133
|
-
pm2 monit
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Testing One-Shots and Sessions
|
|
137
|
-
|
|
138
|
-
Ensure your cluster is rock-solid with these tests.
|
|
139
|
-
|
|
140
|
-
### One-Shot Testing
|
|
141
|
-
1. Spawn a test agent.
|
|
142
|
-
2. Run: `echo "test query" | ./bin/dave.js --connect ...`
|
|
143
|
-
3. Verify output matches expected (e.g., no errors, relevant response).
|
|
144
|
-
|
|
145
|
-
### Session Testing
|
|
146
|
-
1. Start a session: `./bin/dave.js --connect ... --session test`
|
|
147
|
-
2. Send multiple queries: `echo "first" | ...` then `echo "follow-up" | ...`
|
|
148
|
-
3. Check session persistence (e.g., context retained).
|
|
149
|
-
|
|
150
|
-
### End-to-End Test Script
|
|
151
|
-
```bash
|
|
152
|
-
#!/bin/bash
|
|
153
|
-
# test_cluster.sh
|
|
154
|
-
pm2 start ./bin/codeDave --name "test_code" -- --serve --port 9000 --secret 123
|
|
155
|
-
sleep 2
|
|
156
|
-
echo "Hello cluster!" | ./bin/dave.js --connect ws://127.0.0.1:9000/ws --secret 123
|
|
157
|
-
pm2 stop test_code
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Self-Awareness: Detecting PM2/CodeServer in Prompts
|
|
161
|
-
|
|
162
|
-
Make your agents smarter by embedding cluster awareness! In v0.0.9, self-awareness leverages argument detection and initial PM2 inspection for accurate blueprint compliance.
|
|
163
|
-
|
|
164
|
-
- **In Agent Prompts**:
|
|
165
|
-
Include detection logic: "If running under PM2/CodeServer (detect via args like --serve/--connect or initial `pm2 list` inspect), coordinate with cluster agents."
|
|
166
|
-
|
|
167
|
-
- **Implementation** (ESM Syntax):
|
|
168
|
-
Agents auto-detect via argument parsing and PM2 inspection:
|
|
169
|
-
```javascript
|
|
170
|
-
import { execSync } from 'child_process';
|
|
171
|
-
import { process } from 'process'; // Built-in
|
|
172
|
-
|
|
173
|
-
const args = process.argv.slice(2);
|
|
174
|
-
const isServeMode = args.includes('--serve');
|
|
175
|
-
const isConnectMode = args.includes('--connect');
|
|
176
|
-
const pm2Status = execSync('pm2 list', { encoding: 'utf8' }).includes('hello-dave_code_9000');
|
|
177
|
-
|
|
178
|
-
if (isServeMode || isConnectMode || pm2Status) {
|
|
179
|
-
// Cluster mode: Share context, route to other agents
|
|
180
|
-
console.log('Detected cluster environment');
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
This enables self-aware routing, e.g., "Delegate weather query to weatherPredictor in cluster." Aligns with blueprint by inspecting PM2 initially for process awareness.
|
|
184
|
-
|
|
185
|
-
## Mermaid Diagram: Cluster Architecture
|
|
186
|
-
|
|
187
|
-
Visualize your setup!
|
|
188
|
-
|
|
189
|
-
```mermaid
|
|
190
|
-
graph TD
|
|
191
|
-
A[PM2 Manager] --> B[CodeServer<br/>Port 9000 /ws]
|
|
192
|
-
B --> C[Agent 1<br/>spawn_agent()]
|
|
193
|
-
B --> D[Agent 2<br/>e.g., WeatherPredictor]
|
|
194
|
-
E[Client / bin/dave.js] -->|connect| B
|
|
195
|
-
E -->|one-shot| F[Session Builder]
|
|
196
|
-
G[Tools: web_search, etc.] <-->|toolcalls| C
|
|
197
|
-
G <-->|toolcalls| D
|
|
198
|
-
style B fill:#f9f,stroke:#333,stroke-width:2px
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
- **Nodes**: PM2 oversees CodeServer, which hubs agents and clients.
|
|
202
|
-
- **Flows**: Connections for spawning, querying, and tool execution.
|
|
203
|
-
|
|
204
|
-
## Examples
|
|
205
|
-
|
|
206
|
-
### Full ESM Node Script for Custom Agent Launch (--serve)
|
|
207
|
-
Here's a complete ESM script (`custom-agent-launch.mjs`) to spawn and launch a custom agent in server mode:
|
|
208
|
-
|
|
209
|
-
```javascript
|
|
210
|
-
#!/usr/bin/env node
|
|
211
|
-
// custom-agent-launch.mjs - ESM for v0.0.9
|
|
212
|
-
|
|
213
|
-
import { spawn_agent } from './agents/spawn.js'; // ESM import
|
|
214
|
-
import { connectToCluster } from './utils/cluster.js'; // Hypothetical utility
|
|
215
|
-
|
|
216
|
-
async function main() {
|
|
217
|
-
const agentConfig = {
|
|
218
|
-
name: "queryMaster",
|
|
219
|
-
prompt: "You are a master query router in the cluster.",
|
|
220
|
-
tools: ['web_search'],
|
|
221
|
-
cluster: "ws://127.0.0.1:9000/ws"
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
// Spawn the agent
|
|
225
|
-
const agent = await spawn_agent(agentConfig);
|
|
226
|
-
|
|
227
|
-
// Connect to cluster if in server mode
|
|
228
|
-
if (process.argv.includes('--serve')) {
|
|
229
|
-
await connectToCluster(agent, { secret: "123" });
|
|
230
|
-
console.log('Agent launched in server mode!");
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
main().catch(console.error);
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Run it: `node custom-agent-launch.mjs --serve`
|
|
238
|
-
|
|
239
|
-
### Full Cluster Spawn and Query (CLI + ESM)
|
|
240
|
-
1. Start CodeServer: `pm2 start ./bin/codeDave --name code_9000 -- --serve --port 9000 --secret 123`
|
|
241
|
-
2. Spawn Agent (CLI):
|
|
242
|
-
```
|
|
243
|
-
./agents/spawn_agent.js "Create queryMaster: You are a master query router." --connect ws://127.0.0.1:9000/ws --secret 123
|
|
244
|
-
```
|
|
245
|
-
3. Query: `echo "What's the plan?" | ./bin/dave.js --connect ws://127.0.0.1:9000/ws --secret 123`
|
|
246
|
-
|
|
247
|
-
### Multi-Agent Collaboration
|
|
248
|
-
- Spawn multiple: weather, news, summary agents.
|
|
249
|
-
- Query: "Summarize today's news and weather" → Routes to respective agents via cluster.
|
|
250
|
-
|
|
251
|
-
## Troubleshooting
|
|
252
|
-
|
|
253
|
-
- **Connection Refused**: Ensure CodeServer is running (`pm2 list`) and port 9000 is free (`lsof -i :9000`).
|
|
254
|
-
- **Secret Mismatch**: Double-check `--secret` flags match.
|
|
255
|
-
- **PM2 Crashes**: View logs (`pm2 logs`)—common issues: missing deps or port conflicts. Restart: `pm2 restart all`.
|
|
256
|
-
- **Agent Not Attaching**: Verify `spawn_agent` cluster URL and secret. Test WebSocket manually.
|
|
257
|
-
- **Session Loss**: Check PM2 memory limits (`pm2 desc code_9000`); increase if needed.
|
|
258
|
-
- **One-Shot Fails**: Ensure input is piped correctly; debug with `--verbose`.
|
|
259
|
-
- **ESM Import Errors**: Ensure `package.json` has "type": "module" and files use `.mjs` or `.js` with ESM syntax.
|
|
260
|
-
|
|
261
|
-
If issues persist, reference [project-overview.md](./project-overview.md) or spawn a debug agent!
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
*Ready for v0.0.9 deployment! Cluster up and conquer those multi-agent challenges. 🎉 Questions? Ping the Dave community.*
|