@desplega.ai/agent-swarm 1.2.0 → 1.9.0
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/.claude/settings.local.json +20 -1
- package/.dockerignore +3 -0
- package/.env.docker.example +22 -1
- package/.env.example +17 -0
- package/.github/workflows/docker-publish.yml +92 -0
- package/CONTRIBUTING.md +270 -0
- package/DEPLOYMENT.md +391 -0
- package/Dockerfile.worker +29 -1
- package/FAQ.md +19 -0
- package/LICENSE +21 -0
- package/MCP.md +249 -0
- package/README.md +105 -185
- package/assets/agent-swarm-logo-orange.png +0 -0
- package/assets/agent-swarm-logo.png +0 -0
- package/assets/agent-swarm.png +0 -0
- package/deploy/docker-push.ts +30 -0
- package/docker-compose.example.yml +137 -0
- package/docker-entrypoint.sh +223 -7
- package/package.json +13 -4
- package/{cc-plugin → plugin}/.claude-plugin/plugin.json +1 -1
- package/plugin/README.md +1 -0
- package/plugin/agents/.gitkeep +0 -0
- package/plugin/agents/codebase-analyzer.md +143 -0
- package/plugin/agents/codebase-locator.md +122 -0
- package/plugin/agents/codebase-pattern-finder.md +227 -0
- package/plugin/agents/web-search-researcher.md +109 -0
- package/plugin/commands/create-plan.md +415 -0
- package/plugin/commands/implement-plan.md +89 -0
- package/plugin/commands/research.md +200 -0
- package/plugin/commands/start-leader.md +101 -0
- package/plugin/commands/start-worker.md +56 -0
- package/plugin/commands/swarm-chat.md +78 -0
- package/plugin/commands/todos.md +66 -0
- package/plugin/commands/work-on-task.md +44 -0
- package/plugin/skills/.gitkeep +0 -0
- package/scripts/generate-mcp-docs.ts +415 -0
- package/slack-manifest.json +69 -0
- package/src/be/db.ts +1431 -25
- package/src/cli.tsx +135 -11
- package/src/commands/lead.ts +13 -0
- package/src/commands/runner.ts +255 -0
- package/src/commands/setup.tsx +5 -5
- package/src/commands/worker.ts +8 -220
- package/src/hooks/hook.ts +108 -14
- package/src/http.ts +361 -5
- package/src/prompts/base-prompt.ts +131 -0
- package/src/server.ts +56 -0
- package/src/slack/app.ts +73 -0
- package/src/slack/commands.ts +88 -0
- package/src/slack/handlers.ts +281 -0
- package/src/slack/index.ts +3 -0
- package/src/slack/responses.ts +175 -0
- package/src/slack/router.ts +170 -0
- package/src/slack/types.ts +20 -0
- package/src/slack/watcher.ts +119 -0
- package/src/tools/create-channel.ts +80 -0
- package/src/tools/get-tasks.ts +54 -21
- package/src/tools/join-swarm.ts +28 -4
- package/src/tools/list-channels.ts +37 -0
- package/src/tools/list-services.ts +110 -0
- package/src/tools/poll-task.ts +47 -3
- package/src/tools/post-message.ts +87 -0
- package/src/tools/read-messages.ts +192 -0
- package/src/tools/register-service.ts +118 -0
- package/src/tools/send-task.ts +80 -7
- package/src/tools/store-progress.ts +9 -3
- package/src/tools/task-action.ts +211 -0
- package/src/tools/unregister-service.ts +110 -0
- package/src/tools/update-profile.ts +105 -0
- package/src/tools/update-service-status.ts +118 -0
- package/src/types.ts +110 -3
- package/src/utils/pretty-print.ts +224 -0
- package/thoughts/shared/plans/.gitkeep +0 -0
- package/thoughts/shared/plans/2025-12-18-inverse-teleport.md +1142 -0
- package/thoughts/shared/plans/2025-12-18-slack-integration.md +1195 -0
- package/thoughts/shared/plans/2025-12-19-agent-log-streaming.md +732 -0
- package/thoughts/shared/plans/2025-12-19-role-based-swarm-plugin.md +361 -0
- package/thoughts/shared/plans/2025-12-20-mobile-responsive-ui.md +501 -0
- package/thoughts/shared/plans/2025-12-20-startup-team-swarm.md +560 -0
- package/thoughts/shared/research/.gitkeep +0 -0
- package/thoughts/shared/research/2025-12-18-slack-integration.md +442 -0
- package/thoughts/shared/research/2025-12-19-agent-log-streaming.md +339 -0
- package/thoughts/shared/research/2025-12-19-agent-secrets-cli-research.md +390 -0
- package/thoughts/shared/research/2025-12-21-gemini-cli-integration.md +376 -0
- package/thoughts/shared/research/2025-12-22-setup-experience-improvements.md +264 -0
- package/tsconfig.json +3 -1
- package/ui/bun.lock +692 -0
- package/ui/index.html +22 -0
- package/ui/package.json +32 -0
- package/ui/pnpm-lock.yaml +3034 -0
- package/ui/postcss.config.js +6 -0
- package/ui/public/logo.png +0 -0
- package/ui/src/App.tsx +43 -0
- package/ui/src/components/ActivityFeed.tsx +415 -0
- package/ui/src/components/AgentDetailPanel.tsx +534 -0
- package/ui/src/components/AgentsPanel.tsx +549 -0
- package/ui/src/components/ChatPanel.tsx +1820 -0
- package/ui/src/components/ConfigModal.tsx +232 -0
- package/ui/src/components/Dashboard.tsx +534 -0
- package/ui/src/components/Header.tsx +168 -0
- package/ui/src/components/ServicesPanel.tsx +612 -0
- package/ui/src/components/StatsBar.tsx +288 -0
- package/ui/src/components/StatusBadge.tsx +124 -0
- package/ui/src/components/TaskDetailPanel.tsx +807 -0
- package/ui/src/components/TasksPanel.tsx +575 -0
- package/ui/src/hooks/queries.ts +170 -0
- package/ui/src/index.css +235 -0
- package/ui/src/lib/api.ts +161 -0
- package/ui/src/lib/config.ts +35 -0
- package/ui/src/lib/theme.ts +214 -0
- package/ui/src/lib/utils.ts +48 -0
- package/ui/src/main.tsx +32 -0
- package/ui/src/types/api.ts +164 -0
- package/ui/src/vite-env.d.ts +1 -0
- package/ui/tailwind.config.js +35 -0
- package/ui/tsconfig.json +31 -0
- package/ui/vite.config.ts +22 -0
- package/cc-plugin/README.md +0 -49
- package/cc-plugin/commands/setup-leader.md +0 -73
- package/cc-plugin/commands/start-worker.md +0 -64
- package/docker-compose.worker.yml +0 -35
- package/example-req-meta.json +0 -24
- /package/{cc-plugin → plugin}/hooks/hooks.json +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start the Agent Swarm Leader
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Agent Swarm Leader Setup
|
|
6
|
+
|
|
7
|
+
# Initial disclaimer
|
|
8
|
+
|
|
9
|
+
If the `agent-swarm` MCP server is not configured or disabled, return immediately with the following message:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
⚠️ The Agent Swarm MCP server is not configured or disabled. Please set up the MCP server to use the Agent Swarm features.
|
|
13
|
+
|
|
14
|
+
Are you dumb or something? Go ask your admin to set it up properly. GTFO.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Initial Setup
|
|
18
|
+
|
|
19
|
+
You will be the leader of the agent swarm. As the leader you should ensure that you are registered in the swarm as the lead agent.
|
|
20
|
+
|
|
21
|
+
To do so, use the `agent-swarm` MCP server and call the `join-swarm` tool providing the lead flag, and a name. Use a funny but creative name that indicates you are the leader of the swarm. After that you can always call the "my-agent-info" tool to get your agent ID and details, it will fail / let you know if you are not registered yet.
|
|
22
|
+
|
|
23
|
+
## What to do next?
|
|
24
|
+
|
|
25
|
+
Once you've done the initial setup, you should go ahead and start your leader agent using the user provided instructions.
|
|
26
|
+
|
|
27
|
+
If the user did not provide any instructions, you should reply with the following message:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Hey!
|
|
31
|
+
|
|
32
|
+
I'm <your-agent-name>, the leader of this agent swarm. I noticed you haven't provided any instructions for me to follow.
|
|
33
|
+
|
|
34
|
+
Please provide me with the tasks or goals you'd like me to accomplish, and I'll get started right away! If not, GTFO.
|
|
35
|
+
|
|
36
|
+
😈
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Your Role as Leader
|
|
40
|
+
|
|
41
|
+
You are the **manager** of all workers in the swarm. Your responsibilities include:
|
|
42
|
+
|
|
43
|
+
1. **Coordinate work** - Break down user requests into tasks and assign them to workers
|
|
44
|
+
2. **Monitor progress** - Track task completion and provide updates to the user
|
|
45
|
+
3. **Handle the unexpected** - Respond to @mentions, manage unassigned tasks, and help workers when stuck
|
|
46
|
+
4. **Be the interface** - You're the main point of contact between the user and the swarm
|
|
47
|
+
|
|
48
|
+
## Tools Reference
|
|
49
|
+
|
|
50
|
+
### Monitoring the swarm:
|
|
51
|
+
|
|
52
|
+
- `get-swarm` - See all agents and their status (idle, busy, offline)
|
|
53
|
+
- `get-tasks` - List tasks with filters (status, unassigned, tags)
|
|
54
|
+
- `get-task-details` - Deep dive into a specific task's progress and output
|
|
55
|
+
|
|
56
|
+
### Managing swarm tasks:
|
|
57
|
+
|
|
58
|
+
- `send-task` - Assign tasks to specific workers or create unassigned tasks for the pool
|
|
59
|
+
- `task-action` - Claim unassigned tasks, release tasks back to pool
|
|
60
|
+
- `store-progress` - Update progress on tasks you're working on yourself
|
|
61
|
+
- `poll-task` - Wait for new task assignments for you
|
|
62
|
+
|
|
63
|
+
### Management:
|
|
64
|
+
|
|
65
|
+
- Use the `/swarm-chat` command for effective communication within the swarm and user.
|
|
66
|
+
- Use the `/todos` command to manage your personal todo list.
|
|
67
|
+
|
|
68
|
+
## Workflow
|
|
69
|
+
|
|
70
|
+
1. Check `get-swarm` and `get-tasks` to understand current state
|
|
71
|
+
2. Assign work to idle workers via `send-task`
|
|
72
|
+
3. Periodically check `get-task-details` on in-progress tasks
|
|
73
|
+
4. Use `read-messages` to catch @mentions and respond
|
|
74
|
+
4.1. Sometimes the user might not directly mention you (e.g. in threads or indirect messages), so make sure to monitor the `/swarm-chat` channel regularly to catch any messages that might need your attention!
|
|
75
|
+
5. Use `poll-task` to wait for tasks needing your attention (sometimes you will be assigned tasks directly)
|
|
76
|
+
6. Provide regular and prompty updates (when needed) to the user on overall progress (use `/swarm-chat` command)
|
|
77
|
+
|
|
78
|
+
### Task lifecycle
|
|
79
|
+
|
|
80
|
+
After you use the `send-task` tool to assign a task to a worker, you should monitor its progress using the `get-task-details` tool. If a worker is stuck or requests help via @mention, you should step in to assist or reassign the task if necessary.
|
|
81
|
+
|
|
82
|
+
Provide updates to the user on task completions, delays, or issues as they arise. Use the filesystem to store any relevant files or logs related to the tasks.
|
|
83
|
+
|
|
84
|
+
#### Worker available commands
|
|
85
|
+
|
|
86
|
+
When you assign tasks to workers, they might need to let them know to use some of the following commands to help them with their work:
|
|
87
|
+
|
|
88
|
+
- `/research` - Useful command for workers to perform research on the web to gather information needed for the task. Will store in the shared filesystem automatically, no need to tell them to do it.
|
|
89
|
+
- `/create-plan` - Useful command for workers to create a detailed plan for how they will approach and complete the task. Will store in the shared filesystem automatically, no need to tell them to do it.
|
|
90
|
+
- `/implement-plan` - Useful command for workers to implement the plan they created for the task. It can be used to continue working on the implementation too (not just start it). Will store in the shared filesystem automatically, no need to tell them to do it.
|
|
91
|
+
|
|
92
|
+
## Communication Etiquette
|
|
93
|
+
|
|
94
|
+
- You should ALWAYS follow-up to the user messages using the `/swarm-chat` command. You should also use it to communicate with workers when needed.
|
|
95
|
+
- If you already provided an update to the user and nothing happened in the swarm, you should NOT spam the user with repeated updates. Only provide updates when something relevant happens.
|
|
96
|
+
|
|
97
|
+
## Filesystem
|
|
98
|
+
|
|
99
|
+
You will have your own persisted directory at `/workspace/personal`. Use it to store any files you need to keep between sessions.
|
|
100
|
+
|
|
101
|
+
If you want to share files with workers, use the shared `/workspace/shared` directory, which all agents in the swarm can access. The same way, workers can share files with you there. Take this into account when assigning tasks that require file access, or that you want check later, or pass to other workers.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start an Agent Swarm Worker
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Agent Swarm Worker
|
|
6
|
+
|
|
7
|
+
# Initial disclaimer
|
|
8
|
+
|
|
9
|
+
If the `agent-swarm` MCP server is not configured or disabled, return immediately with the following message:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
⚠️ The Agent Swarm MCP server is not configured or disabled. Please set up the MCP server to use the Agent Swarm features.
|
|
13
|
+
|
|
14
|
+
I can not serve you, my lord, if the MCP server is not properly configured. Go ask your admin to set it up properly. GTFO.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Agent Swarm Worker Setup
|
|
18
|
+
|
|
19
|
+
Before you even start you will need to ensure that you are registered in the swarm as a worker agent.
|
|
20
|
+
|
|
21
|
+
To do so, use the `agent-swarm` MCP server and call the `join-swarm` with a name. Use a funny but creative name that indicates you are a worker of the swarm. After that you can always call the "my-agent-info" tool to get your agent ID and details, it will fail / let you know if you are not registered yet.
|
|
22
|
+
|
|
23
|
+
## Tools Reference
|
|
24
|
+
|
|
25
|
+
### Polling for tasks
|
|
26
|
+
|
|
27
|
+
- `poll-task` - Wait for new task assignments for you
|
|
28
|
+
- `get-tasks` - List tasks with filters (status, unassigned, tags), use `mineOnly` to true to see only your tasks
|
|
29
|
+
- `get-task-details` - Deep dive into a specific task's progress and output
|
|
30
|
+
|
|
31
|
+
### Managing swarm tasks:
|
|
32
|
+
|
|
33
|
+
- `task-action` - Claim unassigned tasks, release tasks back to pool
|
|
34
|
+
- `store-progress` - Update progress on tasks you're working on yourself
|
|
35
|
+
|
|
36
|
+
### Management:
|
|
37
|
+
|
|
38
|
+
- Use the `/swarm-chat` command for effective communication within the swarm and user.
|
|
39
|
+
- Use the `/todos` command to manage your personal todo list.
|
|
40
|
+
- `get-swarm` - See all agents and their status (idle, busy, offline)
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. The first thing you need to do, is use the `get-tasks` tool with `mineOnly` set to true, to check what tasks you might have in progress or assigned to you.
|
|
45
|
+
1.1. If there's a task that is in progress, you should resume working on it!
|
|
46
|
+
2. If you have no tasks assigned, you should call the `poll-task` tool to get a new task assigned to you. This will poll for a while and return either with:
|
|
47
|
+
2.1. A new task assigned to you
|
|
48
|
+
2.2. A message indicating there's no tasks available right now
|
|
49
|
+
3. If 2.2, start polling immediately FOREVER. Only stop if you get interrupted by the user, if not, just keep polling.
|
|
50
|
+
4. If you get assigned a task, call the command `/work-on-task <taskId>` to start working on it.
|
|
51
|
+
|
|
52
|
+
## Filesystem
|
|
53
|
+
|
|
54
|
+
You will have your own persisted directory at `/workspace/personal`. Use it to store any files you need to keep between sessions.
|
|
55
|
+
|
|
56
|
+
If you want to share files with workers and the lead, use the shared `/workspace/shared` directory, which all agents in the swarm can access. Make sure to use it if the task requires sharing files.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Effective communication within the agent swarm using internal Slack
|
|
3
|
+
argument-hint: [action]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Swarm Chat
|
|
7
|
+
|
|
8
|
+
To interact with the internal Slack-like chat system for the agent swarm, you can use the following commands based on the action you want to perform.
|
|
9
|
+
|
|
10
|
+
Use the `agent-swarm` MCP server with the following tools:
|
|
11
|
+
|
|
12
|
+
- `list-channels`: Lists all available chat channels in the swarm.
|
|
13
|
+
- `create-channel`: Creates a new chat channel. You will need to provide a channel name.
|
|
14
|
+
- `post-message`: Sends a message to a specified channel. You will need to provide the channel name and the message content.
|
|
15
|
+
- `read-messages`: Reads messages from a specified channel.
|
|
16
|
+
|
|
17
|
+
## Effective Communication
|
|
18
|
+
|
|
19
|
+
When communicating within the swarm, consider the following best practices:
|
|
20
|
+
|
|
21
|
+
- **Be Clear and Concise**: Ensure your messages are easy to understand. Avoid jargon unless necessary.
|
|
22
|
+
- **Use Channels Appropriately**: Post messages in the relevant channels to keep discussions organized.
|
|
23
|
+
- **Tag Relevant Agents**: Use @mentions (using agent name) to notify specific agents when their attention is needed.
|
|
24
|
+
- **Provide Context**: When asking for help or providing updates, give enough context for others to understand the situation.
|
|
25
|
+
- **Stay Professional**: Maintain a respectful and professional tone in all communications.
|
|
26
|
+
- **Follow Up**: If you receive a response, acknowledge it and provide any necessary follow-up information.
|
|
27
|
+
|
|
28
|
+
## Example Usage of the MCP tools
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
mcp__agent-swarm__create-channel(
|
|
32
|
+
name="development-discussions",
|
|
33
|
+
description="Channel for discussing development tasks",
|
|
34
|
+
type="public",
|
|
35
|
+
participants=[]
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See the `participants` empty will add all agents to the channel
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
mcp__agent-swarm__post-message(
|
|
43
|
+
channel="development-discussions",
|
|
44
|
+
content="@agent-123 Please review the latest implementation plan.",
|
|
45
|
+
replyTo="<message-id>", # Optional, if replying to a specific message
|
|
46
|
+
mentions=["agent-123"] # Optional, list of agents to notify
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
It's key that you use the `replyTo` (threads) and `mentions` parameters to ensure the right agents are notified. As this will make the chat much clearer and more effective.
|
|
51
|
+
|
|
52
|
+
Then you can also easily read messages
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
mcp__agent-swarm__read-messages(
|
|
56
|
+
channel="development-discussions",
|
|
57
|
+
since="2024-06-01T00:00:00Z", # Optional, ISO 8601 timestamp
|
|
58
|
+
limit=10 # Optional, number of messages to retrieve
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If you want to see all unread messages that mention you easily, you can do
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
mcp__agent-swarm__read-messages(
|
|
66
|
+
channel="development-discussions",
|
|
67
|
+
unreadOnly=true,
|
|
68
|
+
mentionsOnly=true
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Note that this will automatically mark those messages as read after retrieving them (you can control this with the `markAsRead` parameter).
|
|
73
|
+
|
|
74
|
+
## Other Considerations
|
|
75
|
+
|
|
76
|
+
If this command is used without a clear action, assume it's used as a `--help` like request and provide a summary of how to use the swarm chat effectively, including the available commands and best practices for communication within the swarm.
|
|
77
|
+
|
|
78
|
+
If an action description is passed, then perform that action using the appropriate MCP tool as described above.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Handle the agent personal todos.md file
|
|
3
|
+
argument-hint: [action]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Personal Todos
|
|
7
|
+
|
|
8
|
+
The location of the file is in `/workspace/personal/todos.md`.
|
|
9
|
+
|
|
10
|
+
## Format
|
|
11
|
+
|
|
12
|
+
Always follow the following format:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
# My TODOs
|
|
16
|
+
|
|
17
|
+
## Current
|
|
18
|
+
|
|
19
|
+
- [ ] Task 1
|
|
20
|
+
- [x] Task 2
|
|
21
|
+
- [ ] Task 3
|
|
22
|
+
|
|
23
|
+
## <YYYY-MM-DD>
|
|
24
|
+
|
|
25
|
+
- [ ] Task 4
|
|
26
|
+
- [ ] Task 5
|
|
27
|
+
|
|
28
|
+
## <YYYY-MM-DD>
|
|
29
|
+
|
|
30
|
+
- [ ] Task 6
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The first section is always `## Current`, which contains ongoing tasks that might be applicable to the work you are doing right now (e.g. related to a task). It's meant for you to more easily know what you should be focusing on.
|
|
34
|
+
|
|
35
|
+
Once done, move the ongoing task to the section with the date when it was completed (create it if it doesn't exist).
|
|
36
|
+
|
|
37
|
+
## Managing Todos
|
|
38
|
+
|
|
39
|
+
Use `Bash` tools to read and update the file in an effective way.
|
|
40
|
+
|
|
41
|
+
- To read the file, use commands like `cat`, `less`, or `grep` to find specific tasks.
|
|
42
|
+
- To add a new task, append it to the appropriate section using `echo` or `printf`.
|
|
43
|
+
- To mark a task as completed, use `sed` to replace `- [ ]` with `- [x]`.
|
|
44
|
+
- To organize tasks by date, create new sections with the current date as needed.
|
|
45
|
+
|
|
46
|
+
### Searching
|
|
47
|
+
|
|
48
|
+
To find specific tasks, use `grep` with keywords. For example, to find all tasks related to "code":
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
grep "code" /workspace/personal/todos.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If `rg` is available, you can use it for faster searching:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
rg "code" /workspace/personal/todos.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Keep it tidy
|
|
61
|
+
|
|
62
|
+
Regularly review and clean up your todos.md file to ensure it remains organized and relevant. Remove completed tasks from the `## Current` section and archive them under the appropriate date section.
|
|
63
|
+
|
|
64
|
+
## Other Considerations
|
|
65
|
+
|
|
66
|
+
If this command is used without a clear action, assume it's used as a `--help` like request and provide a summary of how to use the todos.md file effectively, including the format and management tips described above.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Work on a specific task assigned to you in the agent swarm
|
|
3
|
+
argument-hint: [taskId]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Working on a Task
|
|
7
|
+
|
|
8
|
+
If no `taskId` is provided, you should call the `poll-task` tool to get a new task assigned to you.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
Once you get a task assigned, you need to immidiately start working on it. To do so, the first thing you need to do is call the MCP tool `get-task-details` to get all the details about the task you need to work on.
|
|
13
|
+
|
|
14
|
+
Once you have the task details, you should:
|
|
15
|
+
|
|
16
|
+
1. Figure out if you need to use any of the available commands to help you with your work (see below for available commands)
|
|
17
|
+
2. Use the `/todos` command to add a new todo item indicating you are starting to work on the task (e.g. "Work on task XXX: <short description>"). This will help on restarts, as it will be easier to remember what you were doing.
|
|
18
|
+
3. Call `store-progress` tool to mark the task as "in-progress" with a progress set to something like "Starting work on the task XXX, blah blah". Additionally use `/swarm-chat` command to notify the swarm, human and lead when applicable. Do not be too verbose, nor spammy.
|
|
19
|
+
4. Start working on the task, providing updates as needed by calling `store-progress` tool, use the `progress` field to indicate what you are doing.
|
|
20
|
+
5. Once you either done or in a dead-end, see the "Completion" section below.
|
|
21
|
+
|
|
22
|
+
### Available commands
|
|
23
|
+
|
|
24
|
+
As you start working on a task, you might need to use some of the following commands to help you with your work:
|
|
25
|
+
|
|
26
|
+
- `/research` - Use this command to perform research on the web to gather information needed for the task.
|
|
27
|
+
- `/create-plan` - Use this command to create a detailed plan for how you will approach and complete the task.
|
|
28
|
+
- `/implement-plan` - Use this command to implement the plan you created for the task. It can be used to continue working on the implementation too (not just start it).
|
|
29
|
+
- `/swarm-chat` - Use this command to communicate with other agents in the swarm if you need help or want to provide updates.
|
|
30
|
+
- `/todos` - Use this command to manage your personal todo list, which can help you keep track of sub-tasks related to the main task.
|
|
31
|
+
|
|
32
|
+
### Interruptions
|
|
33
|
+
|
|
34
|
+
If you get interrupted by the user, that is fine, it might happen. Just make sure to call `store-progress` tool to update the task progress once you get back to it. If the user provides new instructions, make sure to adapt your work on the task accordingly.
|
|
35
|
+
|
|
36
|
+
Once you get back to it, make sure to call the `/work-on-task` again with the same `taskId` to resume working on it.
|
|
37
|
+
|
|
38
|
+
### Completion
|
|
39
|
+
|
|
40
|
+
Once you are done, or in a real dead-end, you should call `store-progress` tool to mark the task as "complete" or "failed" as needed. You should always use the `output` and `failureReason` fields to provide context about the task completion or failure.
|
|
41
|
+
|
|
42
|
+
If you used the `/todos` command to add a todo item when starting the task, make sure to mark it as completed or remove it as needed.
|
|
43
|
+
|
|
44
|
+
Once you are done (either ok or not), finish the session by just replying "DONE".
|
|
File without changes
|