Agents
Overview
Agents are Tenant-owned configuration records. Use these endpoints to configure execution, inspect immutable Versions, attach capabilities, or operate the reversible execution kill switch; Attribution remains immutable after creation.
Endpoints
POST /v1/agents
Creates an Agent. Names are unique per tenant; a tenant can have at most 100 Agents.
Request
Requires bearer authentication and JSON. There are no path or query parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Body field | Type | Required | Default |
|---|---|---|---|
name | string | yes | — |
model | string | no | deepseek/deepseek-v4-flash |
providerId | string | null | no | null |
skills | string[] | no | [] |
tools | string[] | no | [] |
sandboxId | string | null | no | null |
instructions | string | no | "" |
memoryInjectionEnabled | boolean | no | false |
userId | string | no | "" |
metadata | object | no | {} |
mcpConnectionIds | string[] | no | [] |
model must contain a provider/model separator. Tool groups are
file_operation_sandbox, write_todos, and memory. Selecting
file_operation_sandbox requires a tenant-owned sandboxId in the effective
Agent state.
Response
Returns 201 Created with an Agent object.
Response schema: agentResponseSchema.
{
"id": "ag_1234567890ABCDEF",
"tenantId": "ten_1234567890ABCDEF",
"name": "Support Agent",
"model": "openrouter/auto",
"providerId": null,
"skills": [],
"tools": ["file_operation_sandbox", "write_todos"],
"sandboxId": "sb_1234567890ABCDEF",
"instructions": "Answer clearly.",
"memoryInjectionEnabled": true,
"userId": "",
"metadata": {},
"mcpConnectionIds": [],
"avatarUrl": null,
"version": 1,
"status": "active",
"createdAt": "2026-07-10T10:00:00Z",
"updatedAt": "2026-07-10T10:00:00Z"
}Errors
400 invalid_request for invalid fields, duplicate names, invalid Provider or Skill IDs, or the Agent cap. 409 SANDBOX_REQUIRED applies when sandbox-backed file operations have no valid tenant-owned attachment. 409 SANDBOX_IN_USE applies when the Sandbox is already attached to another Agent. See REST errors.
cURL
curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/agents" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"name":"Support Agent","model":"openrouter/auto","sandboxId":"sb_1234567890ABCDEF","tools":["file_operation_sandbox","write_todos"],"instructions":"Answer clearly.","memoryInjectionEnabled":true}'SDK and related guides
SDK: create. See Agents and Build a chat endpoint.
GET /v1/agents
Returns Agents ordered by most recently updated. The bounded list is not paginated.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Query parameter | Type | Required | Description |
|---|---|---|---|
userId | string | no | Omit for all Agents; use an opaque value or "" for tenant-level Agents |
There is no request body.
Response
Returns 200 OK with complete Agent objects.
Response schema: agentsResponseSchema.
{
"agents": [
{
"id": "ag_1234567890ABCDEF",
"tenantId": "ten_1234567890ABCDEF",
"name": "Support Agent",
"model": "openrouter/auto",
"providerId": null,
"sandboxId": null,
"memoryInjectionEnabled": false,
"skills": [],
"tools": [],
"instructions": "Answer clearly.",
"userId": "",
"metadata": {},
"mcpConnectionIds": [],
"avatarUrl": null,
"version": 1,
"status": "active",
"createdAt": "2026-07-10T10:00:00Z",
"updatedAt": "2026-07-10T10:00:00Z"
}
]
}Errors
400 invalid_request for unknown query fields. Standard errors also apply; see REST errors.
cURL
curl --get "$BLAZING_AGENTS_BASE_URL/v1/agents" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--data-urlencode "userId="SDK and related guides
SDK: list. See Agents and Build a chat endpoint.
GET /v1/agents/:agentId
Returns one current Agent configuration. Reading an Agent does not create a Version or otherwise change its lifecycle.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path parameter | Type | Description |
|---|---|---|
agentId | string | Agent ID (ag_…) |
There are no query or body parameters.
Response
Returns 200 OK with an Agent object, including a short-lived avatarUrl when an avatar exists.
Response schema: agentResponseSchema.
{
"id": "ag_1234567890ABCDEF",
"tenantId": "ten_1234567890ABCDEF",
"name": "Support Agent",
"model": "openrouter/auto",
"providerId": null,
"sandboxId": null,
"memoryInjectionEnabled": false,
"skills": [],
"tools": [],
"instructions": "Answer clearly.",
"userId": "",
"metadata": {},
"mcpConnectionIds": [],
"avatarUrl": null,
"version": 1,
"status": "active",
"createdAt": "2026-07-10T10:00:00Z",
"updatedAt": "2026-07-10T10:00:00Z"
}Errors
400 invalid_request for a malformed ID. 404 not_found when the Agent is missing or belongs to another tenant. See REST errors.
cURL
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: get. See Agents and Build a chat endpoint.
PUT /v1/agents/:agentId
Updates the supplied Agent fields. Arrays such as skills and tools replace the full existing array. userId is immutable.
Request
Requires bearer authentication and JSON. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Parameter | Type | Required | Description |
|---|---|---|---|
Body name | string | no | 1–80 characters |
Body model | string | no | Provider/model identifier |
Body providerId | string | null | no | Stored Provider or platform key |
Body skills | string[] | no | Complete replacement Skill list |
Body tools | string[] | no | Complete replacement tool-group list |
Body sandboxId | string | null | no | Attach or detach a durable Sandbox |
Body instructions | string | no | Up to 3,000 characters |
Body memoryInjectionEnabled | boolean | no | Toggle automatic memory context |
Body metadata | object | no | Replacement metadata |
Body mcpConnectionIds | string[] | no | Complete replacement MCP list |
At least one field is required. There are no query parameters.
Response
Returns 200 OK with the complete updated Agent object.
Response schema: agentResponseSchema.
{
"id": "ag_1234567890ABCDEF",
"tenantId": "ten_1234567890ABCDEF",
"name": "Support Agent",
"model": "openrouter/auto",
"providerId": null,
"skills": [],
"tools": ["file_operation_sandbox"],
"sandboxId": "sb_1234567890ABCDEF",
"instructions": "Answer clearly.",
"memoryInjectionEnabled": true,
"userId": "",
"metadata": { "team": "support" },
"mcpConnectionIds": [],
"avatarUrl": null,
"version": 2,
"status": "active",
"createdAt": "2026-07-10T10:00:00Z",
"updatedAt": "2026-07-10T10:15:00Z"
}Errors
400 invalid_request for invalid/empty input, a duplicate name, or invalid Provider/Skill/tool selection. 404 not_found applies when the Agent is missing or foreign. 409 SANDBOX_REQUIRED applies when the effective state selects sandbox-backed file operations without an attachment; 409 SANDBOX_IN_USE applies when attaching a Sandbox used by another Agent; and 409 ADMIN_AGENT_MANAGED protects the Admin Agent. See REST errors.
cURL
curl --request PUT \
"$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"sandboxId":"sb_1234567890ABCDEF","tools":["file_operation_sandbox"],"metadata":{"team":"support"}}'SDK and related guides
SDK: update. See Agents and Build a chat endpoint.
DELETE /v1/agents/:agentId
Hard-deletes the Agent.
Request
Requires bearer authentication. agentId is a required ag_… path parameter. There are no query or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
Response
Returns 204 No Content with an empty body.
Errors
400 invalid_request for a malformed ID. 404 not_found when the Agent is missing or foreign. 409 ADMIN_AGENT_MANAGED protects the Admin Agent. See REST errors.
cURL
curl --request DELETE \
"$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: delete. See Agents and Build a chat endpoint.
POST /v1/agents/:agentId/disable
Disables an active Agent and rejects future Turns. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | Agent | Sets status to disabled; in-flight Turns finish. |
Response schema: agentSchema.
Errors
404 not_found; 409 ADMIN_AGENT_MANAGED for the Admin Agent. See REST errors.
cURL
curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/disable" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: disable. See Agents and Build a chat endpoint.
POST /v1/agents/:agentId/enable
Re-enables a disabled Agent. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | Agent | Sets status to active; skipped schedule fires are not replayed. |
Response schema: agentSchema.
Errors
404 not_found; 409 ADMIN_AGENT_MANAGED. See REST errors.
cURL
curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/enable" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: enable. See Agents and Build a chat endpoint.
POST /v1/agents/:agentId/avatar
Replaces the Agent's private avatar. API responses expose a short-lived signed avatarUrl, never the storage object key.
Request
Requires bearer authentication and multipart/form-data. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Parameter | Type | Required | Description |
|---|---|---|---|
Form file | file | yes | PNG, JPEG, or WebP, at most 512 KiB |
There are no query parameters.
Response
Returns 200 OK with the complete updated Agent object. avatarUrl is a short-lived signed URL.
Response schema: agentSchema.
Errors
400 invalid_request when file is missing. 413 invalid_request when it exceeds 512 KiB. 415 invalid_request for another media type. 404 not_found when the Agent is missing or foreign. 409 ADMIN_AGENT_MANAGED protects the Admin Agent. See REST errors.
cURL
curl --request POST \
"$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/avatar" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--form "file=@./avatar.webp;type=image/webp"SDK and related guides
SDK: upload-avatar. See Agents and Build a chat endpoint.
DELETE /v1/agents/:agentId/avatar
Removes the avatar and returns the updated Agent.
Request
Requires bearer authentication. agentId is a required ag_… path parameter. There are no query or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
Response
Returns 200 OK with the complete updated Agent object; avatarUrl is null.
Response schema: agentSchema.
Errors
400 invalid_request for a malformed ID. 404 not_found when the Agent is missing or foreign. 409 ADMIN_AGENT_MANAGED protects the Admin Agent. See REST errors.
cURL
curl --request DELETE \
"$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/avatar" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: remove-avatar. See Agents and Build a chat endpoint.
GET /v1/agents/:agentId/versions
Lists immutable Agent Versions newest first. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Location | Field | Required | Description |
|---|---|---|---|
| Query | cursor | no | Opaque backward-page cursor. |
| Query | limit | no | Page size; defaults to exactly 50. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | AgentVersionsResponse | Read-only. |
Use nextCursor for the next page.
Response schema: agentVersionsResponseSchema.
Errors
400 invalid_request; 404 not_found. See REST errors.
cURL
curl --get "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/versions" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--data-urlencode "limit=20"SDK and related guides
SDK: list-versions. See Agents and Build a chat endpoint.
GET /v1/agents/:agentId/versions/:version
Gets one immutable Agent Version. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path | version | yes | Positive Agent Version number. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | AgentVersion | Read-only; current referenced resources are not copied. |
Response schema: agentVersionSchema.
Errors
400 invalid_request; 404 AGENT_VERSION_NOT_FOUND. See REST errors.
cURL
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/versions/1" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: get-version. See Agents and Build a chat endpoint.
GET /v1/agents/:agentId/mcp-attachments
Lists the MCP Attachments selecting MCP tools for an Agent. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | McpAttachmentsResponse | Read-only. |
Response schema: mcpAttachmentsResponseSchema.
Errors
404 not_found. See REST errors.
cURL
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/mcp-attachments" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: list-mcp-attachments. See Agents and Build a chat endpoint.
PATCH /v1/agents/:agentId/mcp-attachments/:mcpConnectionId
Changes end-user fields forwarded through one MCP Attachment. The bearer credential's Tenant must own the Agent and every referenced resource.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path | mcpConnectionId | yes | MCP Connection ID. |
| Location | Field | Required | Description |
|---|---|---|---|
| Body | forwardUserId | no | Whether to forward userId. |
| Body | forwardedMetadataKeys | no | Unique metadata-key allowlist; at least one body field is required. |
| Header | Content-Type | yes | application/json. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | McpAttachmentResponse | Updates attachment forwarding only; it does not change access control. |
Response schema: mcpAttachmentResponseSchema.
Errors
400 invalid_request; 404 not_found. See REST errors.
cURL
curl --request PATCH "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/mcp-attachments/mcp_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"forwardUserId":true,"forwardedMetadataKeys":["locale"]}'SDK and related guides
SDK: update-mcp-attachment. See Agents and Build a chat endpoint.