> ## 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: Inputs, Cost & CLI Example

> Async Exa Agent workflows for list building, enrichment, structured research, and follow-up runs. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=exa_agent:{"query":"{{query}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                    | Type                                                            | Required | Default | Description                                                              |
| ----------------------- | --------------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------ |
| `payload.query`         | `string`                                                        | Yes      |         | Natural-language question or instructions for Exa Agent.                 |
| `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       |         |                                                                          |
| `payload.previousRunId` | `string`                                                        | No       |         |                                                                          |
| `payload.metadata`      | `record`                                                        | No       |         |                                                                          |

### Allowed values

| Field            | Allowed values                                      |
| ---------------- | --------------------------------------------------- |
| `payload.effort` | `minimal`, `low`, `medium`, `high`, `xhigh`, `auto` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "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 Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute exa_agent --payload '{
  "query": "latest developments in AI agents"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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