---
title: "Search agent runs"
method: GET
path: "/v1/admin/agent-runs"
tags: ["admin"]
---

# Search agent runs

`GET /v1/admin/agent-runs`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/admin/agent-runs`
- Auth: HTTP bearer

List agent runs with filtering, sorting, and pagination.

## Query parameters

- `q` string, nullable: ANTLR filter expression
- `limit` integer, nullable: Page size
- `sort_by` string, nullable: Sort expression (e.g. created_at:desc)
- `fields` string, nullable: Field projection (e.g. id,name)
- `pq` string, nullable: Pagination cursor query
- `from_prev` boolean: Backward pagination flag

## Response `200`

Paginated agent run list.

- ModelsRunAgentRunSearchValidator: Typed cursor-paginated list response.
  - `items` ModelsRunAgentRunFullValidator[], required
    - `id` string, uuid, required
    - `tenant_id` string, uuid, required
    - `conversation_id` string, uuid, nullable
    - `actor_id` string, uuid, nullable
    - `trigger_code` 'mention' | 'dm' | 'message' | 'proactive' | 'cron' | 'event' | 'heartbeat' | 'discovery' | 'onboarding' | 'manual' | 'spawn', required
    - `trigger_context` RunTriggerContext: Curated provenance for the request card at the start of a run timeline.
      - `sender` string, nullable
      - `attachments` RunTriggerAttachment[]
        - `name` string, nullable
        - `mime_type` string, nullable
        - `size_bytes` integer, nullable
        - `external_id` string, nullable
      - `schedule_name` string, nullable
      - `prompt` string, nullable
      - `description` string, nullable
      - `cron_job_id` string, nullable
      - `built_in_template_key` string, nullable
      - `one_shot` boolean
      - `post_every_run` boolean
      - `mcp_direct_tool_ref` string, nullable
      - `admin_console_operator` boolean
      - `loop_id` string, nullable
      - `loop_final` boolean
      - `task_test_run` boolean
      - `task_summary` string, nullable
      - `prompt_digest` string, nullable
      - `admission` RunTriggerAdmission: Why a chat run's message was admitted as addressed to Patricia (``core.chat.types.AdmissionBasis``).
        - `basis` string, required
        - `generation` integer, required
        - `admitted_at` string, required
        - `classifier_source` string, nullable
      - `answered_ask_id` string, nullable
    - `message_excerpt` string, nullable
    - `status_code` 'queued' | 'running' | 'waiting_approval' | 'suspended' | 'completed' | 'failed' | 'cancelled' | 'denied_autonomous', required
    - `truncated` boolean
    - `no_result` boolean
    - `silent` boolean
    - `model` string, required
    - `input_tokens` integer, required
    - `output_tokens` integer, required
    - `cache_read_tokens` integer, required
    - `cache_write_tokens` integer, required
    - `cost_micro_usd` integer, required
    - `budget_micro_usd` integer, nullable
    - `duration_ms` integer, nullable
    - `error` string, nullable
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `credits` integer, required: Credits fixed when the run finished, with live-rate conversion for runs without a snapshot.
  - `first` string, nullable
  - `next` string, nullable
  - `previous` string, nullable

## Other responses

- `401`: Unauthorized
- `403`: Permission denied (PERMISSION_DENIED) or email not verified (EMAIL_NOT_VERIFIED)
- `422`: Validation error

---

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