---
title: "The agents of a run: main, its workers and recon helpers"
method: GET
path: "/agents/sessions/{session_id}/runs/{run_id}/instances"
tags: ["AI", "Agents"]
---

# The agents of a run: main, its workers and recon helpers

`GET /agents/sessions/{session_id}/runs/{run_id}/instances`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/sessions/{session_id}/runs/{run_id}/instances`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Each instance with its parent, role, plan step, status (running, done, failed or stopped) and model, oldest first.

## Path parameters

- `session_id` string, required
- `run_id` integer, required

## Response `200`

Request fulfilled, document follows

- AgentInstancesResponse
  - `instances` AgentInstanceItem[], required
    - `id` integer, required
    - `parent_instance_id` integer, nullable
    - `role` 'planner' | 'main' | 'worker' | 'recon', required
    - `step_n` integer, nullable
    - `status` 'running' | 'done' | 'failed' | 'stopped', required
    - `model` string, required
    - `created_at` string, required
    - `ended_at` string, nullable

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/8541b500138b?raw)
