---
title: "Get Agent"
method: GET
path: "/jobs/{job_id}/agent"
tags: ["jobs"]
---

# Get Agent

`GET /jobs/{job_id}/agent`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/jobs/{job_id}/agent`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

OS3's job agent's session on this run (or on the run it restarted), with its steps; null
when the agent has not worked on it.

## Path parameters

- `job_id` string, uuid, required

## Query parameters

- `after` integer
- `limit` integer

## Response `200`

Successful Response

- AgentView: OS3's job agent on a run that failed or stalled: its state, what it waits for, the runs and dataset versions it made, and its steps as you see them. `events`, oldest first, one of: `trigger` (a run failed or stalled), `note` (its plan, or why it takes its next step), `read` (what it read of your runs, data or workspace), `web_search` and `web_page`, `command` (code it ran on a sample of your data, with its output and files), `data_change` (a new dataset version, with what it dropped and why; or, `how` `script`, one it made with its own script on its computer, with the script, what changed and the files it left out), `job_started` (a restart or another run, with its changed settings and estimate), `question` and `reply`, `data_ready` and `job_ended` (what it waited for), `step_failed` (a step OS3 refused, and why), `outcome` (the summary that ends each of its turns) and `stopped`; on its computer: `command` (language `shell`: a command with its output, the files it wrote and kept and the hosts it reached), `file` (a file it wrote, with its text), `browser` (a page it opened or worked, with what it typed and its screenshot: GET /workspaces/{id}/agent-computer/steps/{step_id}/files/screenshot.png) and `data_copied` (a dataset version's files copied in). `after` pages them: the events from that index on.
  - `session_id` string, uuid, required
  - `job_id` string, uuid, required
  - `workspace_id` string, uuid, required
  - `conversation_id` string, uuid, required
  - `state` 'queued' | 'running' | 'waiting' | 'done' | 'stopped', required
  - `restarts` integer, required
  - `max_restarts` integer, required
  - `stopped_reason` string, nullable, required
  - `questions` AgentQuestion[], required
    - `id` integer, required
    - `text` string, required
    - `options` AgentChoice[], required
      - `id` string, required
      - `label` string, required
    - `spend_usd` string, nullable, required
    - `asked_at` string, date-time, required
  - `waiting_on_os3` boolean, required
  - `jobs` string[], required
  - `dataset_versions` string[], required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `events` object[], required
  - `total` integer, required
  - `next_after` integer, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
