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

# Firecrawl: Agent

> Complex web tasks using AI agent with natural language instructions. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Complex web tasks using AI agent with natural language instructions.

> [!NOTE]
>
> Tool ID: `firecrawl_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(
  'firecrawl_agent',
  {
    "prompt": "example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute firecrawl_agent --input '{
  "prompt": "example"
}' --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": {
    "status": "example"
  }
}
```

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

## Input reference

Start an AI agent job and return its ID for status polling.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.prompt` | `string` | Yes | — | Natural language instruction for the AI agent (max 10000 chars) |
| `payload.urls` | `array` | No | — | Starting URLs for the agent |
| `payload.schema` | `record` | No | — | JSON schema for structured output |
| `payload.maxCredits` | `integer` | No | — | Max credits to spend (default 2500) |
| `payload.model` | `"spark-1-mini" \| "spark-1-pro"` | No | — | Agent model (default "spark-1-mini") Allowed: `spark-1-mini`, `spark-1-pro`. |
| `payload.strictConstrainToURLs` | `boolean` | No | — | Only visit provided URLs |
| `payload.timeoutMs` | `integer` | No | — | Deprecated compatibility field. Start actions now return immediately. Use the matching status action to poll. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Start an AI agent job and return its ID for status polling.",
    "properties": {
      "prompt": {
        "type": "string",
        "description": "Natural language instruction for the AI agent (max 10000 chars)"
      },
      "urls": {
        "type": "array",
        "description": "Starting URLs for the agent",
        "items": {
          "type": "string"
        }
      },
      "schema": {
        "type": "object",
        "description": "JSON schema for structured output",
        "additionalProperties": {}
      },
      "maxCredits": {
        "type": "integer",
        "description": "Max credits to spend (default 2500)"
      },
      "model": {
        "type": "string",
        "description": "Agent model (default \"spark-1-mini\")",
        "enum": [
          "spark-1-mini",
          "spark-1-pro"
        ]
      },
      "strictConstrainToURLs": {
        "type": "boolean",
        "description": "Only visit provided URLs"
      },
      "timeoutMs": {
        "type": "integer",
        "description": "Deprecated compatibility field. Start actions now return immediately; use the matching status action to poll."
      }
    },
    "required": [
      "prompt"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

AI agent job result.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | No | — | — |
| `result.data.status` | `string` | Yes | — | — |
| `result.data.data` | `unknown` | No | — | — |
| `result.data.model` | `string` | No | — | — |
| `result.data.error` | `string` | No | — | — |
| `result.data.expiresAt` | `string` | 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": "AI agent job result.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "data": {},
          "model": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "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

* [Firecrawl provider guide](https://deepline.com/docs/providers/firecrawl/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.