> ## 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.

# job_status

> Get the status of an Agent Job.

## Inputs

`job_id` (String): The ID of the
[Agent Job](/agents/introduction#what-is-an-agent-job) to get the status of.
This is **usually** the output of the [run\_agent](/database/functions/run-agent)
function.

## Output

The status of the Agent Job. The status can be one of the following:

0: PENDING

1: STARTED

2: RETRY

3: SUCCESS

4: FAILURE

5: CANCELLED

## Example Usage

```sql theme={null}
SELECT job_status('123e4567-e89b-12d3-a456-426614174000');
```

```sql theme={null}
SELECT job_status(run_agent_result_column) FROM data_table;
```
