A workforce is a team of agents that coordinate to handle complex, multistep tasks through delegation and handover. The platform routes messages to the right agent, and agents can pass work between each other as the task progresses — your application doesn’t have to manage the coordination.Documentation Index
Fetch the complete documentation index at: https://relevanceai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Load a workforce
Fetch a workforce by ID. The workforce ID is available on the workforce’s page in the dashboard.Start a workforce task
Send a message withsendMessage. This creates a new task and returns it immediately. The workforce begins routing the message to the appropriate agent.
sendMessage resolves when the message is sent, not when the workforce finishes. Listen for events on the returned task to receive results — see Tasks.
Continue a conversation
Pass the existing task tosendMessage to add follow-up messages:
Unlike agent tasks, workforce tasks don’t support file attachments.
Retrieve workforce tasks
A single task
Fetch a specific task by ID:A list of tasks
Fetch a list of workforce tasks withgetTasks. Workforce task listing uses cursor-based pagination and supports search:
Differences from agent task retrieval
Workforce and agent task listings don’t support the same options:| Feature | Agent tasks | Workforce tasks |
|---|---|---|
| Pagination | Page-based | Cursor-based |
| Sort options | Supported | Not supported |
| Status filtering | Supported | Not supported |
| Search | Supported | Supported |
| File attachments | Supported | Not supported |
Workforce task states
Workforce tasks use a different set of internal states than agent tasks. The SDK maps them to the same simplified statuses used elsewhere.| Workforce state | SDK status |
|---|---|
running | running |
completed | completed |
execution-limit-reached | error |
pending-approval | action |
escalated | action |
errored-pending-approval | error |
action status means the workforce needs human intervention — either through an approval step or because the task was escalated.
Workforce-specific messages
Workforce tasks emit two message types that don’t appear in agent tasks.Agent run messages
AWorkforceAgentMessage (type "workforce-agent-run") indicates that an agent within the workforce is executing a subtask. These messages include details about which agent is running and the current state of its work.
Handover messages
AWorkforceAgentHandoverMessage (type "workforce-agent-handover") indicates that work is being delegated from one agent to another. The message includes the trigger message that started the handover and details about the receiving agent.

