> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Collection Agent

> Run an agent against a collection.

## Overview

Runs a visible built-in or custom agent across a collection.

<ParamField path="colId" type="string" required>
  Collection ID.
</ParamField>

<ParamField path="agentId" type="string" required>
  Agent ID.
</ParamField>

<ParamField body="input" type="object">
  Optional run input payload.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.okrapdf.com/v1/collections/col-abc123/agents/agent_abc123/run \
    -H "Authorization: Bearer $OKRA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "input": { "prompt": "Compare revenue across documents" } }'
  ```
</RequestExample>
