---
title: "List the runs of an agent"
method: GET
path: "/agents/{id}/runs"
tags: ["Agents"]
---

# List the runs of an agent

`GET /agents/{id}/runs`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/agents/{id}/runs`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `project:read`)

The log of an agent, newest first: for each run the trigger, what the agent thought, each action with its status (including refused and pending ones), the outcome and the tokens used. Thoughts, outcomes and action input are kept for 90 days. Paginate with before (the created_at of the last run you have).

## Path parameters

- `id` string, uuid, required

## Query parameters

- `limit` integer
- `before` string, date-time

## Response `200`

The runs.

- object
  - `data` object[], required
    - `id` string, uuid, required
    - `agent_id` string, uuid, required
    - `status` 'queued' | 'running' | 'done' | 'failed' | 'skipped', required
    - `trigger` object, required
      - `type` 'document.created' | 'call.completed' | 'conversation.closed' | 'schedule', required
      - `id` string, nullable, required
      - `scheduled_for` string, nullable, required
    - `thought` string, nullable, required: What the agent thought, in one or two sentences.
    - `outcome` string, nullable, required: What happened, for each action.
    - `error` string, nullable, required
    - `model_turns` integer, required
    - `input_tokens` integer, required: Tokens the language model read in this run, including retries.
    - `output_tokens` integer, required: Tokens the language model wrote in this run, including retries.
    - `created_at` string, required
    - `started_at` string, nullable, required
    - `finished_at` string, nullable, required
    - `actions` object[], required
      - `id` string, uuid, required
      - `run_id` string, uuid, required
      - `agent_id` string, uuid, required
      - `type` 'read_document' | 'update_document' | 'email_owner' | 'email_contact' | 'send_sms' | 'start_call' | 'send_webhook', required
      - `input` object, required: What the agent asked for, like {"to": "+447700900123", "assistant_instructions": "..."}.
      - `status` 'running' | 'done' | 'simulated' | 'pending_approval' | 'rejected' | 'refused' | 'failed' | 'expired', required: running, done, simulated (test mode), pending_approval (waiting for the owner), rejected (by the owner), refused (by the limits or the rules, see reason), failed (see reason), expired (no decision within 72 hours).
      - `reason` string, nullable, required
      - `result` object, nullable, required
      - `decided_by` string, nullable, required
      - `decided_at` string, nullable, required
      - `expires_at` string, nullable, required: When a pending action expires.
      - `created_at` string, required
      - `executed_at` string, nullable, required
  - `has_more` boolean, required

## Other responses

- `400`: Bad Request: invalid_parameter.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
