Create Agent
/v1/agentsCreate a saved Agent at version 1. The body is strict JSON: unknown fields return 400. multi_agent must be omitted or null.
Headers
Optional. When omitted the service generates one, so a retried request can create a duplicate. Send your own stable key for retries.
Request body
JSON object.
Required model ID from the Models API, up to 200 characters. There is no default; omitting model returns 400. The examples use deepseek/deepseek-v4-flash.
Display name, up to 128 characters.
System instructions, up to 256 KiB.
Execution runtime: codex (default), claude, or mcode.
Skill references: {"skill_id": "skl_…", "version": null | "<version>"}. Up to 32. On a new binding, null pins the current default when the Agent is saved. For an existing binding, null preserves its pinned version; supply an explicit version to upgrade.
MCP references: {connection_id, server_label, allowed_tools, required}. Up to 32; server_label must be unique in the Agent.
Up to 64 function tools plus at most one web_search tool. Sessions currently require web_search mode disabled, and client-side function results are not supported yet.
format.type text or json_schema (with an object schema); verbosity low, medium, or high.
effort none, minimal, low, medium, high, xhigh, or max; summary concise, detailed, or auto.
auto (default), default, flex, priority, or fast.
Up to 16 string pairs; keys up to 64 and values up to 512 characters.
Longer description, up to 4096 characters.
Change note recorded on version 1.
Agent object
Returned by create, get, update, archive, unarchive, restore, and clone.
Agent ID with the agt_ prefix.
Always agent.
Current version. Every effective write creates a new version.
Compare-and-set token for PATCH, archive, unarchive, and restore.
active or archived.
Execution readiness of the current version. Sessions, Services, and Schedules need ready; a new Agent can briefly report pending.
codex, claude, or mcode.
private for your Agents; public for catalog entries.
Unix seconds. archived_at is null while active.