Teams
A team is a named group of agents that work together with shared context and coordinated knowledge fusion. Teams are managed by the TeamManager and persisted in Cortex as RDF triples.
How teams work
Each team has:
- A unique ID and name
- A merge strategy for combining agent outputs
- A shared namespace for knowledge isolation
- Members with assigned roles, statuses, and results
mermaidstateDiagram-v2 [*] --> Pending : createTeam() Pending --> Running : first member starts Running --> Completed : all members done Running --> Failed : critical failure
Team operations
| Operation | Description |
|---|---|
createTeam(config) | Create a team with members, roles, and merge strategy |
getTeam(teamId) | Retrieve full team state |
listTeams() | List all teams with summary info |
updateMemberStatus(teamId, agentId, status) | Update a member's progress |
mergeTeamResults(teamId) | Merge all member outputs using the team's strategy |
isTeamComplete(teamId) | Check if all members are completed or failed |
Merge strategies
When a team finishes, member outputs are merged using one of these strategies:
| Strategy | Behavior |
|---|---|
additive | Combine all findings from all members |
replace | Last writer wins |
conflict-flag | Flag conflicting findings for manual resolution |
newest-wins | Keep the most recent finding per topic |
majority-wins | Keep findings agreed upon by majority |
Cortex storage
Team state is stored as RDF triples:
{ns}:team:{teamId} → {ns}:team:name → "code-review-team"
{ns}:team:{teamId} → {ns}:team:status → "running"
{ns}:team:{teamId} → {ns}:team:strategy → "additive"
{ns}:team:{teamId} → {ns}:team:member:{agentId} → { JSON member state }
Configuration
json5{ teams: { maxTeamSize: 8, // Max agents per team defaultStrategy: "additive", // Default merge strategy workflowTimeout: 600, // Team timeout in seconds }, }
Related
- Workflows — orchestrated multi-agent workflows
- Team Dashboard — aggregate team status
- Agent Mailbox — inter-agent messaging
- Multi-agent — routing and agent isolation