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

# Exa: Agent

> Run an AI web research agent that builds lists, enriches records or answers research questions, returning output in a schema you define.

Run an AI web research agent that builds lists, enriches records or answers research questions, returning output in a schema you define.

> [!NOTE]
>
> Tool ID: `exa_agent`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'exa_agent',
  {
    "query": "software companies hiring engineers"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute exa_agent --input '{
  "query": "software companies hiring engineers"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "id": "id_123",
    "object": "example",
    "status": "queued"
  }
}
```

Use `deepline describe exa_agent --json` for the latest machine-readable contract.

## Input reference

Exa Agent run input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.query` | `string` | Yes | — | Natural-language question or instructions for Exa Agent. Minimum length: 1. |
| `payload.systemPrompt` | `string` | No | — | Additional behavior guidance, source preferences, or output constraints. |
| `payload.input` | `object` | No | — | Input rows and exclusions for the agent run. |
| `payload.outputSchema` | `any` | No | — | — |
| `payload.effort` | `"minimal" \| "low" \| "medium" \| "high" \| "xhigh" \| "auto"` | No | — | Allowed: `minimal`, `low`, `medium`, `high`, `xhigh`, `auto`. |
| `payload.previousRunId` | `string` | No | — | Minimum length: 1. |
| `payload.metadata` | `record` | No | — | — |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Exa Agent run input.",
    "properties": {
      "query": {
        "type": "string",
        "description": "Natural-language question or instructions for Exa Agent.",
        "minLength": 1
      },
      "systemPrompt": {
        "type": "string",
        "description": "Additional behavior guidance, source preferences, or output constraints."
      },
      "input": {
        "type": "object",
        "description": "Input rows and exclusions for the agent run.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Records the agent should process or enrich.",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "exclusion": {
            "type": "array",
            "description": "Records or entities the agent should avoid.",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "any"
      },
      "effort": {
        "type": "string",
        "enum": [
          "minimal",
          "low",
          "medium",
          "high",
          "xhigh",
          "auto"
        ]
      },
      "previousRunId": {
        "type": "string",
        "minLength": 1
      },
      "metadata": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      }
    },
    "required": [
      "query"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Exa Agent run result.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | No | — | — |
| `result.data.object` | `string` | No | — | — |
| `result.data.status` | `"queued" \| "running" \| "completed" \| "failed" \| "cancelled"` | No | — | Allowed: `queued`, `running`, `completed`, `failed`, `cancelled`. |
| `result.data.stopReason` | `"schema_satisfied" \| "budget_reached" \| "error" \| "cancelled" \| null` | No | — | Allowed: `schema_satisfied`, `budget_reached`, `error`, `cancelled`, `null`. |
| `result.data.createdAt` | `string` | No | — | — |
| `result.data.completedAt` | `string \| null` | No | — | — |
| `result.data.request` | `object \| null` | No | — | — |
| `result.data.output` | `object` | No | — | — |
| `result.data.output.text` | `string` | No | — | — |
| `result.data.output.structured` | `unknown \| null` | No | — | — |
| `result.data.output.grounding` | `array` | No | — | — |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Exa Agent run result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "stopReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "schema_satisfied",
              "budget_reached",
              "error",
              "cancelled",
              null
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "request": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {}
          },
          "output": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "structured": {
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  }
                ]
              },
              "grounding": {
                "type": "array",
                "items": {}
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0` per pricing unit.

## Related documentation

* [Exa provider guide](https://deepline.com/docs/providers/exa/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.