Skip to main content

Agent teams

A task's helpers: read the team and its messages, answer the lead, stop the team; the install's settings.

OperationMethod and path
Read a task's agent teamGET /api/v1/conversations/{id}/team
Read an agent team's messagesGET /api/v1/conversations/{id}/team/messages
Answer the lead's questionPOST /api/v1/conversations/{id}/team/answers
Stop an agent team or one helperPOST /api/v1/conversations/{id}/team/stop
Read the agent teams' settingsGET /api/v1/admin/agent-teams
Set the agent teams' settingsPUT /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

NameInRequiredTypeDescription
idpathyesstring (uuid)The lead's task or any member's.

Responses

StatusMeaningBody
200The teamTeam
401Authentication requiredError
403teams_disabled: agent teams are offError
404not_found, or no_team for a task in no teamError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
idpathyesstring (uuid)The lead's task or any member's.
afterqueryinteger 0 or more
limitqueryinteger 1–200

Responses

StatusMeaningBody
200A page of messagesTeamMessagePage
400A bad after or limit (see details)Error
401Authentication requiredError
403teams_disabled: agent teams are offError
404not_found, or no_teamError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
idpathyesstring (uuid)The lead's task or any member's.
Idempotency-KeyheaderyesstringA retried write with the same key answers the same.

Request body

application/json: TeamAnswerWrite

Responses

StatusMeaningBody
201AnsweredTeamSeq
400invalid_request (see details)Error
401Authentication requiredError
403teams_disabled: agent teams are offError
404not_found, or no_teamError
409already_answered (per question), or team_stoppedError
422unknown_reference: not a person_question of this team; or the Idempotency-Key was used with another requestError
429Over the team channel's 5,000 messages a day (channel_rate); Retry-After says whenError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
idpathyesstring (uuid)The lead's task or any member's.
Idempotency-KeyheaderyesstringA retried write with the same key answers the same.

Responses

StatusMeaningBody
202StoppingTeamStopped
401Authentication requiredError
403teams_disabled: agent teams are offError
404not_found, or no_teamError
409team_stopped: the team already ended; member_gone for a helper that failed (a done one is stopped)Error
422The Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError

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

StatusMeaningBody
200The settingsAgentTeamSettings
401Authentication requiredError
403teams_disabled: agent teams are offError
503Database unavailable or gateway restartingError

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

NameInRequiredTypeDescription
Idempotency-KeyheaderstringA retried write with the same key answers the same.

Request body

application/json: AgentTeamSettingsWrite

Responses

StatusMeaningBody
200SetAgentTeamSettings
400invalid_request: acceptance_check not one line or over 4,096 bytes (see details)Error
401Authentication requiredError
403teams_disabled: agent teams are offError
409conflict (stale version), or route_unusable: member_route names a disabled routeError
422unknown_reference: member_route names no route; or the Idempotency-Key was used with another requestError
503Database unavailable or gateway restartingError