{ "name": "agent-orchestration", "description": "How to use the agent registry, leases, and orchestrator for multi-agent workflows", "tags": [ "agents", "orchestration", "delegation", "leases" ], "category": "system", "created": "2026-07-06T00:13:29.404Z", "updated": "2026-07-06T00:13:29.404Z", "content": "---\nname: agent-orchestration\ndescription: How to use the agent registry, leases, and orchestrator for multi-agent workflows\ntags: [agents, orchestration, delegation, leases]\ncategory: system\n---\n## Steps\n1. **Agent Registry:**\n - agent-list — list all registered agents (ID, type, capabilities, status)\n - agent-register — register a new agent (capabilities: comma-separated like \"code,research\")\n - agent-unregister — remove an agent\n - agent-status — detailed status including uptime, task history\n\n2. **Leases (time-bound contracts):**\n - lease-create — create a lease with watchdog timer\n - lease-list — show active leases with remaining TTL\n - lease-revoke — terminate a lease early\n - lease-renew — extend a lease\n\n3. **Orchestrator (spawn, delegate, kill):**\n - orchestrator-spawn — spawn a new agent automatically (registers + creates lease)\n - orchestrator-kill — kill an agent (revokes lease + unregisters)\n - orchestrate — list all active agents with their orchestrator state\n - orchestrator-purge — kill all idle/expired agents\n - orchestrator-status — full system status: active, idle, dead agents\n\n4. **AI tool integration:**\n - AI tools list_agents, delegate_task, spawn_agent are available in the AI system prompt\n - The AI can auto-spawn worker agents for sub-tasks\n - Each agent gets its own VFS workspace at /agents//\n\n5. **When to use:**\n - User needs parallel task execution → orchestrator-spawn coder + researcher\n - Time-bound automation → lease-create with short TTL\n - System cleanup → orchestrator-purge to kill stale agents" }