v72

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0791438458.0 KB
Agents

Import an agent

Imports an agent from its on-disk folder representation (spec.yaml, instructions.md, skills/, subagents/) packaged as a zip, and creates or updates the agent. Inverse of the export flow: the folder-to-schema conversion runs server-side. The bundle must contain only regular files; symlinks are resolved by the caller at packaging time.

post/rest/api/v1/agents/{agent_id}/import

Path parameters

agent_idstring required

The ID of the agent to create or update.

The ID of the agent to create or update.

Query parameters

localestring

The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

timezoneOffsetinteger

The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.

Response

Success

status'CREATED' | 'UPDATED' | 'DRAFT_PREVIEW'

Outcome of the import for the target agent.

Example response

{
  "workflowResult": {
    "workflow": {
      "author": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      },
      "lastDraftSavedBy": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      },
      "lastUpdatedBy": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      }
    }
  }
}