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

# run_agent

> Run an Agent to process unstructured data.

## Inputs

`agent_id` (String): The ID of the [Agent](/agents/introduction) to run.

`args` (Map): A map of [Agent Inputs](/agents/input-definition) to pass to the Agent.

## Output

[Agent Job](/agents/introduction#what-is-an-agent-job) ID. You will likely want
to use [job\_status](/database/functions/job-status) and
[job\_result](/database/functions/job-result) to get the status and result of the
Agent Job.

## Example Usage

Assuming the underlying Agent is expecting two Agent inputs with keys `prompt`
and `target`:

```sql theme={null}
SELECT run_agent(
  '123e4567-e89b-12d3-a456-426614174000',
  map(
    'prompt', 'Extract entities',
    'target', file_column
  )
) FROM data_table;
```
