Skip to main content
Use a Team when several Agents or remote members participate in a task. Choose the mode according to how they should collaborate. If a fixed sequence such as “lookup → calculate → approve” is required, use a Workflow.

Route to a specialist

Host factory: pass a configured model. This creates two members with their own in-memory conversation stores and a router. The caller invokes team.run(input, identity) and calls close() after all Team runs settle. Live model calls require the selected provider’s credentials.
Try an invoice question, then an integration-error question. Observe team.delegate and verify which member ran; do not infer routing solely from answer wording. This factory configures no account-system integration. Add authorized lookup tools to the appropriate member when connecting real data.

Choose the coordination mode

Instructions such as “research, then verify, then edit” do not turn model-directed coordination into a deterministic workflow. Model agreement is also not independent verification of a factual claim. Give members evidence/tools and evaluate the result.

Configure member memory explicitly

The factory above configures memory on each Agent. In v4, the TeamConfig.memory field is accepted by the public type but is not consumed by the Team implementation. It does not initialize or share memory for members. For a stable parent session, Team calls each member with a session ID shaped as <parent-session>:<member-name> and forwards user/tenant context. A later call can continue that member’s own conversation when its Agent has memory configured. It does not make every member see every other member’s transcript. In a hosted service, supply verified caller identity and owner-scoped parent session IDs. Choose persistent, scoped member stores if state must survive restart. To share specific evidence, pass it in a deliberate task input or use a verified memory-sharing design; a shared database connection alone is not a complete access policy.

Give tools and budgets to their owners

Configure tools on the member that needs them. A billing member should receive its permitted billing lookup rather than an unrelated filesystem or deployment toolkit. Use tool patterns to bind application authorization to the callback. A member’s cost tracker accounts for that member’s recorded calls. It does not automatically establish an aggregate budget for the Team’s planning and synthesis calls. For shared controlled execution, use a harness driver and inspect its budget and telemetry contract. Do not label a partial token summary as the complete Team invoice.

More patterns

  • Workflows: application-defined ordering and step results.
  • Harness drivers: wrap a Team in shared grants and controls.
  • Evaluation: score routing and final answers separately.
  • Queueing teams: background delivery and worker-owned executors.
  • Team API: exact public declarations, including fields whose implementation limits are explained above.