Skip to main content

Agents

Every call needs Authorization: Bearer <key>. 6 calls:

List agent runs, newest first​

GET /v1/agent-runs

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
agent_idstring (uuid)No
conversation_idstringNoConversation id (cnv_...).
outcomeenumNoOne of: running, resolved, handoff, error.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].agent_idstring (uuid)
data[].conversation_idstring or nullConversation id (cnv_...).
data[].error_codestring or null
data[].finished_atstring (date-time) or nullISO 8601 timestamp.
data[].handoff_reasonstring or null
data[].idstring (uuid)
data[].input_tokensintegerFrom 0 to 9007199254740991.
data[].modelstring or null
data[].outcomeenum or nullOne of: running, resolved, handoff, error.
data[].output_tokensintegerFrom 0 to 9007199254740991.
data[].shadowboolean
data[].started_atstring (date-time)ISO 8601 timestamp.
data[].tool_callsintegerFrom 0 to 9007199254740991.
data[].trigger_message_idstring or nullMessage id (msg_...).
data[].turnsintegerFrom 0 to 9007199254740991.
data[].workflow_run_idstring (uuid) or null
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get an agent run and its steps​

GET /v1/agent-runs/:id

What the agent said appears in the steps only for callers who can read conversations.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
agent_idstring (uuid)
conversation_idstring or nullConversation id (cnv_...).
error_codestring or null
finished_atstring (date-time) or nullISO 8601 timestamp.
handoff_reasonstring or null
idstring (uuid)
input_tokensintegerFrom 0 to 9007199254740991.
modelstring or null
outcomeenum or nullOne of: running, resolved, handoff, error.
output_tokensintegerFrom 0 to 9007199254740991.
shadowboolean
started_atstring (date-time)ISO 8601 timestamp.
stepsobject[]
steps[].atstring (date-time)ISO 8601 timestamp.
steps[].codestring
steps[].detailobject
steps[].kindenumOne of: model, tool, message, handoff, guard.
steps[].statusenumOne of: ok, refused, failed, shadowed.
steps[].toolstring
tool_callsintegerFrom 0 to 9007199254740991.
trigger_message_idstring or nullMessage id (msg_...).
turnsintegerFrom 0 to 9007199254740991.
workflow_run_idstring (uuid) or null

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List AI agents, newest first​

GET /v1/agents

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
statusenumNoOne of: draft, shadow, live, paused.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].handoff_rulesobject
data[].handoff_rules.keywordsstring[]Hand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
data[].handoff_rules.max_turnsintegerFrom 1 to 100.
data[].handoff_rules.on_low_confidencebooleanHand off when the model answers with neither text nor a tool call. Default true.
data[].handoff_rules.team_idstring (uuid) or nullTeam the conversation is assigned to on handoff.
data[].handoff_rules.user_idstring (uuid) or nullPerson the conversation is assigned to on handoff (P11b).
data[].idstring (uuid)
data[].instructionsstring
data[].limitsobject
data[].limits.max_messages_per_conversationintegerFrom 1 to 100.
data[].limits.max_runs_per_conversation_per_dayintegerFrom 1 to 200.
data[].limits.max_tokens_per_runintegerFrom 1 to 200000.
data[].limits.max_tool_calls_per_runintegerFrom 1 to 20.
data[].limits.max_turns_per_runintegerFrom 1 to 10.
data[].modelstring
data[].namestring
data[].pool_idsstring[]
data[].runs_7dobject
data[].runs_7d.conversationsintegerFrom 0 to 9007199254740991.
data[].runs_7d.errorintegerFrom 0 to 9007199254740991.
data[].runs_7d.handoffintegerFrom 0 to 9007199254740991.
data[].runs_7d.resolvedintegerFrom 0 to 9007199254740991.
data[].runs_7d.totalintegerFrom 0 to 9007199254740991.
data[].statusenumOne of: draft, shadow, live, paused.
data[].toolsenum[]
data[].updated_atstring (date-time)ISO 8601 timestamp.
data[].usable_toolsenum[]
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create an AI agent​

POST /v1/agents

Creates the agent and the service identity its tool calls run with. You can only give it tools your own role can use, and they stay capped by your role. Live and shadow agents need at least one pool. Signed-in members only: API keys are refused.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
handoff_rulesobjectNoDefault {"keywords":[],"on_low_confidence":true}.
handoff_rules.keywordsstring[]NoHand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
handoff_rules.max_turnsintegerNoFrom 1 to 100.
handoff_rules.on_low_confidencebooleanNoHand off when the model answers with neither text nor a tool call. Default true.
handoff_rules.team_idstring (uuid) or nullNoTeam the conversation is assigned to on handoff.
handoff_rules.user_idstring (uuid) or nullNoPerson the conversation is assigned to on handoff (P11b).
instructionsstringNoUp to 20000 characters.
limitsobjectNoDefault {}.
limits.max_messages_per_conversationintegerNoFrom 1 to 100.
limits.max_runs_per_conversation_per_dayintegerNoFrom 1 to 200.
limits.max_tokens_per_runintegerNoFrom 1 to 200000.
limits.max_tool_calls_per_runintegerNoFrom 1 to 20.
limits.max_turns_per_runintegerNoFrom 1 to 10.
modelstringYesUp to 100 characters.
namestringYesUp to 80 characters.
pool_idsstring[]NoUp to 50 items.
statusenumNoOne of: draft, shadow, live. Default "draft".
toolsenum[]NoUp to 20 items.

Response 201

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
handoff_rulesobject
handoff_rules.keywordsstring[]Hand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
handoff_rules.max_turnsintegerFrom 1 to 100.
handoff_rules.on_low_confidencebooleanHand off when the model answers with neither text nor a tool call. Default true.
handoff_rules.team_idstring (uuid) or nullTeam the conversation is assigned to on handoff.
handoff_rules.user_idstring (uuid) or nullPerson the conversation is assigned to on handoff (P11b).
idstring (uuid)
instructionsstring
limitsobject
limits.max_messages_per_conversationintegerFrom 1 to 100.
limits.max_runs_per_conversation_per_dayintegerFrom 1 to 200.
limits.max_tokens_per_runintegerFrom 1 to 200000.
limits.max_tool_calls_per_runintegerFrom 1 to 20.
limits.max_turns_per_runintegerFrom 1 to 10.
modelstring
namestring
pool_idsstring[]
runs_7dobject
runs_7d.conversationsintegerFrom 0 to 9007199254740991.
runs_7d.errorintegerFrom 0 to 9007199254740991.
runs_7d.handoffintegerFrom 0 to 9007199254740991.
runs_7d.resolvedintegerFrom 0 to 9007199254740991.
runs_7d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, shadow, live, paused.
toolsenum[]
updated_atstring (date-time)ISO 8601 timestamp.
usable_toolsenum[]

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get an AI agent​

GET /v1/agents/:id

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
handoff_rulesobject
handoff_rules.keywordsstring[]Hand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
handoff_rules.max_turnsintegerFrom 1 to 100.
handoff_rules.on_low_confidencebooleanHand off when the model answers with neither text nor a tool call. Default true.
handoff_rules.team_idstring (uuid) or nullTeam the conversation is assigned to on handoff.
handoff_rules.user_idstring (uuid) or nullPerson the conversation is assigned to on handoff (P11b).
idstring (uuid)
instructionsstring
limitsobject
limits.max_messages_per_conversationintegerFrom 1 to 100.
limits.max_runs_per_conversation_per_dayintegerFrom 1 to 200.
limits.max_tokens_per_runintegerFrom 1 to 200000.
limits.max_tool_calls_per_runintegerFrom 1 to 20.
limits.max_turns_per_runintegerFrom 1 to 10.
modelstring
namestring
pool_idsstring[]
runs_7dobject
runs_7d.conversationsintegerFrom 0 to 9007199254740991.
runs_7d.errorintegerFrom 0 to 9007199254740991.
runs_7d.handoffintegerFrom 0 to 9007199254740991.
runs_7d.resolvedintegerFrom 0 to 9007199254740991.
runs_7d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, shadow, live, paused.
toolsenum[]
updated_atstring (date-time)ISO 8601 timestamp.
usable_toolsenum[]

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Edit an AI agent, or turn it on, put it in shadow or pause it​

PATCH /v1/agents/:id

Changing its tools or pools makes you the member whose role caps them. Moving a live agent to any other status hands its conversations back to people. A paused organisation can still pause an agent. Signed-in members only: API keys are refused.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
handoff_rulesobjectNo
handoff_rules.keywordsstring[]NoHand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
handoff_rules.max_turnsintegerNoFrom 1 to 100.
handoff_rules.on_low_confidencebooleanNoHand off when the model answers with neither text nor a tool call. Default true.
handoff_rules.team_idstring (uuid) or nullNoTeam the conversation is assigned to on handoff.
handoff_rules.user_idstring (uuid) or nullNoPerson the conversation is assigned to on handoff (P11b).
instructionsstringNoUp to 20000 characters.
limitsobjectNo
limits.max_messages_per_conversationintegerNoFrom 1 to 100.
limits.max_runs_per_conversation_per_dayintegerNoFrom 1 to 200.
limits.max_tokens_per_runintegerNoFrom 1 to 200000.
limits.max_tool_calls_per_runintegerNoFrom 1 to 20.
limits.max_turns_per_runintegerNoFrom 1 to 10.
modelstringNoUp to 100 characters.
namestringNoUp to 80 characters.
pool_idsstring[]NoUp to 50 items.
statusenumNoOne of: draft, shadow, live, paused.
toolsenum[]NoUp to 20 items.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
handoff_rulesobject
handoff_rules.keywordsstring[]Hand off, without asking the model, when the contact’s message has one of these. Up to 50 items.
handoff_rules.max_turnsintegerFrom 1 to 100.
handoff_rules.on_low_confidencebooleanHand off when the model answers with neither text nor a tool call. Default true.
handoff_rules.team_idstring (uuid) or nullTeam the conversation is assigned to on handoff.
handoff_rules.user_idstring (uuid) or nullPerson the conversation is assigned to on handoff (P11b).
idstring (uuid)
instructionsstring
limitsobject
limits.max_messages_per_conversationintegerFrom 1 to 100.
limits.max_runs_per_conversation_per_dayintegerFrom 1 to 200.
limits.max_tokens_per_runintegerFrom 1 to 200000.
limits.max_tool_calls_per_runintegerFrom 1 to 20.
limits.max_turns_per_runintegerFrom 1 to 10.
modelstring
namestring
pool_idsstring[]
runs_7dobject
runs_7d.conversationsintegerFrom 0 to 9007199254740991.
runs_7d.errorintegerFrom 0 to 9007199254740991.
runs_7d.handoffintegerFrom 0 to 9007199254740991.
runs_7d.resolvedintegerFrom 0 to 9007199254740991.
runs_7d.totalintegerFrom 0 to 9007199254740991.
statusenumOne of: draft, shadow, live, paused.
toolsenum[]
updated_atstring (date-time)ISO 8601 timestamp.
usable_toolsenum[]

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.