---
title: "Get an agent."
method: GET
path: "/v1/agents/{name}"
tags: ["agents"]
---

# Get an agent.

`GET /v1/agents/{name}`

## Request

- Base URL: `https://api.smolmachines.com`
- URL: `https://api.smolmachines.com/v1/agents/{name}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/smolmachines/apis/smolfleet-api/docs/v1/agents/:name/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns one agent's state and its machine. Requires the `machine:read` scope.

## Path parameters

- `name` string, required

## Response `200`

Session with its turns

- AgentInfo: A managed agent session.
  - `createdAt` string, required
  - `error` string, nullable
  - `harness` string, required
  - `machineId` string, nullable: The machine the session currently runs on (it changes on rewind).
  - `model` string, nullable
  - `name` string, required
  - `runningTurn` integer, nullable: The turn in progress, if any.
  - `status` string, required: `starting` during setup, `turning` during a turn, `cancelling`, `rewinding`, `forking`, `pausing`, `resuming`, `ready`, `deleting`, or `failed`; stale work may read as `interrupted`.
  - `turns` AgentTurnInfo[], required
    - `checkpointed` boolean, required: Whether the session can be rewound or branched to this turn.
    - `costUsd` number, double, nullable: What the turn cost at the model provider, when the harness reports it.
    - `finishedAt` string, nullable
    - `index` integer, required
    - `isError` boolean, required
    - `prompt` string, required
    - `result` string, nullable: The agent's final answer, or why the turn failed.
    - `startedAt` string, required
    - `status` string, required: `preparing`, `running`, `cancelling`, `cancelled`, `done`, `failed`, or `interrupted`.

## Other responses

- `401`: Missing or invalid API key
- `403`: Key lacks the required scope
- `404`: Not found
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error

## Changes

- **2026-10-16** `bc31fc04a568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/agents/:name/get.md)

---

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