Agent Pool
What the Agent Pool is
When AI Partner runs a complex goal, it can spawn multiple sub-agents to work in parallel. Each sub-agent is an independent execution context with its own task, tools, and ReAct loop.
The Agent Pool Monitor (sidebar → Agent Pool) gives you a live view of all sub-agents: how many are active, what each one is doing, and the option to cancel any individual agent or all of them.
Agent Pool limits
| Limit | Default | Config |
|---|---|---|
| Max concurrent agents | 5 | AGENT_POOL_MAX_CONCURRENT in .env |
| Max delegation depth | 3 | AGENT_POOL_MAX_DEPTH in .env |
Depth means how many levels of delegation can nest. A goal spawns sub-agents (depth 1). Those sub-agents can themselves delegate further (depth 2). Depth 3 is the maximum — sub-sub-sub-agents cannot delegate further.
The Agent Pool Monitor panel
Go to sidebar → Agent Pool:
Agent Pool
─────────────────────────────────────────────────
Active: 3 Total spawned: 7 [Cancel All]
Agent task-abc1 depth:1 role: Web Researcher
Task: "Research Anthropic's latest funding round"
Status: 🔄 Running — iteration 3
Started: 14:03:22
Agent task-def2 depth:1 role: Financial Analyst
Task: "Get NVIDIA Q1 2026 earnings data"
Status: 🔄 Running — iteration 2
Started: 14:03:24
Agent task-ghi3 depth:2 role: Summarizer
Task: "Summarize the Anthropic research results"
Status: ⏳ Waiting for task-abc1
Parent: task-abc1
──────────────────────────────────────────────────
Completed (4):
✅ task-jkl4 Web Researcher "Research OpenAI funding" 14:02:18 → 14:03:10 (52s)
✅ task-mno5 Fact Checker "Verify funding amounts" 14:02:45 → 14:03:31 (46s)
✅ task-pqr6 Report Generator "Draft comparison outline" 14:03:05 → 14:03:48 (43s)
❌ task-stu7 Shell Operator "Download CSV from URL" 14:02:30 → 14:02:55 (25s) — 404 error
What each field means
| Field | Description |
|---|---|
| Active | Sub-agents currently running (counts toward the 5-agent limit) |
| Total spawned | All agents started since the current goal began |
| depth | How deep in the delegation chain this agent is (1 = direct child of the main executor) |
| role | The agent profile assigned to this sub-task |
| Task | What this agent was asked to do |
| Status | Running / Waiting for dependency / Completed / Failed |
| Parent | Which agent delegated to this one (depth 2+ only) |
Real-time updates
The Agent Pool Monitor updates live via Socket.IO — no manual refresh needed. Events that update the panel:
| Event | What happens |
|---|---|
agent:spawned | New agent row appears with "Running" status |
agent:completed | Agent moves to Completed section with result |
agent:failed | Agent moves to Completed section with error message |
Cancelling agents
Cancel one agent: click the Stop button (⏹) next to any running agent. The agent's current LLM request is aborted immediately via AbortController. Any files or partial results it created are preserved — they don't get deleted.
Cancel all agents: click Cancel All at the top of the panel. This cancels the main goal and all sub-agents simultaneously.
Cancelling a sub-agent does not automatically cancel the parent goal. The parent goal may continue with the partial results from completed sub-agents, or it may escalate to you with an HITL prompt if a cancelled sub-task was required for goal completion.
When parallel agents help
The main executor decides whether to run agents in parallel based on the goal's task graph. Tasks with no dependencies run simultaneously:
Example goal:
Research OpenAI, Anthropic, and Google DeepMind:
their latest funding, key hires, and product announcements.
Write a comparison report.
What runs:
Main agent: decompose into 4 tasks
Task 1: Research OpenAI → Agent A (parallel)
Task 2: Research Anthropic → Agent B (parallel)
Task 3: Research DeepMind → Agent C (parallel)
[all three run simultaneously — ~45 seconds total instead of ~135 sequential]
Task 4: Write comparison report (depends on 1+2+3) → runs after all three complete
The Agent Pool Monitor shows all three research agents active at the same time.
When agents wait
If a sub-task depends on another, the waiting agent shows ⏳ Waiting for [parent task]. It starts automatically when the dependency completes — you don't need to do anything.
If a dependency fails, the waiting agent is marked ⏭ Skipped — it was never started because its prerequisite didn't complete.