Workforces Overview
Workforces let you combine multiple agents into a reusable team. Instead of asking one agent to do everything, you define a manager plus specialized workers and let Xagent coordinate handoffs.When to use a workforce
Use a workforce when the outcome needs:- Multiple roles with different instructions
- Delegation between specialists
- Shared context across repeated operations
- A reusable structure for a team workflow
- A support workforce that routes between triage, documentation, and escalation agents
- A marketing workforce that coordinates research, copywriting, and design tasks
- A security workforce that combines email analysis, policy lookup, and reporting
Workforce vs agent
| Use case | Best fit |
|---|---|
| One reusable specialist | Agent |
| A coordinated team of specialists | Workforce |
| One-off exploratory work | Task |
Core structure
Every workforce has:- A manager agent that receives the request and decides what to delegate
- One or more worker agents with assignment-specific instructions
- A canvas layout that represents the team visually
- A run history for repeated execution
What the manager does
The manager agent is the front door of the workforce. It can:- Interpret the incoming request
- Decide which worker should handle each part
- Reuse global tools and knowledge when appropriate
- Return a unified result to the user
What workers do
Workers are normal agents attached to the workforce with extra assignment instructions. Each worker can have:- Its own role and prompt
- Its own tools, skills, and knowledge bases
- A human-friendly alias inside the workforce
- A position on the workforce canvas
Workforce lifecycle
The common lifecycle looks like this:- Create a manager agent
- Add worker agents
- Test the workforce structure
- Publish when ready
- Start runs with a user message and optional files
Builder and canvas
Xagent includes builder endpoints and a canvas model for workforce iteration. In practice, this means you can:- Propose structural changes from a prompt
- Apply a generated patch to the workforce
- Inspect the workforce as nodes and edges
- Adjust worker membership and layout over time
Publishing and running
Workforces move through draft and active states, with archive support when a team structure should no longer be used. Once active, they become stable reusable team structures for repeated work. Each execution creates a workforce run. A run records:- The user message
- The backing task
- The workforce status
- The latest result and timestamps
Related features
Workforces fit naturally with:- Agents for reusable specialists
- Knowledge Base for shared retrieval context
- Files for run inputs and artifacts
- API Reference: Workforces for full endpoint details