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

    TypeDescriptionUse Case
    simpleSingle agent, direct executionFocused tasks, Q&A
    workflowSequential multi-step executionPipelines, ETL
    orchestratorDelegates to other agentsComplex tasks, team coordination