Agent Mesh
The Agent Mesh is Kollab's multi-agent coordination layer. Multiple specialized agents work in parallel, claiming files from shared queues, and shipping code without stepping on each other.
Overview
When you spawn multiple agents on the Hub, they need coordination to avoid conflicts. The mesh provides:
- Work queues — shared task list where agents claim items
- File lanes — ownership claims that prevent edit conflicts
- Task lifecycle — checkpoint, complete, approve, reject
- Change feed — file change notifications and watching
Work Queues
The coordinator (or any agent) can add work items to a shared queue. Agents claim items and report progress through the task lifecycle.
Queue Operations
| Command | Description |
|---|---|
hub_queue | Add a work item to the shared queue |
hub_claim | Claim the next available work item |
hub_work | View current queue and assignments |
claims | List all active claims by agent |
Work items are first-come, first-served. Once an agent claims an item, it's theirs until completed. Other agents can see who claimed what through the work view.
File Lanes
When multiple agents edit files simultaneously, conflicts are inevitable. File lanes solve this by letting agents claim ownership of files before editing.
| Command | Description |
|---|---|
lane_claim | Claim ownership of a file |
lane_release | Release file ownership when done |
Best practice: Always claim before editing and release when done. Forgetting to release blocks other agents from that file.
Task Lifecycle
Agents report progress through a structured task lifecycle. This gives the coordinator visibility into what's happening across the mesh.
| Stage | Description |
|---|---|
task_checkpoint | Report progress update on a task |
task_complete | Mark a task as done with summary |
task_approve | Approve a completed task (reviewer) |
task_reject | Reject a task with reason (reviewer) |
Change Feed
The change feed keeps agents informed about file modifications across the mesh. Agents can watch files they depend on and get notified when changes happen.
| Command | Description |
|---|---|
file_changed | Notify peers that a file was modified |
file_watch | Watch a file for changes |
file_unwatch | Stop watching a file |
feed_recent | View recent file changes across the mesh |
feed_file | View change history for a specific file |
The Coordinator Role
The coordinator agent is responsible for splitting work, assigning tasks, monitoring progress, and reporting results back to you. It does not write code itself — it delegates to specialized agents.
The coordinator uses hub_capture to check agent output, hub_agents to see who's online, and hub_msg to send clarifications or corrections.
For more on the coordinator pattern, see the Coordinator docs.
Across Computers
To work with agents on your other computers, join them to an Agent Network with /connect. Their agents appear in the roster as agent@device, and you message them with hub_msg like any local agent.
Next Steps
- 1Coordinator Pattern
Learn how to orchestrate multi-agent workflows.
- 2The Hub
Agent spawning, messaging, and the open channel.
- 3Agent Network
Connect agents across computers.