Skip to main content
Agent task lifecycle from queued work through running, waiting for approval, and completed evidence.
Use these tasks when you integrate directly with the Agents API. All examples assume you have an API token and a workspace ID.

Create an agent

Create an agent for a reusable automation identity. Keep grants narrow and add ambient triggers only when the agent should start from platform signals.

Start a session

Create a session when you want a durable conversation or task thread. A session can be reused across multiple turns.

Submit a turn

Submit a turn to ask the agent to do work. Use a runtime hint when you know whether the task needs a retained runtime; policy still decides what runs.
Stream events while the turn runs:

Resolve an approval

Approval requests are runtime gates. Resolve them with both Idempotency-Key and If-Match so retries are safe and stale approvals are rejected.

Create a repository change request

Create a repository change request when an agent or integration needs a reviewable fork-backed change. The response returns the change request resource. Use :create_token to mint a scoped token for the fork.
After the fork contains commits, accept, reject, or withdraw the change request through its lifecycle actions.

Agents API

Review the resource model and SDK shape.

Permissions and security

Understand grants, approvals, credential proxying, and review boundaries.