Skip to main content
POST
Create an agent and admit its first run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Transport-level replay protection: any v2 POST may send it (1-255 printable ASCII characters; UUIDs recommended). The first response for a key is recorded and replayed verbatim for retries with the same key + method/path/body for 24 hours; replayed responses carry the Idempotency-Replay: true response header. Reusing a key with a different request, or retrying while the original is still in flight, returns 409 IDEMPOTENCY_ERROR. 5xx responses are never recorded (the retry re-executes).

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]{1,255}$

Body

application/json
prompt
string
required
Required string length: 1 - 10000
name
string

Optional human-readable label. Auto-generated from prompt if absent.

Maximum string length: 80
workspaceId
string<uuid> | null
deprecated

Deprecated container anchor. A legacy workspace id keeps the old semantics; a chat-session id creates the agent "in" that session container (links + uploaded documents are inherited); null/omitted creates a fresh workspace-less agent.

focusTableIds
string<uuid>[]

Table ids to focus the agent on. With a legacy workspace workspaceId, every id must belong to that workspace; with a session container or no workspaceId, any org-owned table qualifies (it is linked to the agent's session).

Maximum array length: 50
attachments
object[]

Bind existing resources to the run. A document is injected as an attached file the agent reads with ctx.loadFile(path) (its current path is re-resolved at run start); a table is merged into focusTableIds. Scope follows the run's container: with a legacy workspace, every attachment must belong to that workspace; on a workspace-less (session-container) run, documents may come from the agent session, its origin session container, or the org-wide pool, and any org-owned table qualifies. Out-of-scope ids → 400 INVALID_ATTACHMENT before admission.

Maximum array length: 20

A document (injected as an attached file) or a table (merged into focusTableIds).

model
enum<string>

Public model id. Plan-aware default: highest model unlocked on the caller's plan (origami-lite for starter, origami-max for pro+). Resolved server-side to an internal chat-agent model; the response's request.model echoes the public id (origami-lite or origami-max), never an internal name. Legacy aliases origami-fast and origami-mid are still accepted and normalized to origami-lite.

Available options:
origami-lite,
origami-max

Response

Run admitted; agent work is in the background.

agent
object
required
run
object
required
workspace
object
required