Teams & Multi-Agent Delegation
Execute tasks across teams of agents with automatic delegation and orchestration.
Team Execution with Streaming
typescript
const stream = await client.agents.stream('team-uuid', {
task: 'Research AI trends, create a report, and generate social media posts',
});
stream.on('delegationStarted', ({ delegationId, agentName }) => {
console.log(`Delegating to: ${agentName}`);
});
stream.on('delegationCompleted', ({ delegationId, result }) => {
console.log(`Delegation complete`);
});
stream.on('textDelta', ({ delta }) => process.stdout.write(delta));
stream.on('complete', ({ execution }) => console.log('\nDone!'));
await stream.connect();Team in Chat UI
tsx
// Use teamId instead of agentId
<AgentChat teamId="team-uuid" showToolCalls />Agent Types
| Type | Description | Use Case |
|---|---|---|
| simple | Single agent, direct execution | Focused tasks, Q&A |
| workflow | Sequential multi-step execution | Pipelines, ETL |
| orchestrator | Delegates to other agents | Complex tasks, team coordination |