Skip to content

Teams

Teams enable parallel agent execution. Instead of running steps sequentially (like chains), teams spawn multiple agents that work on sub-tasks simultaneously and combine results.

This is useful when different aspects of a financial analysis can be computed independently:

  • One agent analyzes income trends while another reviews expenses
  • One agent searches for subscriptions while another categorizes transactions
  • Multiple agents process different time periods in parallel
Use CaseChainsTeams
Sequential dependencies (step B needs step A’s output)BestNot ideal
Independent sub-tasks that can run in parallelSlowBest
Simple 2-4 step pipelinesBestOverkill
Complex analysis with multiple dimensionsOKBest
Reproducible, deterministic outputBestLess predictable

Teams are defined in YAML with a list of agents:

name: comprehensive-review
description: Full financial review with parallel analysis
agents:
- id: income-analyst
systemPrompt: Analyze all income sources, trends, and projections.
tools: [transaction_search, spending_summary]
- id: expense-analyst
systemPrompt: Analyze spending patterns, categories, and anomalies.
tools: [transaction_search, spending_summary, anomaly_detect]
- id: subscription-auditor
systemPrompt: Find all recurring charges and flag potential savings.
tools: [transaction_search, anomaly_detect]
synthesis:
systemPrompt: >
Combine the results from all agents into a comprehensive financial
review report with income analysis, expense breakdown, and subscription
audit findings.
  1. All agents start simultaneously with their respective tools and prompts
  2. Each agent works independently, producing its own results
  3. When all agents complete, the synthesis step combines their outputs
  4. The final synthesized report is presented to the user

Teams can significantly reduce execution time for complex analyses. A 4-agent team running in parallel completes in roughly the time of the slowest individual agent, rather than the sum of all agents.