Agents

post/projects/{project_id}/agents

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/agents
  • Auth: HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

ai_modelstring nullable

Preferred model identifier for the CLI. Some("") clears the stored value.

ai_providerstring nullable
ai_provider_key_idinteger nullable
api_keystring nullable

Plain-text API key — will be encrypted before storage

branch_prefixstring nullable
config_repo_branchstring nullable

Branch of the config repo to use (default: "main").

config_repo_urlstring nullable

Private config repo containing .claude/ directory (skills, MCP, plugins).

cooldown_minutesinteger nullable
daily_budget_centsinteger nullable
deliverablestring nullable
descriptionstring nullable
enabledboolean nullable
max_turnsinteger nullable
mcp_servers_configunknown
namestring nullable
promptstring nullable
sandbox_enabledboolean nullable
skills_configunknown
slugstring nullable
timeout_secondsinteger nullable
tools_configunknown
trigger_configunknown

Response

Agent created

ai_modelstring nullable

Preferred model for the CLI (e.g. "sonnet", "gpt-5-codex"). None means default.

ai_providerstring required
ai_provider_key_idinteger nullable
api_key_setboolean required

true if an API key is set; false otherwise.

branch_prefixstring required
config_repo_branchstring nullable

Branch of the config repo to use.

config_repo_urlstring nullable

Private config repo containing .claude/ directory (skills, MCP, plugins).

cooldown_minutesinteger required
created_atstring required
daily_budget_centsinteger required
deliverablestring required
descriptionstring nullable
enabledboolean required
idinteger required
max_turnsinteger required
mcp_servers_configunknown
namestring required
project_idinteger required
promptstring nullable
sandbox_enabledboolean nullable

None = use global sandbox setting, true = force on, false = force off

skills_configunknown
slugstring required
sourcestring required
timeout_secondsinteger required
tools_configunknown
trigger_configunknown required
updated_atstring required
webhook_tokenstring nullable

Secret token for the X-Webhook-Token header. Shown once when created, masked with *** prefix in subsequent reads.

webhook_urlstring nullable

Public webhook URL for triggering this agent externally. Only set when on: { webhook: true } is configured. Usage: POST {webhook_url} with header X-Webhook-Token: {webhook_token}

Changes

No recorded changes to this operation across all 50 revisions of this API.