Agents

Read an agent run

The run as it stands: its status, every step so far, its cost on a funded run, and once it has ended, its result (completed) or error (failed, interrupted). Poll it; a few seconds apart is plenty, since a step takes at least that long. A run this key cannot see is a 404.

Requires the member role or higher.

get/agent/runs/{run}

Request

  • Base URL: https://app.mandala.computer/api/v1
  • URL: https://app.mandala.computer/api/v1/agent/runs/{run}
  • Auth: HTTP bearer

Path parameters

runstring required

A run id from POST /computers/{id}/agent/runs (run_ followed by 24 lowercase hex characters).

Response

The run.

idstring required

run_ and twenty-four hex characters.

computer_idstring required
thread_idstring nullable required

The thread the run is kept in, once it is: null until a new thread has something in it (a run that has not acted yet, or failed before it did), and when the thread was deleted. Continue it with thread_id on the next run.

status'running' | 'completed' | 'failed' | 'cancelled' | 'interrupted' required

completed: the loop ended on its own, and result.stop says how — only end_turn means the task was finished. failed: see error. cancelled: stopped by a cancel. interrupted: the control plane restarted while it was going (error.status 503), or the run stopped without its ending being recorded (error.status 500); it was not resumed.

promptstring required

The prompt, at most 32,000 characters of it.

modelstring required

The model the run was started with.

max_stepsinteger required
stepsinteger required

How many actions it has taken so far.

cost_usdnumber

Funded runs: the charge so far, in USD.

created_atstring required
updated_atstring required

When it last took a step or changed status.

ended_atstring nullable required

When it ended; null while running.

Changes

No recorded changes to this operation across all 1 revision of this API.