API Reference

Server-rendered reference for the checked-in OpenAPI spec. Browse the current endpoints below or inspect the raw `/api/v1/openapi.yaml` document.

Spec Overview

AgentContainer API

Public API for configuring agents with versioned runtimes and dispatching tasks.

Version

0.2.0

Endpoints

60

Base URL

http://localhost:3000

Local development

Authentication

bearerAuth

http bearer (API key)

Endpoints

Each operation below is rendered from the same OpenAPI file served at /api/v1/openapi.yaml.

API Group

Account

Account identity and platform billing state.

get/api/v1/accountAccount

Get account

Returns the account resolved from the bearer API key, including current platform credit balance and billing mode.

Requires bearer auth

Responses

200

Account details

application/json
{
  "id": "string", // Public account identifier resolved from the API key.
  "name": "string" | null,
  "email": "string" | null,
  "creditBalance": 123, // Current prepaid platform credit balance in USD.
  "billingMode": "standard" | "unlimited_grant", // Billing mode for the account. Unlimited-grant accounts are not blocked or charged by prepaid credit balance.
  "fileStorage": {
    "usedBytes": 123, // Current file storage usage in bytes, counted from live file records.
    "quotaBytes": 123, // Base file storage quota in bytes.
    "isEnforced": true, // Whether file storage quota enforcement applies to this account.
  },
  "checkpointStorage": {
    "usedBytes": 123, // Current managed runtime artifact storage usage in bytes. This includes retained task checkpoints, snapshots, and snapshot-backed agent versions; shared parent layers are counted once.
    "quotaBytes": 123, // Base managed runtime artifact storage quota in bytes.
    "isEnforced": true, // Whether managed runtime artifact storage quota enforcement applies to this account.
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Agents

Reusable workers with versioned runtime and behavior.

get/api/v1/agentsAgents

List agents

Lists your custom agents and platform-provided standard agents.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Agents successfully listed

application/json
{
  "data": [
    {
      "id": "string",
      "externalRevision": 123 | null,
      "name": "string",
      "description": "string" | null,
      "isStandard": true,
      "archivedAt": "2026-03-25T09:30:00.000Z" | null,
      "currentVersion": {
        "id": "string",
        "number": 123,
        "runtime": {
          "containerImage": "string",
          "agentRuntime": "pi",
        },
        "runtimeAvailable": true,
        "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
        "basePrompt": "string",
        "taskTitleInstructions": "string" | null,
        "skills": [
          {
            "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
            "sshKeyId": "string" | null,
          }
        ],
        "defaults": {
          "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
          "hasProviderApiKey": true, // Whether a provider API key is set on this version.
          "model": "string",
          "weakModel": "string" | null,
          "internetAccess": true,
          "maxRuntimeSeconds": 123,
          "maxRuntimePerTurnSeconds": 123 | null,
          "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
          "softFinishAfterSeconds": 123 | null,
          "hibernationEnabled": true,
          "maxTimePerHibernationCycle": 123 | null,
          "maxAccumulatedTime": 123 | null,
          "outputPolicy": {
            "mode": "any" | "none" | "at_least_one",
          } | {
            "mode": "named",
            "files": [
              {
                "name": "string",
                "description?": "string",
              }
            ],
          },
          "runtimeRegion": "any" | "eu",
        },
        "createdAt": "2026-03-25T09:30:00.000Z",
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agentsAgents

Create agent

Creates a reusable worker definition referencing a container. When externalId is supplied, repeated requests for the same API account update and return one stable agent identity.

Requires bearer auth

Request Body

application/jsonrequired
{
  "externalId?": "string", // Optional caller-owned identity. Reusing it for the same API account updates and returns the same agent instead of creating a duplicate.
  "externalRevision?": 123, // Optional monotonic revision for externalId writes. Requests older than the stored revision are ignored.
  "name": "string",
  "description?": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "basePrompt": "string",
  "taskTitleInstructions?": "string", // Optional system prompt for AI task title generation. When omitted, the default task title prompt is used. The task instructions are provided separately inside <task></task> tags.
  "defaults": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider. Falls back to user account default if not set.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "runtime?": "pi",
    "model": "string",
    "weakModel?": "string",
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "sessionTtlSeconds?": 123, // How long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Whether autonomous tasks created from this version may hibernate. Defaults to true.
    "maxTimePerHibernationCycle?": 123, // Maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Maximum cumulative hibernation time, in seconds, for a task run.
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ],
  "repositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Optional complete desired repository set for the new agent version. An empty array removes all repository attachments.
}

Responses

201

Agent created

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/agents/{agentId}Agents

Get agent

Requires bearer auth

Responses

200

Agent details

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
patch/api/v1/agents/{agentId}Agents

Update agent

Updates an agent. Execution changes create a new agent version.

Requires bearer auth

Request Body

application/jsonrequired
{
  "externalRevision?": 123, // Optional monotonic revision for agents created with externalId. Requests older than the stored revision are ignored.
  "name?": "string",
  "description?": "string",
  "runtime?": {
    "containerImage?": "string",
    "agentRuntime?": "pi",
  },
  "basePrompt?": "string",
  "taskTitleInstructions?": "string" | null, // Optional system prompt for AI task title generation. Set to null to clear custom instructions and use the default task title prompt. The task instructions are provided separately inside <task></task> tags.
  "defaults?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider. Falls back to user account default if not set.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "runtime?": "pi",
    "model": "string",
    "weakModel?": "string",
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "sessionTtlSeconds?": 123, // How long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Whether autonomous tasks created from this version may hibernate. Defaults to true.
    "maxTimePerHibernationCycle?": 123, // Maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Maximum cumulative hibernation time, in seconds, for a task run.
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ],
  "repositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Optional complete desired repository set for the new agent version. An empty array removes all repository attachments.
}

Responses

200

Agent updated

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/agents/{agentId}Agents

Archive agent

Soft-archives a custom agent.

Requires bearer auth

Responses

204

Agent archived

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agents/{agentId}/forkAgents

Fork agent

Forks a standard agent into your own custom agent.

Requires bearer auth

Request Body

application/jsonoptional
{
  "name?": "string",
  "description?": "string",
}

Responses

201

Agent forked

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/agents/{agentId}/versionsAgents

List agent versions

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Agent versions successfully listed

application/json
{
  "data": [
    {
      "id": "string",
      "number": 123,
      "runtime": {
        "containerImage": "string",
        "agentRuntime": "pi",
      },
      "runtimeAvailable": true,
      "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
      "basePrompt": "string",
      "taskTitleInstructions": "string" | null,
      "skills": [
        {
          "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
          "sshKeyId": "string" | null,
        }
      ],
      "defaults": {
        "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
        "hasProviderApiKey": true, // Whether a provider API key is set on this version.
        "model": "string",
        "weakModel": "string" | null,
        "internetAccess": true,
        "maxRuntimeSeconds": 123,
        "maxRuntimePerTurnSeconds": 123 | null,
        "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
        "softFinishAfterSeconds": 123 | null,
        "hibernationEnabled": true,
        "maxTimePerHibernationCycle": 123 | null,
        "maxAccumulatedTime": 123 | null,
        "outputPolicy": {
          "mode": "any" | "none" | "at_least_one",
        } | {
          "mode": "named",
          "files": [
            {
              "name": "string",
              "description?": "string",
            }
          ],
        },
        "runtimeRegion": "any" | "eu",
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/agents/{agentId}/versions/{versionId}Agents

Get agent version

Requires bearer auth

Responses

200

Agent version details

application/json
{
  "id": "string",
  "number": 123,
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "runtimeAvailable": true,
  "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
  "basePrompt": "string",
  "taskTitleInstructions": "string" | null,
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "defaults": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
    "hasProviderApiKey": true, // Whether a provider API key is set on this version.
    "model": "string",
    "weakModel": "string" | null,
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds": 123 | null,
    "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds": 123 | null,
    "hibernationEnabled": true,
    "maxTimePerHibernationCycle": 123 | null,
    "maxAccumulatedTime": 123 | null,
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agents/{agentId}/versions/{versionId}/release-runtimeAgents

Release agent version runtime

Irreversibly releases a historical managed runtime while preserving version metadata. The current version of an active agent and versions used by nonterminal tasks cannot be released.

Requires bearer auth

Responses

200

Runtime released

application/json
{
  "id": "string",
  "number": 123,
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "runtimeAvailable": true,
  "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
  "basePrompt": "string",
  "taskTitleInstructions": "string" | null,
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "defaults": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
    "hasProviderApiKey": true, // Whether a provider API key is set on this version.
    "model": "string",
    "weakModel": "string" | null,
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds": 123 | null,
    "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds": 123 | null,
    "hibernationEnabled": true,
    "maxTimePerHibernationCycle": 123 | null,
    "maxAccumulatedTime": 123 | null,
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Conversations

Message-based task sessions built on conversational task execution.

post/api/v1/agents/{agentId}/conversationsConversations

Create conversation

Creates a conversational task and queues the first user message. The response includes both the created task and the first message.

Requires bearer auth

Parameters

Header Params
Idempotency-Key
{
  "Idempotency-Key?": "string", // Caller-provided command key. Retrying the same effective request returns the original accepted result; reusing the key with a different request returns 409.
}

Request Body

application/jsonrequired
{
  "versionId?": "string",
  "instructions": "string", // Primary instructions for the conversational task. These are written to /workspace/task/TASK.md for the agent.
  "message": "string",
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "inputRepositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Additional repositories to clone into this conversation workspace. Each attachment can choose its own git ref, mount path, and optional setup script.
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ], // Additional skills to install into this conversation workspace after the agent version's skills.
  "metadata?": {
  },
  "overrides?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider override for this task.
    "runtime?": "pi", // Agent runtime override for this task.
    "basePrompt?": "string", // Per-task base prompt override. When set, this fully replaces the agent version base prompt for this task run.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // Reasoning effort for this task. Omit to retain the model or provider default; use none to explicitly disable reasoning where supported.
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123, // Maximum inference spend in USD for one conversational turn. Enforcement is observational and may overshoot by one in-flight provider call.
      "maxInferenceCostUsdTotal?": 123, // Maximum cumulative inference spend in USD for the task. Enforcement is observational and may overshoot by one in-flight provider call.
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Per-task override for whether hibernation is available.
    "maxTimePerHibernationCycle?": 123, // Per-task maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Per-task maximum cumulative hibernation time, in seconds, for this task run.
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
}

Responses

201

Conversation created

application/json
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
    "inputFiles": [
      {
        "fileId": "string",
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
      }
    ],
  },
  "message": {
    "id": "string",
    "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
    "effectivePolicy?": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
    "turnNumber": 123,
    "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
        "id": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
402

Insufficient platform credits to run compute

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/conversations/{taskId}/activitiesConversations

List conversation activities

Returns authenticated tool activity for a conversation, including original invocation input and retained history from retried runtime attempts. Tool input may contain commands, credentials, headers, request bodies, private paths, or user data and must be sanitized by trusted servers before browser exposure. fromTurn and toTurn are inclusive. Within a turn, group and order activities by attemptNumber and then startedSequence.

Requires bearer auth

Parameters

Query Params
limitcursororderfromTurntoTurn
{
  "limit?": 123, // Maximum number of items to return. Defaults to 50.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
  "order?": "asc" | "desc",
  "fromTurn?": 123, // Inclusive first conversation turn to return.
  "toTurn?": 123, // Inclusive last conversation turn to return.
}

Responses

200

Conversation activity history

application/json
{
  "data": [
    {
      "id": "string",
      "turnNumber": 123,
      "attemptNumber": 123, // Runtime attempt ordinal. Within a turn, group and order activities by attemptNumber before startedSequence.
      "startedSequence": 123, // Activity position within its runtime attempt and conversation turn; sequence values restart for each attempt and turn.
      "completedSequence": 123 | null, // Sequence of the terminal update within the same attempt and turn. It does not create a second activity or change the startedSequence position.
      "kind": "tool",
      "callId": "string",
      "toolKey": "string",
      "input": "__schema0" | null, // Original tool invocation input. This authenticated server-side field may contain commands, paths, credentials, headers, request bodies, or user data and must be sanitized before browser exposure.
      "inputOmittedReason": "not_recorded" | "too_large" | null, // Why input is null. not_recorded applies to historical or legacy-daemon activity; too_large means the serialized input exceeded 64 KiB.
      "status": "running" | "completed" | "failed",
      "errorCode": "tool_error" | "tool_aborted" | "tool_timeout" | null,
      "startedAt": "2026-03-25T09:30:00.000Z",
      "completedAt": "2026-03-25T09:30:00.000Z" | null,
      "durationMs": 123 | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/conversations/{taskId}/autonomousConversations

Toggle conversation autonomous mode

Requires bearer auth

Request Body

application/jsonrequired
{
  "enabled": true,
}

Responses

200

Updated conversation task and mode-switch event

application/json
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  },
  "event": {
    "id": "string",
    "kind": "mode_switched_to_autonomous" | "mode_switched_to_conversation" | "session_expired" | "hibernation_requested" | "hibernation_woken",
    "turnNumber": 123 | null,
    "message": "string",
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  } | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/conversations/{taskId}/eventsConversations

List conversation events

Returns stored non-chat conversation events such as autonomous mode switches and session expiry. Pass `stream=true` to receive a live SSE feed of task state, task events, conversation messages, and authenticated tool activity. The stream stays open while the task is resumable, including `awaiting_input` and `hibernating`, and emits `done` only after the task reaches `finished`, `failed`, `cancelled`, or `expired`. Activity input may contain sensitive execution data and must be sanitized before browser exposure. Activity frames are upserts keyed by id: replace the prior representation when the same id transitions from running to completed or failed. A client may receive a terminal activity without first observing its running frame.

Requires bearer auth

Parameters

Query Params
limitcursorstreamapiKey
{
  "limit?": 123, // Maximum number of items to return. Defaults to 50.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
  "stream?": true,
  "apiKey?": "string", // API key used to authenticate the SSE stream when `stream=true`. Supports browser EventSource clients that cannot send an Authorization header, but the stream includes sensitive tool input and must only be consumed in a trusted context. Ignored when stream is not true.
}

Responses

200

Conversation events listed

application/json
{
  "data": [
    {
      "id": "string",
      "kind": "mode_switched_to_autonomous" | "mode_switched_to_conversation" | "session_expired" | "hibernation_requested" | "hibernation_woken",
      "turnNumber": 123 | null,
      "message": "string",
      "metadata": {
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
text/event-stream
"string"
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/conversations/{taskId}/messagesConversations

List conversation messages

Returns conversation messages, including retained history from retried runtime attempts. For runtime-generated records, order within a turn by attemptNumber and then sequence. Legacy or non-runtime-generated records may have null attemptNumber and sequence; use createdAt as their fallback.

Requires bearer auth

Parameters

Query Params
limitcursororder
{
  "limit?": 123, // Maximum number of items to return. Defaults to 50.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
  "order?": "asc" | "desc", // Message traversal order. Defaults to asc, which starts at the oldest messages and paginates newer. Use desc to start at the latest page and paginate older messages; response data is still returned oldest-first within each page.
}

Responses

200

Conversation history

application/json
{
  "data": [
    {
      "id": "string",
      "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
      "effectivePolicy?": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
      "turnNumber": 123,
      "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
      "role": "user" | "assistant",
      "status": "queued" | "processed" | "created",
      "content": "string",
      "files": [
        {
          "filename": "string",
          "path": "string",
          "snapshot": "include" | "exclude",
          "id": "string",
          "contentType": "string" | null,
          "sizeBytes": 123 | null,
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "tokenUsage": {
      } | null,
      "costUsd": 123 | null,
      "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/conversations/{taskId}/messagesConversations

Send conversation message

Queues one user message as one future conversation turn. Optional overrides apply only to that turn; omitted values inherit the conversation policy resolved when the command is accepted.

Requires bearer auth

Parameters

Header Params
Idempotency-Key
{
  "Idempotency-Key?": "string", // Caller-provided command key. Retrying the same effective request returns the original accepted result; reusing the key with a different request returns 409.
}

Request Body

application/jsonrequired
{
  "replayOnly": true,
  "content?": "value",
  "inputFiles?": "value",
  "overrides?": "value",
} | {
  "replayOnly?": false,
  "content": "string",
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
}

Responses

200

Updated task state and created message

application/json
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  },
  "message": {
    "id": "string",
    "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
    "effectivePolicy?": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
    "turnNumber": 123,
    "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
        "id": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Files

Uploads and file relationships.

get/api/v1/agents/{agentId}/reference-filesFiles

List reference files for current agent version

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Reference files listed

application/json
{
  "data": [
    {
      "id": "string",
      "filename": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agents/{agentId}/reference-filesFiles

Attach reference files to agent

Attaches previously uploaded files to an agent, creating a new agent version.

Requires bearer auth

Request Body

application/jsonrequired
{
  "fileIds": [
    "string"
  ],
}

Responses

200

Reference files attached

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/uploads/completeFiles

Complete file upload

Finalizes a previously prepared upload after the file bytes have been sent to the returned upload URL.

Requires bearer auth

Request Body

application/jsonrequired
{
  "uploadId": "string",
  "storageId?": "string", // Required only for uploads prepared with method POST. For method PUT uploads, omit storageId.
}

Responses

201

File uploaded

application/json
{
  "id": "string",
  "filename": "string",
  "contentType": "string" | null,
  "sizeBytes": 123 | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/uploads/prepareFiles

Prepare file upload

Creates a scoped upload session and returns a direct upload URL.

Requires bearer auth

Request Body

application/jsonrequired
{
  "filename": "string",
  "contentType?": "string",
  "sizeBytes?": 123,
}

Responses

201

Upload prepared

application/json
{
  "uploadId": "string",
  "uploadUrl": "string",
  "method": "POST" | "PUT",
  "headers": {
  },
  "expiresAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Repositories

Reusable git remotes for task workspaces. Attached SSH credentials should be read-only deploy keys or equivalent least-privilege credentials.

get/api/v1/agents/{agentId}/repositoriesRepositories

List repositories for current agent version

Lists the repositories attached to the current agent version, including the git ref, workspace mount path, optional setup script, and any repository aliases.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Agent repositories listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
      "tag": "string",
      "mountingPoint": "string",
      "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agents/{agentId}/repositoriesRepositories

Attach repositories to agent

Attaches repositories to an agent, creating a new agent version. Each attachment can choose its own git ref, workspace mount path, and optional setup script.

Requires bearer auth

Request Body

application/jsonrequired
{
  "repositories": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ],
}

Responses

200

Repositories attached

application/json
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/agents/{agentId}/repositories/{repositoryId}Repositories

Detach repository from agent

Detaches a repository link from the current agent version by mounting point.

Requires bearer auth

Parameters

Query Params
mountingPoint *
{
  "mountingPoint": "string",
}

Responses

204

Repository detached from agent

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/conversations/{taskId}/repositoriesRepositories

List conversation repositories

Lists repositories attached directly to this conversation task. Agent-version repositories inherited by the conversation are not included.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Conversation repositories listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
      "tag": "string",
      "mountingPoint": "string",
      "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/conversations/{taskId}/repositoriesRepositories

Attach repositories to conversation

Attaches repositories to an existing conversation task for use on later turns. Attachments do not wake or restart the conversation by themselves.

Requires bearer auth

Request Body

application/jsonrequired
{
  "repositories": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ],
}

Responses

201

Repositories attached

application/json
[
  {
    "id": "string",
    "name": "string",
    "url": "string" | "string",
    "isStandard": true,
    "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
    "aliases": [
      {
        "name": "string",
        "target": "string",
      }
    ], // Command aliases exported by this repository. They become available when the repository is attached.
    "sshKeys": [
      {
        "id": "string",
        "name": "string",
        "description": "string" | null,
        "algorithm": "ed25519",
        "publicKey": "string",
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "createdAt": "2026-03-25T09:30:00.000Z",
    "tag": "string",
    "mountingPoint": "string",
    "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
  }
]
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/repositoriesRepositories

List repositories

Lists reusable repository definitions, including any saved setup-script path and aliases that can be reused when the repository is attached.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Repositories listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/repositoriesRepositories

Create repository

Creates a reusable git repository definition. Repositories can store reusable tooling metadata such as a saved setup-script path and command aliases. SSH keys attached for cloning should be read-only deploy keys or equivalent least-privilege credentials.

Requires bearer auth

Request Body

application/jsonrequired
{
  "name": "string",
  "url": "string",
  "sshKeyId?": "string", // Optional SSH key to attach for cloning. Use only read-only deploy keys or equivalent least-privilege credentials.
  "postCloneScriptPath?": "string", // Optional repository-relative script path saved on the repository for reuse. This path is metadata only and does not run unless an attachment explicitly sets setupScript.
  "aliases?": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Optional command aliases exported by this repository. Each alias points to a repository-relative executable path and becomes available when the repository is attached.
}

Responses

201

Repository created

application/json
{
  "id": "string",
  "name": "string",
  "url": "string" | "string",
  "isStandard": true,
  "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
  "aliases": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Command aliases exported by this repository. They become available when the repository is attached.
  "sshKeys": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/repositories/{repositoryId}Repositories

Delete repository

Deletes a reusable git repository definition when it is not in use.

Requires bearer auth

Responses

204

Repository deleted

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

SSH Keys

Server-generated SSH keypairs used for repository cloning. Configure them as read-only deploy keys or equivalent least-privilege credentials.

get/api/v1/ssh-keysSSH Keys

List SSH keys

Lists the SSH keys available on the account. Only public key material is returned.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

SSH keys listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/ssh-keysSSH Keys

Create SSH key

Generates and stores a new Ed25519 SSH keypair for repository cloning. The private key is never returned; responses include only the public key. Configure the public key on your git host as a read-only deploy key or equivalent least-privilege credential.

Requires bearer auth

Request Body

application/jsonrequired
{
  "name": "string",
  "description?": "string",
}

Responses

201

SSH key created

application/json
{
  "id": "string",
  "name": "string",
  "description": "string" | null,
  "algorithm": "ed25519",
  "publicKey": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/ssh-keys/{sshKeyId}SSH Keys

Get SSH key

Loads a single SSH key resource. Only public key material is returned.

Requires bearer auth

Responses

200

SSH key loaded

application/json
{
  "id": "string",
  "name": "string",
  "description": "string" | null,
  "algorithm": "ed25519",
  "publicKey": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
patch/api/v1/ssh-keys/{sshKeyId}SSH Keys

Update SSH key

Updates SSH key metadata only.

Requires bearer auth

Request Body

application/jsonrequired
{
  "name?": "string",
  "description?": "string",
}

Responses

200

SSH key updated

application/json
{
  "id": "string",
  "name": "string",
  "description": "string" | null,
  "algorithm": "ed25519",
  "publicKey": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/ssh-keys/{sshKeyId}SSH Keys

Delete SSH key

Deletes an SSH key.

Requires bearer auth

Responses

204

SSH key deleted

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/ssh-keys/{sshKeyId}/repositoriesSSH Keys

List repositories attached to SSH key

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Repositories attached to SSH key listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/ssh-keys/{sshKeyId}/repositoriesSSH Keys

Attach SSH key to repository

Attaches an SSH key to a repository.

Requires bearer auth

Request Body

application/jsonrequired
{
  "repositoryId": "string",
}

Responses

200

SSH key attached to repository

application/json
{
  "id": "string",
  "name": "string",
  "url": "string" | "string",
  "isStandard": true,
  "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
  "aliases": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Command aliases exported by this repository. They become available when the repository is attached.
  "sshKeys": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "createdAt": "2026-03-25T09:30:00.000Z",
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/ssh-keys/{sshKeyId}/repositories/{repositoryId}SSH Keys

Remove SSH key from repository

Requires bearer auth

Responses

204

SSH key removed from repository

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Snapshots

Immutable reusable runtimes derived from exact conversation turns.

post/api/v1/conversations/{taskId}/snapshotsSnapshots

Persist a conversation snapshot

Creates an immutable reusable runtime snapshot from the current or most recently completed conversation turn, including after the task switches to autonomous hibernation. Harness context is always removed.

Requires bearer auth

Parameters

Header Params
Idempotency-Key
{
  "Idempotency-Key?": "string", // Retries the same snapshot request safely. A key may be reused only with the same conversation, name, and TTL.
}

Request Body

application/jsonoptional
{
  "name?": "string",
  "ttlSeconds?": 123,
}

Responses

202

Snapshot creation accepted

application/json
{
  "id": "string",
  "name": "string" | null,
  "status": "pending_turn" | "processing" | "ready" | "failed" | "expired" | "deleted",
  "source": {
    "conversationId": "string",
    "turnNumber": 123,
  },
  "ttlSeconds": 123 | null,
  "storageBytes": 123 | null,
  "logicalBytes": 123 | null,
  "error": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "readyAt": "2026-03-25T09:30:00.000Z" | null,
  "expiresAt": "2026-03-25T09:30:00.000Z" | null,
  "failedAt": "2026-03-25T09:30:00.000Z" | null,
  "expiredAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
402

Insufficient platform credits to run compute

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/snapshotsSnapshots

List snapshots

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Snapshots listed

application/json
{
  "data": [
    {
      "id": "string",
      "name": "string" | null,
      "status": "pending_turn" | "processing" | "ready" | "failed" | "expired" | "deleted",
      "source": {
        "conversationId": "string",
        "turnNumber": 123,
      },
      "ttlSeconds": 123 | null,
      "storageBytes": 123 | null,
      "logicalBytes": 123 | null,
      "error": "string" | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "readyAt": "2026-03-25T09:30:00.000Z" | null,
      "expiresAt": "2026-03-25T09:30:00.000Z" | null,
      "failedAt": "2026-03-25T09:30:00.000Z" | null,
      "expiredAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/snapshots/{snapshotId}Snapshots

Get snapshot

Requires bearer auth

Responses

200

Snapshot details

application/json
{
  "id": "string",
  "name": "string" | null,
  "status": "pending_turn" | "processing" | "ready" | "failed" | "expired" | "deleted",
  "source": {
    "conversationId": "string",
    "turnNumber": 123,
  },
  "ttlSeconds": 123 | null,
  "storageBytes": 123 | null,
  "logicalBytes": 123 | null,
  "error": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "readyAt": "2026-03-25T09:30:00.000Z" | null,
  "expiresAt": "2026-03-25T09:30:00.000Z" | null,
  "failedAt": "2026-03-25T09:30:00.000Z" | null,
  "expiredAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/snapshots/{snapshotId}Snapshots

Delete snapshot

Removes the reusable snapshot reference. Runtime storage remains while an agent version or task still references it.

Requires bearer auth

Responses

204

Snapshot deleted

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Tasks

Task dispatch and task inspection.

get/api/v1/agents/{agentId}/tasksTasks

List tasks for agent

Requires bearer auth

Parameters

Query Params
statusmodelimitcursor
{
  "status?": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "mode?": "autonomous" | "conversation",
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Tasks listed

application/json
{
  "data": [
    {
      "mode": "autonomous" | "conversation",
      "id": "string",
      "agentId": "string",
      "agentName": "string",
      "agentVersionId": "string",
      "runtime": {
        "containerImage": "string",
        "agentRuntime": "pi",
      },
      "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
      "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
      "turnNumber": 123 | null,
      "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
      "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
      "title": "string",
      "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
      "runtimeRegion": "any" | "eu",
      "overrides": {
        "mode?": "autonomous" | "conversation",
        "basePrompt?": "string",
        "provider?": "string",
        "hasProviderApiKey?": true,
        "runtime?": "pi",
        "model?": "string",
        "weakModel?": "string",
        "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
        "internetAccess?": true,
        "maxRuntimeSeconds?": 123,
        "maxRuntimePerTurnSeconds?": 123,
        "usageLimits?": {
          "maxInferenceCostUsdPerTurn?": 123,
          "maxInferenceCostUsdTotal?": 123,
        },
        "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
        "softFinishAfterSeconds?": 123,
        "hibernationEnabled?": true,
        "maxTimePerHibernationCycle?": 123,
        "maxAccumulatedTime?": 123,
        "outputPolicy?": {
          "mode": "any" | "none" | "at_least_one",
        } | {
          "mode": "named",
          "files": [
            {
              "name": "string",
              "description?": "string",
            }
          ],
        },
        "runtimeRegion?": "any" | "eu",
      },
      "execution": {
        "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
        "model": "string",
        "weakModel": "string",
      },
      "skills": [
        {
          "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
          "sshKeyId": "string" | null,
        }
      ],
      "metadata": {
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
      "startedAt": "2026-03-25T09:30:00.000Z" | null,
      "completedAt": "2026-03-25T09:30:00.000Z" | null,
      "result": "string" | null,
      "error": "string" | null,
      "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
      "costUsd": 123 | null,
      "containerMinutes": 123 | null,
      "tokenUsage": {
      } | null,
      "acceptedCommand?": {
        "id": "string",
        "effectivePolicy": {
          "maxRuntimeSeconds": 123,
          "maxInferenceCostUsdPerTurn?": 123,
        },
      }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/agents/{agentId}/tasksTasks

Dispatch task

Dispatches a task to an agent. If `versionId` is omitted, the current agent version is used. Tasks can also attach additional repositories with their own git ref, mount path, and optional setup script.

Requires bearer auth

Parameters

Header Params
Idempotency-Key
{
  "Idempotency-Key?": "string", // Caller-provided command key. Retrying the same effective request returns the original accepted result; reusing the key with a different request returns 409.
}

Request Body

application/jsonrequired
{
  "versionId?": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "inputRepositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Additional repositories to clone into this task workspace. Each attachment can choose its own git ref, mount path, and optional setup script.
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ], // Additional skills to install into this task workspace after the agent version's skills.
  "metadata?": {
  },
  "overrides?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider override for this task.
    "runtime?": "pi", // Agent runtime override for this task.
    "basePrompt?": "string", // Per-task base prompt override. When set, this fully replaces the agent version base prompt for this task run.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // Reasoning effort for this task. Omit to retain the model or provider default; use none to explicitly disable reasoning where supported.
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123, // Maximum inference spend in USD for one conversational turn. Enforcement is observational and may overshoot by one in-flight provider call.
      "maxInferenceCostUsdTotal?": 123, // Maximum cumulative inference spend in USD for the task. Enforcement is observational and may overshoot by one in-flight provider call.
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Per-task override for whether hibernation is available.
    "maxTimePerHibernationCycle?": 123, // Per-task maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Per-task maximum cumulative hibernation time, in seconds, for this task run.
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
}

Responses

201

Task created

application/json
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  "inputFiles": [
    {
      "fileId": "string",
      "filename": "string",
      "path": "string",
      "snapshot": "include" | "exclude",
    }
  ],
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
402

Insufficient platform credits to run compute

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/tasks/{taskId}Tasks

Get task

Requires bearer auth

Responses

200

Task details

application/json
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  "inputFiles": [
    {
      "fileId": "string",
      "filename": "string",
      "path": "string",
      "snapshot": "include" | "exclude",
    }
  ],
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/tasks/{taskId}/cancelTasks

Cancel task

Requires bearer auth

Responses

200

Task cancellation requested

application/json
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/tasks/{taskId}/filesTasks

List task output files

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 20.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Task output files listed

application/json
{
  "data": [
    {
      "id": "string",
      "filename": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "outputName": "string" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/tasks/{taskId}/files/{fileId}Tasks

Download task file

Requires bearer auth

Responses

200

File bytes

application/octet-stream
"string"
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/tasks/{taskId}/logsTasks

List task logs

Returns daemon and Claude log entries for a task in reverse chronological order.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 50.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Task logs listed

application/json
{
  "data": [
    {
      "attemptNumber": 123,
      "source": "daemon" | "agent_stdout" | "agent_stderr",
      "message": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/tasks/{taskId}/wakeTasks

Wake a hibernating autonomous task

Accepts an idempotent wake command. Optional overrides apply only to the resulting execution attempt; omitted values inherit the task policy resolved when the command is accepted.

Requires bearer auth

Parameters

Header Params
Idempotency-Key
{
  "Idempotency-Key?": "string", // Caller-provided command key. Retrying the same effective request returns the original accepted result; reusing the key with a different request returns 409.
}

Request Body

application/jsonrequired
{
  "kind": "message" | "external_wake",
  "idempotencyKey?": "string",
  "replayOnly": true,
  "message?": "value",
  "wakeDueId?": "value",
  "overrides?": "value",
} | {
  "kind": "message",
  "wakeDueId?": "string",
  "idempotencyKey?": "string",
  "replayOnly?": false,
  "message": "string",
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
} | {
  "kind": "external_wake",
  "wakeDueId?": "string",
  "idempotencyKey?": "string",
  "replayOnly?": false,
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
}

Responses

200

Updated task

application/json
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
409

Resource state conflicts with the requested operation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/wake-dueTasks

List timed wakes awaiting admission

Returns stable wake-due records in ascending due-time order. Use this cursor-paginated feed to reconcile missed task.wake_due webhooks before explicitly admitting a wake.

Requires bearer auth

Parameters

Query Params
statuslimitcursor
{
  "status?": "due" | "consumed" | "expired" | "superseded",
  "limit?": 123, // Maximum number of items to return. Defaults to 100.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Wake-due records listed

application/json
{
  "data": [
    {
      "id": "string",
      "taskId": "string",
      "status": "due" | "consumed" | "expired" | "superseded",
      "dueAt": "2026-03-25T09:30:00.000Z",
      "expiresAt": "2026-03-25T09:30:00.000Z",
      "terminalAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Other

get/api/v1/openapi.yamlOther

Raw OpenAPI spec

Returns the raw YAML OpenAPI specification for this API.

No auth required

Responses

200

Raw OpenAPI YAML

application/yaml
"string"
API Group

Usage

get/api/v1/usage-eventsUsage

List finalized usage events

Returns immutable inference and active-runtime usage dispositions in finalization order. Use the cursor to recover missed webhooks without double counting stable event IDs.

Requires bearer auth

Parameters

Query Params
limitcursor
{
  "limit?": 123, // Maximum number of items to return. Defaults to 100.
  "cursor?": "string", // Opaque pagination cursor from a previous response.
}

Responses

200

Usage events listed

application/json
{
  "data": [
    {
      "id": "string",
      "accountId": "string",
      "taskId": "string",
      "commandIds": [
        "string"
      ],
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      } | null,
      "turnNumber": 123 | null,
      "attemptNumber": 123 | null,
      "executionSequenceTerminal": true | null, // True when no later automatic attempt remains for this execution sequence; false while a later automatic attempt exists; null only for legacy events.
      "executionSequenceUsageUnitCount": 123 | null, // Number of task-attempt usage units expected in this execution sequence through this event's attempt; null only for legacy events.
      "component": "inference" | "runtime",
      "disposition": "final" | "unavailable" | "correction",
      "correctsUsageEventId": "string" | null,
      "outcome": "succeeded" | "awaiting_input" | "failed" | "hibernated" | "cancelled_user" | "cancelled_system",
      "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
      "inference": {
        "provider": "string" | null,
        "model": "string" | null,
        "tokenUsage": {
        } | null,
        "tokenStatus": "complete" | "partial" | "unavailable",
        "costUsdMicros": 123 | null,
        "costProvenance": "pi_reported" | null,
        "costPricingVersion": "string" | null,
      } | null,
      "runtime": {
        "durationMs": 123 | null,
      } | null,
      "occurredAt": "2026-03-25T09:30:00.000Z",
      "finalizedAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
API Group

Webhooks

get/api/v1/webhook-deliveriesWebhooks

List recent webhook deliveries

Lists recent webhook delivery records for debugging. Results are intentionally limited to recent deliveries, not a full audit-log pagination surface.

Requires bearer auth

Parameters

Query Params
webhookIdlimit
{
  "webhookId?": "string", // Optional webhook target ID to filter deliveries.
  "limit?": 123, // Maximum number of recent deliveries. Defaults to 10.
}

Responses

200

Webhook deliveries listed

application/json
{
  "data": [
    {
      "id": "string",
      "webhookId": "string" | null,
      "webhookUrl": "string" | null,
      "eventId": "string" | null,
      "eventType": "string" | null,
      "taskId": "string" | null,
      "status": "string",
      "attemptCount": 123,
      "retryCount": 123,
      "lastStatusCode": 123 | null,
      "lastError": "string" | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "deliveredAt": "2026-03-25T09:30:00.000Z" | null,
      "nextRetryAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/webhook-deliveries/{deliveryId}/resendWebhooks

Resend webhook delivery

Queues a new delivery for the same stored webhook event payload and target. Resend is allowed for any recent delivery while the target is active.

Requires bearer auth

Responses

200

Webhook delivery resent

application/json
{
  "id": "string",
  "webhookId": "string" | null,
  "webhookUrl": "string" | null,
  "eventId": "string" | null,
  "eventType": "string" | null,
  "taskId": "string" | null,
  "status": "string",
  "attemptCount": 123,
  "retryCount": 123,
  "lastStatusCode": 123 | null,
  "lastError": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "deliveredAt": "2026-03-25T09:30:00.000Z" | null,
  "nextRetryAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/webhooksWebhooks

List webhooks

Lists non-deleted webhook targets configured for the account. Webhook deliveries use Standard Webhooks-style headers: webhook-id, webhook-timestamp, and webhook-signature.

Requires bearer auth

Responses

200

Webhooks listed

application/json
{
  "data": [
    {
      "id": "string",
      "url": "string",
      "eventTypes": [
        "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
      ],
      "isActive": true,
      "secretPrefix": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
      "updatedAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/webhooksWebhooks

Create webhook

Creates a webhook target URL for task lifecycle events. The signing secret is returned only in this response; store it in your receiver and verify webhook-id, webhook-timestamp, and webhook-signature on each delivery.

Requires bearer auth

Request Body

application/jsonrequired
{
  "url": "string",
  "eventTypes?": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ], // Lifecycle event types to deliver. Omit to subscribe to all supported lifecycle events.
}

Responses

201

Webhook created

application/json
{
  "webhook": {
    "id": "string",
    "url": "string",
    "eventTypes": [
      "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
    ],
    "isActive": true,
    "secretPrefix": "string",
    "createdAt": "2026-03-25T09:30:00.000Z",
    "updatedAt": "2026-03-25T09:30:00.000Z" | null,
  },
  "secret": "string", // Signing secret returned only immediately after creation or rotation.
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
get/api/v1/webhooks/{webhookId}Webhooks

Get webhook

Loads a webhook target. The full signing secret is not returned after creation or rotation.

Requires bearer auth

Responses

200

Webhook loaded

application/json
{
  "id": "string",
  "url": "string",
  "eventTypes": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ],
  "isActive": true,
  "secretPrefix": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
  "updatedAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
patch/api/v1/webhooks/{webhookId}Webhooks

Update webhook

Updates a webhook target URL, selected lifecycle event types, or active state. URL updates keep the existing signing secret.

Requires bearer auth

Request Body

application/jsonrequired
{
  "url?": "string",
  "eventTypes?": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ],
  "isActive?": true,
}

Responses

200

Webhook updated

application/json
{
  "id": "string",
  "url": "string",
  "eventTypes": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ],
  "isActive": true,
  "secretPrefix": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
  "updatedAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
delete/api/v1/webhooks/{webhookId}Webhooks

Delete webhook

Deletes a webhook target from the public API and disables future deliveries. Recent delivery records may remain available for debugging.

Requires bearer auth

Responses

204

Webhook deleted

No response body defined.

401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/webhooks/{webhookId}/rotate-secretWebhooks

Rotate webhook secret

Rotates the signing secret for a webhook target. The new secret is returned only in this response.

Requires bearer auth

Responses

200

Webhook secret rotated

application/json
{
  "webhook": {
    "id": "string",
    "url": "string",
    "eventTypes": [
      "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
    ],
    "isActive": true,
    "secretPrefix": "string",
    "createdAt": "2026-03-25T09:30:00.000Z",
    "updatedAt": "2026-03-25T09:30:00.000Z" | null,
  },
  "secret": "string", // Signing secret returned only immediately after creation or rotation.
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
post/api/v1/webhooks/{webhookId}/testWebhooks

Send test webhook

Sends a manual webhook.test event to an active webhook target. This event type is not configurable and is never sent automatically.

Requires bearer auth

Responses

200

Test webhook queued

application/json
{
  "id": "string",
  "webhookId": "string" | null,
  "webhookUrl": "string" | null,
  "eventId": "string" | null,
  "eventType": "string" | null,
  "taskId": "string" | null,
  "status": "string",
  "attemptCount": 123,
  "retryCount": 123,
  "lastStatusCode": 123 | null,
  "lastError": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "deliveredAt": "2026-03-25T09:30:00.000Z" | null,
  "nextRetryAt": "2026-03-25T09:30:00.000Z" | null,
}
401

Missing or invalid API key

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
404

Resource not found

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}
422

Request failed validation

application/json
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}

Schemas

Component schemas exposed by the spec for request and response payloads.

Account

object
Schema Shape
{
  "id": "string", // Public account identifier resolved from the API key.
  "name": "string" | null,
  "email": "string" | null,
  "creditBalance": 123, // Current prepaid platform credit balance in USD.
  "billingMode": "standard" | "unlimited_grant", // Billing mode for the account. Unlimited-grant accounts are not blocked or charged by prepaid credit balance.
  "fileStorage": {
    "usedBytes": 123, // Current file storage usage in bytes, counted from live file records.
    "quotaBytes": 123, // Base file storage quota in bytes.
    "isEnforced": true, // Whether file storage quota enforcement applies to this account.
  },
  "checkpointStorage": {
    "usedBytes": 123, // Current managed runtime artifact storage usage in bytes. This includes retained task checkpoints, snapshots, and snapshot-backed agent versions; shared parent layers are counted once.
    "quotaBytes": 123, // Base managed runtime artifact storage quota in bytes.
    "isEnforced": true, // Whether managed runtime artifact storage quota enforcement applies to this account.
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}

Agent

object
Schema Shape
{
  "id": "string",
  "externalRevision": 123 | null,
  "name": "string",
  "description": "string" | null,
  "isStandard": true,
  "archivedAt": "2026-03-25T09:30:00.000Z" | null,
  "currentVersion": {
    "id": "string",
    "number": 123,
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "runtimeAvailable": true,
    "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
    "basePrompt": "string",
    "taskTitleInstructions": "string" | null,
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "defaults": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
      "hasProviderApiKey": true, // Whether a provider API key is set on this version.
      "model": "string",
      "weakModel": "string" | null,
      "internetAccess": true,
      "maxRuntimeSeconds": 123,
      "maxRuntimePerTurnSeconds": 123 | null,
      "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds": 123 | null,
      "hibernationEnabled": true,
      "maxTimePerHibernationCycle": 123 | null,
      "maxAccumulatedTime": 123 | null,
      "outputPolicy": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion": "any" | "eu",
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}

AgentVersion

object
Schema Shape
{
  "id": "string",
  "number": 123,
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "runtimeAvailable": true,
  "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
  "basePrompt": "string",
  "taskTitleInstructions": "string" | null,
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "defaults": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
    "hasProviderApiKey": true, // Whether a provider API key is set on this version.
    "model": "string",
    "weakModel": "string" | null,
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds": 123 | null,
    "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds": 123 | null,
    "hibernationEnabled": true,
    "maxTimePerHibernationCycle": 123 | null,
    "maxAccumulatedTime": 123 | null,
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}

AgentRuntime

object
Schema Shape
{
  "containerImage": "string",
  "agentRuntime": "pi",
}

AgentVersionDefaults

object
Schema Shape
{
  "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
  "hasProviderApiKey": true, // Whether a provider API key is set on this version.
  "model": "string",
  "weakModel": "string" | null,
  "internetAccess": true,
  "maxRuntimeSeconds": 123,
  "maxRuntimePerTurnSeconds": 123 | null,
  "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
  "softFinishAfterSeconds": 123 | null,
  "hibernationEnabled": true,
  "maxTimePerHibernationCycle": 123 | null,
  "maxAccumulatedTime": 123 | null,
  "outputPolicy": {
    "mode": "any" | "none" | "at_least_one",
  } | {
    "mode": "named",
    "files": [
      {
        "name": "string",
        "description?": "string",
      }
    ],
  },
  "runtimeRegion": "any" | "eu",
}

Snapshot

object
Schema Shape
{
  "id": "string",
  "name": "string" | null,
  "status": "pending_turn" | "processing" | "ready" | "failed" | "expired" | "deleted",
  "source": {
    "conversationId": "string",
    "turnNumber": 123,
  },
  "ttlSeconds": 123 | null,
  "storageBytes": 123 | null,
  "logicalBytes": 123 | null,
  "error": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "readyAt": "2026-03-25T09:30:00.000Z" | null,
  "expiresAt": "2026-03-25T09:30:00.000Z" | null,
  "failedAt": "2026-03-25T09:30:00.000Z" | null,
  "expiredAt": "2026-03-25T09:30:00.000Z" | null,
}

Task

object
Schema Shape
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
}

TaskDetail

object
Schema Shape
{
  "mode": "autonomous" | "conversation",
  "id": "string",
  "agentId": "string",
  "agentName": "string",
  "agentVersionId": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
  "turnNumber": 123 | null,
  "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
  "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
  "title": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "runtimeRegion": "any" | "eu",
  "overrides": {
    "mode?": "autonomous" | "conversation",
    "basePrompt?": "string",
    "provider?": "string",
    "hasProviderApiKey?": true,
    "runtime?": "pi",
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
      "maxInferenceCostUsdTotal?": 123,
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true,
    "maxTimePerHibernationCycle?": 123,
    "maxAccumulatedTime?": 123,
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
  "execution": {
    "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
    "model": "string",
    "weakModel": "string",
  },
  "skills": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId": "string" | null,
    }
  ],
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
  "startedAt": "2026-03-25T09:30:00.000Z" | null,
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "result": "string" | null,
  "error": "string" | null,
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
  "acceptedCommand?": {
    "id": "string",
    "effectivePolicy": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    },
  }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  "inputFiles": [
    {
      "fileId": "string",
      "filename": "string",
      "path": "string",
      "snapshot": "include" | "exclude",
    }
  ],
}

TaskExecution

object
Schema Shape
{
  "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
  "model": "string",
  "weakModel": "string",
}

CommandEffectivePolicy

object
Schema Shape
{
  "maxRuntimeSeconds": 123,
  "maxInferenceCostUsdPerTurn?": 123,
}

AcceptedCommand

object
Schema Shape
{
  "id": "string",
  "effectivePolicy": {
    "maxRuntimeSeconds": 123,
    "maxInferenceCostUsdPerTurn?": 123,
  },
}

TaskResponseOverrides

object
Schema Shape
{
  "mode?": "autonomous" | "conversation",
  "basePrompt?": "string",
  "provider?": "string",
  "hasProviderApiKey?": true,
  "runtime?": "pi",
  "model?": "string",
  "weakModel?": "string",
  "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
  "internetAccess?": true,
  "maxRuntimeSeconds?": 123,
  "maxRuntimePerTurnSeconds?": 123,
  "usageLimits?": {
    "maxInferenceCostUsdPerTurn?": 123,
    "maxInferenceCostUsdTotal?": 123,
  },
  "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
  "softFinishAfterSeconds?": 123,
  "hibernationEnabled?": true,
  "maxTimePerHibernationCycle?": 123,
  "maxAccumulatedTime?": 123,
  "outputPolicy?": {
    "mode": "any" | "none" | "at_least_one",
  } | {
    "mode": "named",
    "files": [
      {
        "name": "string",
        "description?": "string",
      }
    ],
  },
  "runtimeRegion?": "any" | "eu",
}

File

object
Schema Shape
{
  "id": "string",
  "filename": "string",
  "contentType": "string" | null,
  "sizeBytes": 123 | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
}

Repository

object
Schema Shape
{
  "id": "string",
  "name": "string",
  "url": "string" | "string",
  "isStandard": true,
  "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
  "aliases": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Command aliases exported by this repository. They become available when the repository is attached.
  "sshKeys": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "createdAt": "2026-03-25T09:30:00.000Z",
}

SshKey

object
Schema Shape
{
  "id": "string",
  "name": "string",
  "description": "string" | null,
  "algorithm": "ed25519",
  "publicKey": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
}

AttachedRepository

object
Schema Shape
{
  "id": "string",
  "name": "string",
  "url": "string" | "string",
  "isStandard": true,
  "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
  "aliases": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Command aliases exported by this repository. They become available when the repository is attached.
  "sshKeys": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "createdAt": "2026-03-25T09:30:00.000Z",
  "tag": "string",
  "mountingPoint": "string",
  "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
}

TaskFile

object
Schema Shape
{
  "id": "string",
  "filename": "string",
  "contentType": "string" | null,
  "sizeBytes": 123 | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "outputName": "string" | null,
}

TaskLogEntry

object
Schema Shape
{
  "attemptNumber": 123,
  "source": "daemon" | "agent_stdout" | "agent_stderr",
  "message": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
}

TaskMessage

object
Schema Shape
{
  "id": "string",
  "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
  "effectivePolicy?": {
    "maxRuntimeSeconds": 123,
    "maxInferenceCostUsdPerTurn?": 123,
  } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
  "turnNumber": 123,
  "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
  "role": "user" | "assistant",
  "status": "queued" | "processed" | "created",
  "content": "string",
  "files": [
    {
      "filename": "string",
      "path": "string",
      "snapshot": "include" | "exclude",
      "id": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "tokenUsage": {
  } | null,
  "costUsd": 123 | null,
  "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
  "createdAt": "2026-03-25T09:30:00.000Z",
}

TaskEvent

object
Schema Shape
{
  "id": "string",
  "kind": "mode_switched_to_autonomous" | "mode_switched_to_conversation" | "session_expired" | "hibernation_requested" | "hibernation_woken",
  "turnNumber": 123 | null,
  "message": "string",
  "metadata": {
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}

TaskActivity

object
Schema Shape
{
  "id": "string",
  "turnNumber": 123,
  "attemptNumber": 123, // Runtime attempt ordinal. Within a turn, group and order activities by attemptNumber before startedSequence.
  "startedSequence": 123, // Activity position within its runtime attempt and conversation turn; sequence values restart for each attempt and turn.
  "completedSequence": 123 | null, // Sequence of the terminal update within the same attempt and turn. It does not create a second activity or change the startedSequence position.
  "kind": "tool",
  "callId": "string",
  "toolKey": "string",
  "input": "__schema0" | null, // Original tool invocation input. This authenticated server-side field may contain commands, paths, credentials, headers, request bodies, or user data and must be sanitized before browser exposure.
  "inputOmittedReason": "not_recorded" | "too_large" | null, // Why input is null. not_recorded applies to historical or legacy-daemon activity; too_large means the serialized input exceeded 64 KiB.
  "status": "running" | "completed" | "failed",
  "errorCode": "tool_error" | "tool_aborted" | "tool_timeout" | null,
  "startedAt": "2026-03-25T09:30:00.000Z",
  "completedAt": "2026-03-25T09:30:00.000Z" | null,
  "durationMs": 123 | null,
}

Webhook

object
Schema Shape
{
  "id": "string",
  "url": "string",
  "eventTypes": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ],
  "isActive": true,
  "secretPrefix": "string",
  "createdAt": "2026-03-25T09:30:00.000Z",
  "updatedAt": "2026-03-25T09:30:00.000Z" | null,
}

WebhookWithSecret

object
Schema Shape
{
  "webhook": {
    "id": "string",
    "url": "string",
    "eventTypes": [
      "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
    ],
    "isActive": true,
    "secretPrefix": "string",
    "createdAt": "2026-03-25T09:30:00.000Z",
    "updatedAt": "2026-03-25T09:30:00.000Z" | null,
  },
  "secret": "string", // Signing secret returned only immediately after creation or rotation.
}

WebhookDelivery

object
Schema Shape
{
  "id": "string",
  "webhookId": "string" | null,
  "webhookUrl": "string" | null,
  "eventId": "string" | null,
  "eventType": "string" | null,
  "taskId": "string" | null,
  "status": "string",
  "attemptCount": 123,
  "retryCount": 123,
  "lastStatusCode": 123 | null,
  "lastError": "string" | null,
  "createdAt": "2026-03-25T09:30:00.000Z",
  "deliveredAt": "2026-03-25T09:30:00.000Z" | null,
  "nextRetryAt": "2026-03-25T09:30:00.000Z" | null,
}

WakeDue

object
Schema Shape
{
  "id": "string",
  "taskId": "string",
  "status": "due" | "consumed" | "expired" | "superseded",
  "dueAt": "2026-03-25T09:30:00.000Z",
  "expiresAt": "2026-03-25T09:30:00.000Z",
  "terminalAt": "2026-03-25T09:30:00.000Z" | null,
}

AttachedRepositoriesResponse

array
Schema Shape
[
  {
    "id": "string",
    "name": "string",
    "url": "string" | "string",
    "isStandard": true,
    "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
    "aliases": [
      {
        "name": "string",
        "target": "string",
      }
    ], // Command aliases exported by this repository. They become available when the repository is attached.
    "sshKeys": [
      {
        "id": "string",
        "name": "string",
        "description": "string" | null,
        "algorithm": "ed25519",
        "publicKey": "string",
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "createdAt": "2026-03-25T09:30:00.000Z",
    "tag": "string",
    "mountingPoint": "string",
    "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
  }
]

PreparedUpload

object
Schema Shape
{
  "uploadId": "string",
  "uploadUrl": "string",
  "method": "POST" | "PUT",
  "headers": {
  },
  "expiresAt": "2026-03-25T09:30:00.000Z" | null,
}

PageInfo

object
Schema Shape
{
  "hasMore": true,
  "nextCursor": "string" | null,
}

OutputDescriptor

object
Schema Shape
{
  "name": "string",
  "description?": "string",
}

OutputPolicy

oneOf
Schema Shape
{
  "mode": "any" | "none" | "at_least_one",
} | {
  "mode": "named",
  "files": [
    {
      "name": "string",
      "description?": "string",
    }
  ],
}

ErrorResponse

object
Schema Shape
{
  "error": {
    "code": "string",
    "message": "string",
    "[key: string]": "value",
  },
}

CreateAgentRequest

object
Schema Shape
{
  "externalId?": "string", // Optional caller-owned identity. Reusing it for the same API account updates and returns the same agent instead of creating a duplicate.
  "externalRevision?": 123, // Optional monotonic revision for externalId writes. Requests older than the stored revision are ignored.
  "name": "string",
  "description?": "string",
  "runtime": {
    "containerImage": "string",
    "agentRuntime": "pi",
  },
  "basePrompt": "string",
  "taskTitleInstructions?": "string", // Optional system prompt for AI task title generation. When omitted, the default task title prompt is used. The task instructions are provided separately inside <task></task> tags.
  "defaults": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider. Falls back to user account default if not set.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "runtime?": "pi",
    "model": "string",
    "weakModel?": "string",
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "sessionTtlSeconds?": 123, // How long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Whether autonomous tasks created from this version may hibernate. Defaults to true.
    "maxTimePerHibernationCycle?": 123, // Maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Maximum cumulative hibernation time, in seconds, for a task run.
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ],
  "repositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Optional complete desired repository set for the new agent version. An empty array removes all repository attachments.
}

CreateRepositoryRequest

object
Schema Shape
{
  "name": "string",
  "url": "string",
  "sshKeyId?": "string", // Optional SSH key to attach for cloning. Use only read-only deploy keys or equivalent least-privilege credentials.
  "postCloneScriptPath?": "string", // Optional repository-relative script path saved on the repository for reuse. This path is metadata only and does not run unless an attachment explicitly sets setupScript.
  "aliases?": [
    {
      "name": "string",
      "target": "string",
    }
  ], // Optional command aliases exported by this repository. Each alias points to a repository-relative executable path and becomes available when the repository is attached.
}

CreateSnapshotRequest

object
Schema Shape
{
  "name?": "string",
  "ttlSeconds?": 123,
}

CreateSshKeyRequest

object
Schema Shape
{
  "name": "string",
  "description?": "string",
}

UpdateAgentRequest

object
Schema Shape
{
  "externalRevision?": 123, // Optional monotonic revision for agents created with externalId. Requests older than the stored revision are ignored.
  "name?": "string",
  "description?": "string",
  "runtime?": {
    "containerImage?": "string",
    "agentRuntime?": "pi",
  },
  "basePrompt?": "string",
  "taskTitleInstructions?": "string" | null, // Optional system prompt for AI task title generation. Set to null to clear custom instructions and use the default task title prompt. The task instructions are provided separately inside <task></task> tags.
  "defaults?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider. Falls back to user account default if not set.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "runtime?": "pi",
    "model": "string",
    "weakModel?": "string",
    "internetAccess": true,
    "maxRuntimeSeconds": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "sessionTtlSeconds?": 123, // How long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Whether autonomous tasks created from this version may hibernate. Defaults to true.
    "maxTimePerHibernationCycle?": 123, // Maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Maximum cumulative hibernation time, in seconds, for a task run.
    "outputPolicy": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion": "any" | "eu",
  },
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ],
  "repositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Optional complete desired repository set for the new agent version. An empty array removes all repository attachments.
}

UpdateSshKeyRequest

object
Schema Shape
{
  "name?": "string",
  "description?": "string",
}

AgentDefaults

object
Schema Shape
{
  "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider. Falls back to user account default if not set.
  "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
  "runtime?": "pi",
  "model": "string",
  "weakModel?": "string",
  "internetAccess": true,
  "maxRuntimeSeconds": 123,
  "maxRuntimePerTurnSeconds?": 123,
  "sessionTtlSeconds?": 123, // How long, in seconds, a conversational task may remain idle while awaiting input before it expires.
  "softFinishAfterSeconds?": 123,
  "hibernationEnabled?": true, // Whether autonomous tasks created from this version may hibernate. Defaults to true.
  "maxTimePerHibernationCycle?": 123, // Maximum duration, in seconds, for a single hibernation request.
  "maxAccumulatedTime?": 123, // Maximum cumulative hibernation time, in seconds, for a task run.
  "outputPolicy": {
    "mode": "any" | "none" | "at_least_one",
  } | {
    "mode": "named",
    "files": [
      {
        "name": "string",
        "description?": "string",
      }
    ],
  },
  "runtimeRegion": "any" | "eu",
}

ForkResourceRequest

object
Schema Shape
{
  "name?": "string",
  "description?": "string",
}

CreateTaskRequest

object
Schema Shape
{
  "versionId?": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "inputRepositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Additional repositories to clone into this task workspace. Each attachment can choose its own git ref, mount path, and optional setup script.
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ], // Additional skills to install into this task workspace after the agent version's skills.
  "metadata?": {
  },
  "overrides?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider override for this task.
    "runtime?": "pi", // Agent runtime override for this task.
    "basePrompt?": "string", // Per-task base prompt override. When set, this fully replaces the agent version base prompt for this task run.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // Reasoning effort for this task. Omit to retain the model or provider default; use none to explicitly disable reasoning where supported.
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123, // Maximum inference spend in USD for one conversational turn. Enforcement is observational and may overshoot by one in-flight provider call.
      "maxInferenceCostUsdTotal?": 123, // Maximum cumulative inference spend in USD for the task. Enforcement is observational and may overshoot by one in-flight provider call.
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Per-task override for whether hibernation is available.
    "maxTimePerHibernationCycle?": 123, // Per-task maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Per-task maximum cumulative hibernation time, in seconds, for this task run.
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
}

CreateConversationRequest

object
Schema Shape
{
  "versionId?": "string",
  "instructions": "string", // Primary instructions for the conversational task. These are written to /workspace/task/TASK.md for the agent.
  "message": "string",
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "inputRepositories?": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ], // Additional repositories to clone into this conversation workspace. Each attachment can choose its own git ref, mount path, and optional setup script.
  "skills?": [
    {
      "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
      "sshKeyId?": "string", // Optional SSH key to make available while installing this skill.
    }
  ], // Additional skills to install into this conversation workspace after the agent version's skills.
  "metadata?": {
  },
  "overrides?": {
    "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider override for this task.
    "runtime?": "pi", // Agent runtime override for this task.
    "basePrompt?": "string", // Per-task base prompt override. When set, this fully replaces the agent version base prompt for this task run.
    "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
    "model?": "string",
    "weakModel?": "string",
    "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // Reasoning effort for this task. Omit to retain the model or provider default; use none to explicitly disable reasoning where supported.
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123, // Maximum inference spend in USD for one conversational turn. Enforcement is observational and may overshoot by one in-flight provider call.
      "maxInferenceCostUsdTotal?": 123, // Maximum cumulative inference spend in USD for the task. Enforcement is observational and may overshoot by one in-flight provider call.
    },
    "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, a conversational task may remain idle while awaiting input before it expires.
    "softFinishAfterSeconds?": 123,
    "hibernationEnabled?": true, // Per-task override for whether hibernation is available.
    "maxTimePerHibernationCycle?": 123, // Per-task maximum duration, in seconds, for a single hibernation request.
    "maxAccumulatedTime?": 123, // Per-task maximum cumulative hibernation time, in seconds, for this task run.
    "outputPolicy?": {
      "mode": "any" | "none" | "at_least_one",
    } | {
      "mode": "named",
      "files": [
        {
          "name": "string",
          "description?": "string",
        }
      ],
    },
    "runtimeRegion?": "any" | "eu",
  },
}

CreateTaskMessageRequest

oneOf
Schema Shape
{
  "replayOnly": true,
  "content?": "value",
  "inputFiles?": "value",
  "overrides?": "value",
} | {
  "replayOnly?": false,
  "content": "string",
  "inputFiles?": [
    {
      "fileId": "string",
      "snapshot": "include" | "exclude",
    }
  ],
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
}

CreateConversationResponse

object
Schema Shape
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
    "inputFiles": [
      {
        "fileId": "string",
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
      }
    ],
  },
  "message": {
    "id": "string",
    "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
    "effectivePolicy?": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
    "turnNumber": 123,
    "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
        "id": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
}

CreateConversationMessageResponse

object
Schema Shape
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  },
  "message": {
    "id": "string",
    "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
    "effectivePolicy?": {
      "maxRuntimeSeconds": 123,
      "maxInferenceCostUsdPerTurn?": 123,
    } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
    "turnNumber": 123,
    "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "filename": "string",
        "path": "string",
        "snapshot": "include" | "exclude",
        "id": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
    "createdAt": "2026-03-25T09:30:00.000Z",
  },
}

ConversationAutonomousResponse

object
Schema Shape
{
  "task": {
    "mode": "autonomous" | "conversation",
    "id": "string",
    "agentId": "string",
    "agentName": "string",
    "agentVersionId": "string",
    "runtime": {
      "containerImage": "string",
      "agentRuntime": "pi",
    },
    "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
    "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
    "turnNumber": 123 | null,
    "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
    "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
    "title": "string",
    "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
    "runtimeRegion": "any" | "eu",
    "overrides": {
      "mode?": "autonomous" | "conversation",
      "basePrompt?": "string",
      "provider?": "string",
      "hasProviderApiKey?": true,
      "runtime?": "pi",
      "model?": "string",
      "weakModel?": "string",
      "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 123,
      "usageLimits?": {
        "maxInferenceCostUsdPerTurn?": 123,
        "maxInferenceCostUsdTotal?": 123,
      },
      "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
      "softFinishAfterSeconds?": 123,
      "hibernationEnabled?": true,
      "maxTimePerHibernationCycle?": 123,
      "maxAccumulatedTime?": 123,
      "outputPolicy?": {
        "mode": "any" | "none" | "at_least_one",
      } | {
        "mode": "named",
        "files": [
          {
            "name": "string",
            "description?": "string",
          }
        ],
      },
      "runtimeRegion?": "any" | "eu",
    },
    "execution": {
      "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
      "model": "string",
      "weakModel": "string",
    },
    "skills": [
      {
        "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
        "sshKeyId": "string" | null,
      }
    ],
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
    "startedAt": "2026-03-25T09:30:00.000Z" | null,
    "completedAt": "2026-03-25T09:30:00.000Z" | null,
    "result": "string" | null,
    "error": "string" | null,
    "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
    "acceptedCommand?": {
      "id": "string",
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      },
    }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
  },
  "event": {
    "id": "string",
    "kind": "mode_switched_to_autonomous" | "mode_switched_to_conversation" | "session_expired" | "hibernation_requested" | "hibernation_woken",
    "turnNumber": 123 | null,
    "message": "string",
    "metadata": {
    },
    "createdAt": "2026-03-25T09:30:00.000Z",
  } | null,
}

CreateWebhookRequest

object
Schema Shape
{
  "url": "string",
  "eventTypes?": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ], // Lifecycle event types to deliver. Omit to subscribe to all supported lifecycle events.
}

UpdateWebhookRequest

object
Schema Shape
{
  "url?": "string",
  "eventTypes?": [
    "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
  ],
  "isActive?": true,
}

WakeTaskRequest

anyOf
Schema Shape
{
  "kind": "message" | "external_wake",
  "idempotencyKey?": "string",
  "replayOnly": true,
  "message?": "value",
  "wakeDueId?": "value",
  "overrides?": "value",
} | {
  "kind": "message",
  "wakeDueId?": "string",
  "idempotencyKey?": "string",
  "replayOnly?": false,
  "message": "string",
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
} | {
  "kind": "external_wake",
  "wakeDueId?": "string",
  "idempotencyKey?": "string",
  "replayOnly?": false,
  "overrides?": {
    "maxRuntimeSeconds?": 123,
    "usageLimits?": {
      "maxInferenceCostUsdPerTurn?": 123,
    },
  },
}

CommandOverrides

object
Schema Shape
{
  "maxRuntimeSeconds?": 123,
  "usageLimits?": {
    "maxInferenceCostUsdPerTurn?": 123,
  },
}

TaskOverrides

object
Schema Shape
{
  "provider?": "anthropic" | "openrouter" | "openai" | "opencode-go", // LLM provider override for this task.
  "runtime?": "pi", // Agent runtime override for this task.
  "basePrompt?": "string", // Per-task base prompt override. When set, this fully replaces the agent version base prompt for this task run.
  "providerApiKey?": "string", // API key for the specified provider. Write-only; never returned in responses.
  "model?": "string",
  "weakModel?": "string",
  "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // Reasoning effort for this task. Omit to retain the model or provider default; use none to explicitly disable reasoning where supported.
  "internetAccess?": true,
  "maxRuntimeSeconds?": 123,
  "maxRuntimePerTurnSeconds?": 123,
  "usageLimits?": {
    "maxInferenceCostUsdPerTurn?": 123, // Maximum inference spend in USD for one conversational turn. Enforcement is observational and may overshoot by one in-flight provider call.
    "maxInferenceCostUsdTotal?": 123, // Maximum cumulative inference spend in USD for the task. Enforcement is observational and may overshoot by one in-flight provider call.
  },
  "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, a conversational task may remain idle while awaiting input before it expires.
  "softFinishAfterSeconds?": 123,
  "hibernationEnabled?": true, // Per-task override for whether hibernation is available.
  "maxTimePerHibernationCycle?": 123, // Per-task maximum duration, in seconds, for a single hibernation request.
  "maxAccumulatedTime?": 123, // Per-task maximum cumulative hibernation time, in seconds, for this task run.
  "outputPolicy?": {
    "mode": "any" | "none" | "at_least_one",
  } | {
    "mode": "named",
    "files": [
      {
        "name": "string",
        "description?": "string",
      }
    ],
  },
  "runtimeRegion?": "any" | "eu",
}

ToggleTaskAutonomousRequest

object
Schema Shape
{
  "enabled": true,
}

AttachSshKeyRepositoryRequest

object
Schema Shape
{
  "repositoryId": "string",
}

AttachReferenceFilesRequest

object
Schema Shape
{
  "fileIds": [
    "string"
  ],
}

AttachRepositoriesRequest

object
Schema Shape
{
  "repositories": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ],
}

AttachTaskRepositoriesRequest

object
Schema Shape
{
  "repositories": [
    {
      "repositoryId": "string",
      "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
      "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
      "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
    }
  ],
}

RepositoryLink

object
Schema Shape
{
  "repositoryId": "string",
  "tag": "string", // Branch, tag, or other git ref to clone for this attachment.
  "mountingPoint": "string", // Workspace path where this repository will be cloned for the task.
  "setupScript?": "string", // Optional repository-relative script to run after clone and before the agent starts for this attachment.
}

DetachRepositoryLinkSearchParams

object
Schema Shape
{
  "mountingPoint": "string",
}

PrepareUploadRequest

object
Schema Shape
{
  "filename": "string",
  "contentType?": "string",
  "sizeBytes?": 123,
}

CompleteUploadRequest

object
Schema Shape
{
  "uploadId": "string",
  "storageId?": "string", // Required only for uploads prepared with method POST. For method PUT uploads, omit storageId.
}

ListSearchParams

object
Schema Shape
{
  "limit?": 123,
  "cursor?": "string",
}

ListTaskEventsSearchParams

object
Schema Shape
{
  "limit?": 123,
  "cursor?": "string",
  "stream?": true,
}

ListTaskMessagesSearchParams

object
Schema Shape
{
  "limit?": 123,
  "cursor?": "string",
  "order?": "asc" | "desc",
}

ListTaskActivitiesSearchParams

object
Schema Shape
{
  "limit?": 123,
  "cursor?": "string",
  "order?": "asc" | "desc",
  "fromTurn?": 123, // Inclusive first conversation turn to return.
  "toTurn?": 123, // Inclusive last conversation turn to return.
}

ListWebhookDeliveriesSearchParams

object
Schema Shape
{
  "webhookId?": "string",
  "limit?": 123,
}

ListWakeDueSearchParams

object
Schema Shape
{
  "status?": "due" | "consumed" | "expired" | "superseded",
  "limit?": 123,
  "cursor?": "string",
}

ListTaskSearchParams

object
Schema Shape
{
  "status?": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
  "mode?": "autonomous" | "conversation",
  "limit?": 123,
  "cursor?": "string",
}

ListAgentsResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "externalRevision": 123 | null,
      "name": "string",
      "description": "string" | null,
      "isStandard": true,
      "archivedAt": "2026-03-25T09:30:00.000Z" | null,
      "currentVersion": {
        "id": "string",
        "number": 123,
        "runtime": {
          "containerImage": "string",
          "agentRuntime": "pi",
        },
        "runtimeAvailable": true,
        "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
        "basePrompt": "string",
        "taskTitleInstructions": "string" | null,
        "skills": [
          {
            "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
            "sshKeyId": "string" | null,
          }
        ],
        "defaults": {
          "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
          "hasProviderApiKey": true, // Whether a provider API key is set on this version.
          "model": "string",
          "weakModel": "string" | null,
          "internetAccess": true,
          "maxRuntimeSeconds": 123,
          "maxRuntimePerTurnSeconds": 123 | null,
          "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
          "softFinishAfterSeconds": 123 | null,
          "hibernationEnabled": true,
          "maxTimePerHibernationCycle": 123 | null,
          "maxAccumulatedTime": 123 | null,
          "outputPolicy": {
            "mode": "any" | "none" | "at_least_one",
          } | {
            "mode": "named",
            "files": [
              {
                "name": "string",
                "description?": "string",
              }
            ],
          },
          "runtimeRegion": "any" | "eu",
        },
        "createdAt": "2026-03-25T09:30:00.000Z",
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListAgentVersionsResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "number": 123,
      "runtime": {
        "containerImage": "string",
        "agentRuntime": "pi",
      },
      "runtimeAvailable": true,
      "runtimeReleasedAt": "2026-03-25T09:30:00.000Z" | null,
      "basePrompt": "string",
      "taskTitleInstructions": "string" | null,
      "skills": [
        {
          "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
          "sshKeyId": "string" | null,
        }
      ],
      "defaults": {
        "provider": "anthropic" | "openrouter" | "openai" | "opencode-go" | null, // Configured LLM provider, or null if using account default.
        "hasProviderApiKey": true, // Whether a provider API key is set on this version.
        "model": "string",
        "weakModel": "string" | null,
        "internetAccess": true,
        "maxRuntimeSeconds": 123,
        "maxRuntimePerTurnSeconds": 123 | null,
        "sessionTtlSeconds": 123 | null, // How long, in seconds, conversational tasks created from this version may remain idle while awaiting input before expiring.
        "softFinishAfterSeconds": 123 | null,
        "hibernationEnabled": true,
        "maxTimePerHibernationCycle": 123 | null,
        "maxAccumulatedTime": 123 | null,
        "outputPolicy": {
          "mode": "any" | "none" | "at_least_one",
        } | {
          "mode": "named",
          "files": [
            {
              "name": "string",
              "description?": "string",
            }
          ],
        },
        "runtimeRegion": "any" | "eu",
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListSnapshotsResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "name": "string" | null,
      "status": "pending_turn" | "processing" | "ready" | "failed" | "expired" | "deleted",
      "source": {
        "conversationId": "string",
        "turnNumber": 123,
      },
      "ttlSeconds": 123 | null,
      "storageBytes": 123 | null,
      "logicalBytes": 123 | null,
      "error": "string" | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "readyAt": "2026-03-25T09:30:00.000Z" | null,
      "expiresAt": "2026-03-25T09:30:00.000Z" | null,
      "failedAt": "2026-03-25T09:30:00.000Z" | null,
      "expiredAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTasksResponse

object
Schema Shape
{
  "data": [
    {
      "mode": "autonomous" | "conversation",
      "id": "string",
      "agentId": "string",
      "agentName": "string",
      "agentVersionId": "string",
      "runtime": {
        "containerImage": "string",
        "agentRuntime": "pi",
      },
      "status": "pending" | "running" | "awaiting_input" | "hibernating" | "finished" | "failed" | "cancelled" | "expired",
      "turnStatus": "running" | "awaiting_input" | "autonomous" | null,
      "turnNumber": 123 | null,
      "sessionTtlSeconds": 123 | null, // Resolved idle-session TTL in seconds for conversational tasks. When the task is awaiting input longer than this, it expires.
      "hibernateUntilAt": "2026-03-25T09:30:00.000Z" | null,
      "title": "string",
      "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
      "runtimeRegion": "any" | "eu",
      "overrides": {
        "mode?": "autonomous" | "conversation",
        "basePrompt?": "string",
        "provider?": "string",
        "hasProviderApiKey?": true,
        "runtime?": "pi",
        "model?": "string",
        "weakModel?": "string",
        "reasoningEffort?": "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max",
        "internetAccess?": true,
        "maxRuntimeSeconds?": 123,
        "maxRuntimePerTurnSeconds?": 123,
        "usageLimits?": {
          "maxInferenceCostUsdPerTurn?": 123,
          "maxInferenceCostUsdTotal?": 123,
        },
        "sessionTtlSeconds?": 123, // Per-task override for how long, in seconds, the task may remain idle while awaiting input before expiring.
        "softFinishAfterSeconds?": 123,
        "hibernationEnabled?": true,
        "maxTimePerHibernationCycle?": 123,
        "maxAccumulatedTime?": 123,
        "outputPolicy?": {
          "mode": "any" | "none" | "at_least_one",
        } | {
          "mode": "named",
          "files": [
            {
              "name": "string",
              "description?": "string",
            }
          ],
        },
        "runtimeRegion?": "any" | "eu",
      },
      "execution": {
        "provider": "anthropic" | "openrouter" | "openai" | "opencode-go",
        "model": "string",
        "weakModel": "string",
      },
      "skills": [
        {
          "skill": "string", // Argument passed to `skills add`, such as `mattpocock/skills/design-an-interface`.
          "sshKeyId": "string" | null,
        }
      ],
      "metadata": {
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
      "startedAt": "2026-03-25T09:30:00.000Z" | null,
      "completedAt": "2026-03-25T09:30:00.000Z" | null,
      "result": "string" | null,
      "error": "string" | null,
      "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
      "costUsd": 123 | null,
      "containerMinutes": 123 | null,
      "tokenUsage": {
      } | null,
      "acceptedCommand?": {
        "id": "string",
        "effectivePolicy": {
          "maxRuntimeSeconds": 123,
          "maxInferenceCostUsdPerTurn?": 123,
        },
      }, // Command accepted by this request. Present on command responses that expose per-command execution policy.
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListFilesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "filename": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListRepositoriesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListSshKeysResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "description": "string" | null,
      "algorithm": "ed25519",
      "publicKey": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListAttachedRepositoriesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "url": "string" | "string",
      "isStandard": true,
      "postCloneScriptPath": "string" | null, // Saved repository-relative setup script path for reuse when attaching this repository. This value does not run by itself.
      "aliases": [
        {
          "name": "string",
          "target": "string",
        }
      ], // Command aliases exported by this repository. They become available when the repository is attached.
      "sshKeys": [
        {
          "id": "string",
          "name": "string",
          "description": "string" | null,
          "algorithm": "ed25519",
          "publicKey": "string",
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "createdAt": "2026-03-25T09:30:00.000Z",
      "tag": "string",
      "mountingPoint": "string",
      "setupScript": "string" | null, // Repository-relative setup script configured for this attachment. The platform runs it after clone and before the agent starts.
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTaskFilesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "filename": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "outputName": "string" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTaskLogsResponse

object
Schema Shape
{
  "data": [
    {
      "attemptNumber": 123,
      "source": "daemon" | "agent_stdout" | "agent_stderr",
      "message": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTaskEventsResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "kind": "mode_switched_to_autonomous" | "mode_switched_to_conversation" | "session_expired" | "hibernation_requested" | "hibernation_woken",
      "turnNumber": 123 | null,
      "message": "string",
      "metadata": {
      },
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTaskMessagesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "commandId?": "string" | null, // Stable API command identity for an accepted user message. Null or omitted for legacy and runtime-generated messages.
      "effectivePolicy?": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      } | null, // Resolved execution policy captured when this command was accepted. Null or omitted for messages without an associated command.
      "turnNumber": 123,
      "attemptNumber": 123 | null, // Runtime attempt ordinal for this message. Legacy or non-runtime-generated messages may be null; use createdAt as their ordering fallback.
      "role": "user" | "assistant",
      "status": "queued" | "processed" | "created",
      "content": "string",
      "files": [
        {
          "filename": "string",
          "path": "string",
          "snapshot": "include" | "exclude",
          "id": "string",
          "contentType": "string" | null,
          "sizeBytes": 123 | null,
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "tokenUsage": {
      } | null,
      "costUsd": 123 | null,
      "sequence": 123 | null, // Message position scoped to its runtime attempt and conversation turn; sequence values are not global across the conversation.
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListTaskActivitiesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "turnNumber": 123,
      "attemptNumber": 123, // Runtime attempt ordinal. Within a turn, group and order activities by attemptNumber before startedSequence.
      "startedSequence": 123, // Activity position within its runtime attempt and conversation turn; sequence values restart for each attempt and turn.
      "completedSequence": 123 | null, // Sequence of the terminal update within the same attempt and turn. It does not create a second activity or change the startedSequence position.
      "kind": "tool",
      "callId": "string",
      "toolKey": "string",
      "input": "__schema0" | null, // Original tool invocation input. This authenticated server-side field may contain commands, paths, credentials, headers, request bodies, or user data and must be sanitized before browser exposure.
      "inputOmittedReason": "not_recorded" | "too_large" | null, // Why input is null. not_recorded applies to historical or legacy-daemon activity; too_large means the serialized input exceeded 64 KiB.
      "status": "running" | "completed" | "failed",
      "errorCode": "tool_error" | "tool_aborted" | "tool_timeout" | null,
      "startedAt": "2026-03-25T09:30:00.000Z",
      "completedAt": "2026-03-25T09:30:00.000Z" | null,
      "durationMs": 123 | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListWebhooksResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "url": "string",
      "eventTypes": [
        "task.created" | "task.turn.queued" | "task.turn.started" | "task.message.created" | "task.awaiting_input" | "task.turn.completed" | "task.hibernating" | "task.wake_due" | "task.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired" | "usage.finalized"
      ],
      "isActive": true,
      "secretPrefix": "string",
      "createdAt": "2026-03-25T09:30:00.000Z",
      "updatedAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
}

ListWebhookDeliveriesResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "webhookId": "string" | null,
      "webhookUrl": "string" | null,
      "eventId": "string" | null,
      "eventType": "string" | null,
      "taskId": "string" | null,
      "status": "string",
      "attemptCount": 123,
      "retryCount": 123,
      "lastStatusCode": 123 | null,
      "lastError": "string" | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
      "deliveredAt": "2026-03-25T09:30:00.000Z" | null,
      "nextRetryAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
}

UsageEvent

object
Schema Shape
{
  "id": "string",
  "accountId": "string",
  "taskId": "string",
  "commandIds": [
    "string"
  ],
  "effectivePolicy": {
    "maxRuntimeSeconds": 123,
    "maxInferenceCostUsdPerTurn?": 123,
  } | null,
  "turnNumber": 123 | null,
  "attemptNumber": 123 | null,
  "executionSequenceTerminal": true | null, // True when no later automatic attempt remains for this execution sequence; false while a later automatic attempt exists; null only for legacy events.
  "executionSequenceUsageUnitCount": 123 | null, // Number of task-attempt usage units expected in this execution sequence through this event's attempt; null only for legacy events.
  "component": "inference" | "runtime",
  "disposition": "final" | "unavailable" | "correction",
  "correctsUsageEventId": "string" | null,
  "outcome": "succeeded" | "awaiting_input" | "failed" | "hibernated" | "cancelled_user" | "cancelled_system",
  "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
  "inference": {
    "provider": "string" | null,
    "model": "string" | null,
    "tokenUsage": {
    } | null,
    "tokenStatus": "complete" | "partial" | "unavailable",
    "costUsdMicros": 123 | null,
    "costProvenance": "pi_reported" | null,
    "costPricingVersion": "string" | null,
  } | null,
  "runtime": {
    "durationMs": 123 | null,
  } | null,
  "occurredAt": "2026-03-25T09:30:00.000Z",
  "finalizedAt": "2026-03-25T09:30:00.000Z",
}

ListUsageEventsResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "accountId": "string",
      "taskId": "string",
      "commandIds": [
        "string"
      ],
      "effectivePolicy": {
        "maxRuntimeSeconds": 123,
        "maxInferenceCostUsdPerTurn?": 123,
      } | null,
      "turnNumber": 123 | null,
      "attemptNumber": 123 | null,
      "executionSequenceTerminal": true | null, // True when no later automatic attempt remains for this execution sequence; false while a later automatic attempt exists; null only for legacy events.
      "executionSequenceUsageUnitCount": 123 | null, // Number of task-attempt usage units expected in this execution sequence through this event's attempt; null only for legacy events.
      "component": "inference" | "runtime",
      "disposition": "final" | "unavailable" | "correction",
      "correctsUsageEventId": "string" | null,
      "outcome": "succeeded" | "awaiting_input" | "failed" | "hibernated" | "cancelled_user" | "cancelled_system",
      "reasonCode?": "inference_spend_limit_reached" | "runtime_limit_reached" | null,
      "inference": {
        "provider": "string" | null,
        "model": "string" | null,
        "tokenUsage": {
        } | null,
        "tokenStatus": "complete" | "partial" | "unavailable",
        "costUsdMicros": 123 | null,
        "costProvenance": "pi_reported" | null,
        "costPricingVersion": "string" | null,
      } | null,
      "runtime": {
        "durationMs": 123 | null,
      } | null,
      "occurredAt": "2026-03-25T09:30:00.000Z",
      "finalizedAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}

ListWakeDueResponse

object
Schema Shape
{
  "data": [
    {
      "id": "string",
      "taskId": "string",
      "status": "due" | "consumed" | "expired" | "superseded",
      "dueAt": "2026-03-25T09:30:00.000Z",
      "expiresAt": "2026-03-25T09:30:00.000Z",
      "terminalAt": "2026-03-25T09:30:00.000Z" | null,
    }
  ],
  "pageInfo": {
    "hasMore": true,
    "nextCursor": "string" | null,
  },
}