Skip to main content
The runs API is what the sensei command, the Python and JavaScript SDKs and the dashboard call. The base URL is https://runs.sense-lab.ai.

Authentication

Send a Sensei key as Authorization: Bearer amfs_.... x-api-key works too. The project is the key’s project. Every response carries an x-senselab-request-id header. Request bodies are JSON, up to 256,000 bytes.

Start a run

The body takes one of five forms. These fields apply to any form. The response is 202 with the run.

A batch

A body with tasks starts a batch: each task is a run of its own, and the verified changes are tested together. See Several changes at once. policy.pr and policy.branch are refused: a batch opens its own pull requests, on branches of its own.
The response is the batch’s run. Each task is a run with parent_run_id set to the batch’s id.

The run object

result

A task’s together is fits, conflicts, breaks, merged when the change is already in the branch, or untested when the changes merge and the tests on the result did not pass or did not finish.

Read runs

Follow a run

Request the events with Accept: text/event-stream, or add ?stream=1, to get server-sent events.
The stream sends a keep-alive comment every 15 seconds while nothing happens. It closes when the run waits or finishes. To resume, send Last-Event-ID or ?after=N.

Act on a run

Agents

Repositories and tools

Settings and secrets

A value saved with a key is for that key’s project. See Services, settings and secrets.

Schedules

Callbacks

With policy.callback_url, the service posts to your address when the run waits or finishes:
type is run. followed by the status. The address must start with https://.

Errors

Errors have this shape: