📚 KB / Nexus / Delegates
section

Delegates

Delegate System

What are Delegates?

Delegates are autonomous AI agents that can work independently on complex, multi-step tasks. Unlike simple tool calls, delegates:

  1. Persist - Continue working even if the main conversation ends
  2. Iterate - Make multiple tool calls to complete a task
  3. Report - Return results when finished
  4. Parallelize - Multiple delegates can work simultaneously

How Delegates Work

  1. Spawn: Main AI spawns a delegate with a task description
  2. Execute: Delegate has access to tools and works autonomously
  3. Direct Redis: Delegates write directly to Redis (no HTTP overhead)
  4. Complete: Delegate signals completion and returns results

Delegate Tools

Core Delegation

  • run - Start agentic AI delegation
  • status - Check delegation status
  • list - List delegations for user
  • task_complete - Signal task completion

Sub-Delegates

  • spawn_delegate - Spawn a sub-delegate for subtask
  • check_delegate - Check sub-delegate status

Missions (Parallel)

  • orchestrate - Start parallel mission with multiple workers
  • spawn_mission - Spawn mission workers
  • mission_status - Check mission progress
  • list_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

  1. Research Tasks - "Research X and summarize findings"
  2. Code Review - "Review this PR and report issues"
  3. Data Processing - "Process these 100 documents"
  4. 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
ID: 4e791e17 Path: Nexus > Delegates Updated: 2025-12-08T12:28:35