Skip to main content
Agent runs are asynchronous. Start a run, then poll the run until status is terminal.

Discover lanes

The response returns the public lanes that can be started through the API.
The lane id is the same lane ID used in the Erstan frontend. If defaultLaneId is present, the agent has one public lane and callers may omit laneId when starting a run.

Start a run

agentId is the agent workflow ID returned by GET /v1/public/agents.

Request body

input is business data for the selected lane, not a way to reconfigure the saved agent. Top-level reserved runtime-control fields are rejected with reserved_input_field and no run is started. These include tool bindings plus tool and skill policies (tools, toolPolicy, skillPolicy, skillIds), write/approval controls such as writePolicy and autoApproveWrites, model/provider selectors, and workflow or context selectors. Configure those controls in the saved agent definition instead.

Lane modes

When an agent has multiple lanes, omitting laneId returns lane_required.

Idempotency

Pass an idempotencyKey when an external event might retry. For the same API key, workspace, agent, and idempotency key, Erstan returns the existing run instead of starting a duplicate.

Attachments

Runs can include attachments when the selected lane reports attachments.supported: true.
The request body limit for public API routes is 25 MB. The lane’s attachments.maxRequestBytes repeats that limit for clients building dynamic forms.

Start response

New runs return 202 Accepted.
If the request has an idempotencyKey that already started a run for the same API key, workspace, and agent, Erstan returns 200 OK with the existing runId.

Poll response

finalResponse is the agent’s final output. Agents intended for automation should be configured to return JSON so NetSuite or another caller can parse the result deterministically.

Statuses

Treat completed, failed, and cancelled as terminal.