Pools

Pools run multiple agents in parallel and collect their results. Use pools when you need concurrent execution of independent tasks.

Creating a Pool

# Create the pool
naos pool create research-pool

# Add agents to the pool
naos pool add research-pool web-scraper
naos pool add research-pool api-fetcher
naos pool add research-pool db-reader

Running a Pool

naos pool run research-pool

Output:

[pool] research-pool starting (3 agents)
[parallel] web-scraper   ✓ completed (3.2s)
[parallel] api-fetcher   ✓ completed (1.8s)
[parallel] db-reader     ✓ completed (0.9s)
[pool] research-pool completed (3.2s, all 3 succeeded)

Pool Behavior

All agents in a pool run simultaneously. The pool completes when all agents finish (or fail).

Scenario Behavior
All succeed Pool status: completed
Some fail Pool status: partial (shows which failed)
All fail Pool status: failed

Pool Status

naos pool status research-pool
POOL: research-pool
Members: 3 | Last Run: completed | Duration: 3.2s

AGENTS:
  ├── web-scraper   ✓ 3.2s
  ├── api-fetcher   ✓ 1.8s
  └── db-reader     ✓ 0.9s

When to Use Pools

  • Fetching data from multiple sources simultaneously
  • Running independent analysis tasks in parallel
  • Load testing with multiple concurrent agents
  • Fan-out/fan-in processing patterns