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

52

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 checkpoint storage quota usage in bytes, measured as cumulative active checkpoint deltas. Shared parent/base image layers are excluded when the parent manifest is available.
    "quotaBytes": 123, // Base checkpoint registry storage quota in bytes.
    "isEnforced": true, // Whether checkpoint registry 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",
      "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",
        },
        "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" | 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.

Requires bearer auth

Request Body

application/jsonrequired
{
  "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", // 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.
    }
  ],
}

Responses

201

Agent created

application/json
{
  "id": "string",
  "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",
    },
    "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" | 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",
  },
}
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",
  "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",
    },
    "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" | 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
{
  "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", // 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.
    }
  ],
}

Responses

200

Agent updated

application/json
{
  "id": "string",
  "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",
    },
    "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" | 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}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",
  "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",
    },
    "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" | 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",
      },
      "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" | 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",
  },
  "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" | 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",
  },
}
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

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",
  "inputFileIds?": [
    "string"
  ],
  "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", // 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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "message": {
    "id": "string",
    "turnNumber": 123,
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "id": "string",
        "filename": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 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",
  },
}
402

Insufficient platform credits to dispatch the task

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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "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, and conversation messages.

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`. Intended for browser `EventSource` clients that cannot send an `Authorization` header. 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

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",
      "turnNumber": 123,
      "role": "user" | "assistant",
      "status": "queued" | "processed" | "created",
      "content": "string",
      "files": [
        {
          "id": "string",
          "filename": "string",
          "contentType": "string" | null,
          "sizeBytes": 123 | null,
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "tokenUsage": {
      } | null,
      "costUsd": 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/conversations/{taskId}/messagesConversations

Send conversation message

Queues a new user message for a conversational task and schedules the next turn when appropriate.

Requires bearer auth

Request Body

application/jsonrequired
{
  "content": "string",
  "inputFileIds?": [
    "string"
  ],
}

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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "message": {
    "id": "string",
    "turnNumber": 123,
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "id": "string",
        "filename": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 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",
  },
}
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

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",
  "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",
    },
    "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" | 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",
  "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",
    },
    "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" | 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

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",
        "internetAccess?": true,
        "maxRuntimeSeconds?": 123,
        "maxRuntimePerTurnSeconds?": 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",
        "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,
      "costUsd": 123 | null,
      "containerMinutes": 123 | null,
      "tokenUsage": {
      } | 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/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

Request Body

application/jsonrequired
{
  "versionId?": "string",
  "instructions": "string", // Primary instructions for the task. These are written to /workspace/task/TASK.md for the agent.
  "inputFileIds?": [
    "string"
  ],
  "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", // 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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 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",
    "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,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
}
401

Missing or invalid API key

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

Insufficient platform credits to dispatch the task

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}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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 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",
    "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,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | 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",
  },
}
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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 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",
    "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,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | 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",
  },
}
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

Requires bearer auth

Request Body

application/jsonrequired
{
  "kind": "message",
  "message": "string",
} | {
  "kind": "external_wake",
}

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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 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",
    "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,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | 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",
  },
}
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

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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
      ],
      "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ], // 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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
    ],
    "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ],
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ],
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ],
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
    ],
    "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 checkpoint storage quota usage in bytes, measured as cumulative active checkpoint deltas. Shared parent/base image layers are excluded when the parent manifest is available.
    "quotaBytes": 123, // Base checkpoint registry storage quota in bytes.
    "isEnforced": true, // Whether checkpoint registry storage quota enforcement applies to this account.
  },
  "createdAt": "2026-03-25T09:30:00.000Z",
}

Agent

object
Schema Shape
{
  "id": "string",
  "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",
    },
    "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" | 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",
  },
  "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" | 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" | 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",
}

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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 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",
    "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,
  "costUsd": 123 | null,
  "containerMinutes": 123 | null,
  "tokenUsage": {
  } | null,
}

TaskExecution

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

TaskResponseOverrides

object
Schema Shape
{
  "mode?": "autonomous" | "conversation",
  "basePrompt?": "string",
  "provider?": "string",
  "hasProviderApiKey?": true,
  "runtime?": "pi",
  "model?": "string",
  "weakModel?": "string",
  "internetAccess?": true,
  "maxRuntimeSeconds?": 123,
  "maxRuntimePerTurnSeconds?": 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",
  "turnNumber": 123,
  "role": "user" | "assistant",
  "status": "queued" | "processed" | "created",
  "content": "string",
  "files": [
    {
      "id": "string",
      "filename": "string",
      "contentType": "string" | null,
      "sizeBytes": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "tokenUsage": {
  } | null,
  "costUsd": 123 | null,
  "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",
}

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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ],
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
    ],
    "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,
}

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
{
  "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", // 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.
    }
  ],
}

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.
}

CreateSshKeyRequest

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

UpdateAgentRequest

object
Schema Shape
{
  "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", // 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.
    }
  ],
}

UpdateSshKeyRequest

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

AgentDefaults

object
Schema Shape
{
  "provider?": "anthropic" | "openrouter" | "openai", // 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.
  "inputFileIds?": [
    "string"
  ],
  "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", // 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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "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",
  "inputFileIds?": [
    "string"
  ],
  "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", // 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",
    "internetAccess?": true,
    "maxRuntimeSeconds?": 123,
    "maxRuntimePerTurnSeconds?": 123,
    "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

object
Schema Shape
{
  "content": "string",
  "inputFileIds?": [
    "string"
  ],
}

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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "message": {
    "id": "string",
    "turnNumber": 123,
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "id": "string",
        "filename": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "message": {
    "id": "string",
    "turnNumber": 123,
    "role": "user" | "assistant",
    "status": "queued" | "processed" | "created",
    "content": "string",
    "files": [
      {
        "id": "string",
        "filename": "string",
        "contentType": "string" | null,
        "sizeBytes": 123 | null,
        "createdAt": "2026-03-25T09:30:00.000Z",
      }
    ],
    "tokenUsage": {
    } | null,
    "costUsd": 123 | null,
    "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",
      "internetAccess?": true,
      "maxRuntimeSeconds?": 123,
      "maxRuntimePerTurnSeconds?": 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",
      "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,
    "costUsd": 123 | null,
    "containerMinutes": 123 | null,
    "tokenUsage": {
    } | null,
  },
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ], // 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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
  ],
  "isActive?": true,
}

WakeTaskRequest

oneOf
Schema Shape
{
  "kind": "message",
  "message": "string",
} | {
  "kind": "external_wake",
}

TaskOverrides

object
Schema Shape
{
  "provider?": "anthropic" | "openrouter" | "openai", // 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",
  "internetAccess?": true,
  "maxRuntimeSeconds?": 123,
  "maxRuntimePerTurnSeconds?": 123,
  "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",
}

ListWebhookDeliveriesSearchParams

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

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",
      "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",
        },
        "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" | 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",
      },
      "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" | 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,
  },
}

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",
        "internetAccess?": true,
        "maxRuntimeSeconds?": 123,
        "maxRuntimePerTurnSeconds?": 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",
        "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,
      "costUsd": 123 | null,
      "containerMinutes": 123 | null,
      "tokenUsage": {
      } | null,
    }
  ],
  "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",
      "turnNumber": 123,
      "role": "user" | "assistant",
      "status": "queued" | "processed" | "created",
      "content": "string",
      "files": [
        {
          "id": "string",
          "filename": "string",
          "contentType": "string" | null,
          "sizeBytes": 123 | null,
          "createdAt": "2026-03-25T09:30:00.000Z",
        }
      ],
      "tokenUsage": {
      } | null,
      "costUsd": 123 | null,
      "createdAt": "2026-03-25T09:30:00.000Z",
    }
  ],
  "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.woken" | "task.finished" | "task.failed" | "task.cancelled" | "task.expired"
      ],
      "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,
    }
  ],
}