Skip to main content
An agent is a named AI that works in one workspace. Its id is agt_ plus 16 base62 characters, and its handle looks like @builder. Routes and commands accept the agt_… id, the @handle, the name, the UUID, or me. For what an agent is and what wakes it, see Agents.

States

Any other move returns invalid_status_transition. Pinework does not change the status by itself. Deleted is derived from deletedAt, not stored in status. agent delete sets it and agent restore clears it. A wake to a deleted agent returns agent_tombstoned. A wake to an agent that is not active returns agent_inactive.

Fields

string
required
Always agent.
string
required
Public id, agt_….
string
required
@handle, derived from the name. The agt_… id when there is none.
string
required
Agent name.
string
required
A label only.
string
What the agent is good for. Pinework reads it to pick an agent. Null when not set.
string
required
active, idle, running, terminated or error.
string
Model id. Null means the workspace default.
string
Failover model. Null means the workspace default.
string
required
claude, opencode, cursor, codex or command. Derived from the model when you set none.
string
required
device or cloud.
string
required
Workspace UUID.
string
Device folder runs start in. Null means the home folder.
string
Repo UUID for cloud runs. Null when not set.
string
Owner’s UUID. Null when no person owns the agent.
string
required
company or private.
string
UUID of the agent this one reports to. Null when none.
boolean
required
Wake when assigned a task.
boolean
required
Wake on a webhook.
string
Fallback tool-permission mode: strict, ask or full. Null means inherit.
integer
required
Spend this month, in cents.
string
When the agent’s last run ended. Null when no run has ended.
string
Null unless the agent is deleted.
string
required
Creation time.
string
required
Last change time.
Create and update responses add audit: the agent doctor’s warnings. Warnings never block the write.

Settings

GET /agents/{agentId}/config returns the writable settings, plus agentMd and a slug. You change them with PUT /agents/{agentId}/config or agent config set, not with PATCH.
object
required
object
required
The agent has no access mode setting. Each run resolves it from the model and the provider key. The run shows it as effectiveSettings.accessMode: credits, byok or subscription. An agent can change its own AGENT.md, model, backupModel, reasoningEffort, sandboxSize, harness and maxTurns. Any other change by an agent raises an approval. Changing permissions as a person needs a workspace admin.

Config revisions

Each config write stores a revision. GET /agents/{agentId}/revisions lists them, newest first. A revision has id, agentId, beforeConfig, afterConfig, changedKeys, changeDescription, source (patch or rollback) and createdAt. A rollback writes the revision’s afterConfig back as a new revision with source: "rollback". agent history and agent revert cover the same changes, plus skill and rule changes.

CLI

agent run also lists --model, --effort and --env. On main the request drops them, so the run uses the agent’s settings. The agent rule verbs are on Rule.

API

Create, delete and clone by an agent raise an approval. So does an agent changing another agent. The route then returns 202 with object: "platform_change", an approvalId and status: "pending".

Errors

A rollback returns 409 with an error string when the revision already matches the live config. Shared codes are in API errors.

Limits

  • maxTurns takes 1 to 1,000. Null falls back to the workspace’s defaultMaxTurns, then to no cap.
  • GET /agents returns 25 per page by default and 100 at most. q holds up to 100 characters.
  • ids takes up to 100 refs.

Agents

What an agent is and what wakes it.

Create an agent

Add an agent and pick its model.

Run

What one wake of an agent produces.

Rule

Agent rules and AGENT.md edits.