Delegate System
What are Delegates?
Delegates are autonomous AI agents that can work independently on complex, multi-step tasks. Unlike simple tool calls, delegates:
- Persist - Continue working even if the main conversation ends
- Iterate - Make multiple tool calls to complete a task
- Report - Return results when finished
- Parallelize - Multiple delegates can work simultaneously
How Delegates Work
- Spawn: Main AI spawns a delegate with a task description
- Execute: Delegate has access to tools and works autonomously
- Direct Redis: Delegates write directly to Redis (no HTTP overhead)
- Complete: Delegate signals completion and returns results
Delegate Tools
Core Delegation
run- Start agentic AI delegationstatus- Check delegation statuslist- List delegations for usertask_complete- Signal task completion
Sub-Delegates
spawn_delegate- Spawn a sub-delegate for subtaskcheck_delegate- Check sub-delegate status
Missions (Parallel)
orchestrate- Start parallel mission with multiple workersspawn_mission- Spawn mission workersmission_status- Check mission progresslist_missions- List all missions
Direct Redis Access
Delegates bypass Gateway HTTP for speed. They connect directly to Redis:
# Delegate loads credentials from Locker on boot
# Then connects directly to each environment's Redis
redis_client = redis.Redis(port=6640, password='Track3Vault2025')
redis_client.hset(key, mapping=data)
This is faster than HTTP calls through Gateway.
Tool Duplication (Current Architecture)
Delegate MCP has 49 tools - many duplicate environment tools:
- context_learn, context_recall, context_summary_state
- track_create, track_get, track_list, etc.
- contact_*, kb_*, document_*, transcript_*, locker_*
Why duplicates? Delegates need the actual Redis execution logic, not just tool definitions. Each duplicate contains the code to read/write Redis directly.
Future refactor: Create shared Python modules in /opt/mcp-servers/shared/ that both MCP servers and Delegate import. This would eliminate duplication while keeping direct Redis speed.
Boot Protocol for Delegates
When a delegate spawns, it receives: 1. Task description - What to accomplish 2. Tool definitions - Available tools with schemas 3. Credentials - Loaded from Locker on Delegate server boot 4. User context - Who spawned the delegate
Use Cases
- Research Tasks - "Research X and summarize findings"
- Code Review - "Review this PR and report issues"
- Data Processing - "Process these 100 documents"
- Parallel Work - "Spawn 5 workers to handle subtasks"
Supported LLMs
- OpenRouter: Claude, GPT-4, Gemini, DeepSeek
- Ollama: Local models
- Default agentic model:
anthropic/claude-sonnet-4