Agent Teams
Agent Teams add policy-gated multi-agent spawning to tandem-engine.
TUI Workflow (Agent Fanout)
For terminal-native team execution, use TUI fanout:
/agent fanout 4 Build and ship the VPS web portal stress-lab improvementsWhat this does:
- Ensures
nagents exist in the current chat. - Switches the layout to Grid mode.
- Bootstraps a coordinated team run (
TeamCreate+ delegatedtaskrouting). - If current mode is
plan, TUI auto-switches toorchestratebefore delegation.
Notes:
- Fanout without a goal (
/agent fanout 4) only prepares panes/layout. - With a goal, the lead agent dispatches worker assignments and tracks progress.
- Local team runtime state is written under
.tandem/agent-teams/(members/session bindings, mailbox files, and session-team context).
What Is Implemented
- Server-side spawn gate (
SpawnPolicy) shared by all spawn callers. - Spawn callers supported:
- UI/API (
POST /agent-team/spawn) - tool call (
/tool spawn_agent ...) - orchestrator runtime bridge (
POST /mission/{id}/eventwithmission_started+ assigned agents) - orchestrator runtime cancellation bridge (
POST /mission/{id}/eventwithmission_canceled)
- UI/API (
- Agent template registry (
.tandem/agent-team/templates/*.yaml). - Spawn API endpoints:
GET /agent-team/templatesGET /agent-team/instancesGET /agent-team/missionsGET /agent-team/approvalsPOST /agent-team/spawnPOST /agent-team/approvals/spawn/{id}/approvePOST /agent-team/approvals/spawn/{id}/denyPOST /agent-team/instance/{id}/cancelPOST /agent-team/mission/{id}/cancel
- Desktop operator surface:
Agent Automationpage includes anAgent Opstab for spawn, approvals, and mission/instance control.
- Structured events:
agent_team.spawn.requestedagent_team.spawn.deniedagent_team.spawn.approvedagent_team.instance.startedagent_team.budget.usageagent_team.budget.exhaustedagent_team.instance.cancelledagent_team.instance.completedagent_team.instance.failedagent_team.mission.budget.exhausted
Safe Defaults
- Spawn is denied when no policy file is present.
- Justification is required when policy requires it.
- Spawn edges are enforced by role mapping in policy.
- Required skills per role are enforced.
- Skill hash (
skillHash) is recorded in spawn response and events. - Budget exhaustion behavior is cancel-first: instance is cancelled and child session run is cancelled.
- Mission total budgets are supported and can trigger mission-wide cancellation.
- Cost tracking is supported with optional cost limits (
max_cost_usd). - Runtime capability enforcement blocks disallowed tool use and emits
agent_team.capability.denied. git pushcan require approval handoff via permission queue (push_requires_approval).- Skill source policy supports
project_only,allowlist, and optional pinned hashes. - Token accounting prefers provider-reported usage when emitted (
provider.usage) and falls back to stream text estimation.
Config Locations
- Policy:
.tandem/agent-team/spawn-policy.yaml - Templates:
.tandem/agent-team/templates/*.yaml
See: