Skip to main content
POST
Create an agent

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Headers

Idempotency-Key
string

Optional key that makes the request idempotent. Retrying with the same key returns the original response instead of repeating the operation; keys expire after 24 hours. Any string up to 256 characters. See Idempotency.

Maximum string length: 256
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

Request body for creating a new agent.

name
string
required

Display name for the agent.

description
null | string

A description of the agent's purpose.

Response

Created

An agent object. Agents organize related tasks under a single use case.

id
string
required

Unique identifier for the agent, prefixed with agt_.

Pattern: ^agt_
Example:

"agt_AbC123xYz456"

object
string
required

Always agent.

name
string
required

Display name for the agent.

description
null | string
required

Description of the agent's purpose.

tasks
object[]
required

Tasks associated with this agent.

created_at
string<date-time>
required

ISO 8601 timestamp of when the resource was created.

Example:

"2026-08-24T12:00:00Z"

updated_at
string<date-time>
required

ISO 8601 timestamp of when the resource was last updated.

Example:

"2026-08-24T12:00:00Z"

request_id
string
required

Unique identifier for the API request. Include this when contacting support.