Agent teams
A task's helpers: read the team and its messages, answer the lead, stop the team; the install's settings.
| Operation | Method and path |
|---|---|
| Read a task's agent team | GET /api/v1/conversations/{id}/team |
| Read an agent team's messages | GET /api/v1/conversations/{id}/team/messages |
| Answer the lead's question | POST /api/v1/conversations/{id}/team/answers |
| Stop an agent team or one helper | POST /api/v1/conversations/{id}/team/stop |
| Read the agent teams' settings | GET /api/v1/admin/agent-teams |
| Set the agent teams' settings | PUT /api/v1/admin/agent-teams |
Read a task's agent team
GET /api/v1/conversations/{id}/team
The team of a lead's task or any member's: its state, budget, the open question and each helper (ADR-0034 S6). The task's own person only; anyone else gets the task's own answer.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | The lead's task or any member's. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The team | Team |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 404 | not_found, or no_team for a task in no team | Error |
| 503 | Database unavailable or gateway restarting | Error |
Read an agent team's messages
GET /api/v1/conversations/{id}/team/messages
Every message of the team after after, in seq order, in the read shape, with the end note ended (ADR-0034 S6).
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | The lead's task or any member's. |
after | query | integer 0 or more | ||
limit | query | integer 1–200 |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of messages | TeamMessagePage |
| 400 | A bad after or limit (see details) | Error |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 404 | not_found, or no_team | Error |
| 503 | Database unavailable or gateway restarting | Error |
Answer the lead's question
POST /api/v1/conversations/{id}/team/answers
A person_answer to the lead's person_question, which wakes the lead (ADR-0034 point 4). An older question may still be answered by its question_seq.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | The lead's task or any member's. |
Idempotency-Key | header | yes | string | A retried write with the same key answers the same. |
Request body
application/json: TeamAnswerWrite
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Answered | TeamSeq |
| 400 | invalid_request (see details) | Error |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 404 | not_found, or no_team | Error |
| 409 | already_answered (per question), or team_stopped | Error |
| 422 | unknown_reference: not a person_question of this team; or the Idempotency-Key was used with another request | Error |
| 429 | Over the team channel's 5,000 messages a day (channel_rate); Retry-After says when | Error |
| 503 | Database unavailable or gateway restarting | Error |
Stop an agent team or one helper
POST /api/v1/conversations/{id}/team/stop
On the lead's task the whole team, on a member's that helper only (the lead is told). Through the one stop path; a repeat answers the same.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | The lead's task or any member's. |
Idempotency-Key | header | yes | string | A retried write with the same key answers the same. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Stopping | TeamStopped |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 404 | not_found, or no_team | Error |
| 409 | team_stopped: the team already ended; member_gone for a helper that failed (a done one is stopped) | Error |
| 422 | The Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |
Read the agent teams' settings
GET /api/v1/admin/agent-teams
The model route of a helper started without a profile, and the acceptance check run on the lead's done. Administrators only.
Sign-in: A signed-in session or an API token.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The settings | AgentTeamSettings |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 503 | Database unavailable or gateway restarting | Error |
Set the agent teams' settings
PUT /api/v1/admin/agent-teams
Both settings with the version read. Administrators only; audited.
Sign-in: A signed-in session or an API token.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | A retried write with the same key answers the same. |
Request body
application/json: AgentTeamSettingsWrite
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Set | AgentTeamSettings |
| 400 | invalid_request: acceptance_check not one line or over 4,096 bytes (see details) | Error |
| 401 | Authentication required | Error |
| 403 | teams_disabled: agent teams are off | Error |
| 409 | conflict (stale version), or route_unusable: member_route names a disabled route | Error |
| 422 | unknown_reference: member_route names no route; or the Idempotency-Key was used with another request | Error |
| 503 | Database unavailable or gateway restarting | Error |