Use when managing teams or governance titles. Trigger with /team-governance. Loaded by ai-maestro-plugin
Manage teams, assign agents, assign Chief-of-Staff titles, and handle broadcasts via the AI Maestro governance API. All teams are closed (isolated messaging with COS gateway). For lightweight agent collections, use Groups. Requires MANAGER or CHIEF-OF-STAFF title.
Communication graph: AMP messaging between agents is governed by a title-based directed graph. MANAGER and COS have full access; ORCHESTRATOR can reach COS and workers; workers (ARCHITECT, INTEGRATOR, MEMBER) can only reach COS and ORCHESTRATOR; AUTONOMOUS can reach MANAGER, COS, and other AUTONOMOUS. Subagents cannot send messages. See the reference for the full adjacency matrix and routing suggestions.
${AIMAESTRO_API:-http://localhost:23000}curl and jq installedamp-send, amp-inbox) for broadcastsVerify role before any operation:
curl -s "http://localhost:23000/api/governance" | jq .
If not MANAGER or COS, STOP and inform the user.
API operations:
GET /api/teamsPOST /api/teams (closed requires MANAGER + X-Agent-Id header)PUT /api/teams/{id}DELETE /api/teams/{id} (MANAGER only)POST /api/teams/{id}/chief-of-staff (MANAGER + governance password)Auth header for protected operations:
curl -s -X POST "http://localhost:23000/api/teams" \
-H "Content-Type: application/json" \
-H "X-Agent-Id: <your-agent-id>" \
-d '{"name":"my-team","type":"closed"}' | jq .
COS assignment — ask user for governance password (never cache it):
curl -s -X POST "http://localhost:23000/api/teams/<id>/chief-of-staff" \
-H "Content-Type: application/json" -H "X-Agent-Id: <id>" \
-d '{"agentId":"<cos-id>","password":"<pw>"}' | jq .
Broadcasts — message all team agents via AMP:
AGENTS=$(curl -s "http://localhost:23000/api/teams/<id>" | jq -r '.agentIds[]')
for AID in $AGENTS; do
NAME=$(curl -s "http://localhost:23000/api/agents/$AID" | jq -r '.agent.name')
amp-send "$NAME" "Subject" "Message"
done
Respect messaging isolation for closed teams. See reference for full rules.
| HTTP | Meaning |
|---|---|
| 403 | Not MANAGER/COS, or closed team isolation blocks messaging |
| 400 | Bad input (invalid type, agent in another closed team) |
| 401 | Invalid governance password |
| 404 | Team not found |
On agent_already_in_closed_team, use MANAGER cross-team transfer.
/team-governance create a closed team called "security-core"
Creates team with type "closed", returns team ID.
/team-governance assign agent backend-dev to security-core
Adds agent to team's agentIds array.
Copy this checklist and track your progress:
/api/governance