Introduction¶
When doing competitor monitoring, price list syncing, or contact completion, a common practice is to write fixed selectors to scrape single pages, or stitch together multi-step scripts to navigate pagination. When site structures change or you need to aggregate across multiple entry points, maintenance costs rise significantly. The firecrawl-agent Skill in Firecrawl CLI teaches coding agents to run firecrawl agent in the terminal: the AI autonomously navigates websites and writes results as JSON; when stable fields are needed, JSON Schema can constrain the output. The official documentation states that a single task takes about 2–5 minutes—slower than single-page scrape and more credit-intensive—but it’s suitable for collection tasks that require “cross-page reasoning without an existing workflow.”
What Is This¶
firecrawl-agent is a SKILL.md specification located under skills/firecrawl-agent in the Firecrawl CLI repository, maintained by Firecrawl. The description in the Skill metadata reads: autonomously browse and extract structured data across pages when a task requires website navigation or when no suitable existing workflow/data provider exists.
It does not replace the Firecrawl service itself; rather, it constrains when the Agent should use the Agent mode, when to first use Alexandria’s existing capabilities, and how to pass parameters, await results, and control costs. The Skill declares allowed tools as Bash(firecrawl *) and Bash(npx firecrawl-cli *).
Core Features¶
Autonomous Extraction & Natural Language Tasks¶
The Agent navigates websites and extracts data based on natural language instructions, such as “extract all pricing tiers” or “extract the product list.” Output can be freeform, or bound to a JSON Schema via --schema to yield predictable structures (e.g., name, price fields).
Specifying Start URLs¶
Use --urls to confine the task to specific pages, reducing irrelevant navigation—for example, extracting a feature list only on a specific product page.
Integration with Alexandria¶
Before launching an autonomous Agent, the Skill requires checking whether an existing workflow or data provider exists first:
firecrawl search alexandria '<data you need>'
If a match is found, use firecrawl list <provider> <capability> --pretty to view the contract, then execute with firecrawl scrape --alexandria <provider>/<capability> --options '<input JSON>'; fields must match the contract. Only when no suitable tool exists or the task requires autonomous navigation should you proceed with firecrawl agent.
Agent runs can also mount Alexandria toolkits (e.g., apollo, crunchbase) via --toolkits (up to 5 slugs), --alexandria, --max-calls flags, etc.; subsequent conversations in the same thread retain these settings.
Async Jobs & Polling¶
When --wait is omitted, a job ID is returned. You can query status with a UUID as a positional argument, or use --wait combined with --poll-interval and --timeout to wait for completion; --cancel can cancel an in-progress task.
Costs & Approval¶
The Skill notes that the Agent consumes more credits than simple scraping; cap it with --max-credits. Under --require-approval (and --mode chat), the run may end with pendingApproval before paid calls, requiring a response via --approve or --decline in the same thread; when data source terms apply, the organization admin must accept terms in the Firecrawl console (the Skill provides a settings page link).
Installation & Activation¶
Global CLI installation:
npm install -g firecrawl-cli
Or complete installation, authentication, and skill installation to detected coding editors (including Cursor) in one command:
npx -y firecrawl-cli@latest init -y --browser
-y is non-interactive; --browser automatically opens a browser for Firecrawl authentication. You can also install only core CLI skills (including agent-related capabilities):
firecrawl setup core
When installing a specific skill, the firecrawl- prefix can be omitted. For Cursor-only installation, add --agent cursor, e.g.:
firecrawl init --agent cursor
firecrawl setup skills --agent cursor
On first run without an API key, the CLI prompts for browser login or manual input; you can also set the environment variable FIRECRAWL_API_KEY, or run firecrawl login --api-key fc-your-api-key. For self-hosted instances, use --api-url or FIRECRAWL_API_URL (no API key needed when not using the default https://api.firecrawl.dev, subject to official CLI documentation).
Skill file location: https://github.com/firecrawl/cli/tree/main/skills/firecrawl-agent. Community indexes (such as awesome-agent-skills) classify such entries as SKILL.md specifications that teach agents to load on demand, compatible with harnesses like Claude Code, Cursor, Codex; specific loading methods vary by platform, with Firecrawl’s approach primarily writing to detected editors via init / setup.
Typical Usage¶
The following examples are from the official Skill documentation and can be reproduced directly in an authenticated environment.
Basic: Wait for Completion & Write JSON File¶
firecrawl agent "extract all pricing tiers" --wait --json -o .firecrawl/pricing.json
--wait means waiting in the current terminal for results; -o specifies the output path. Completion criteria: the output file is valid JSON that answers the request, or you deliberately omit --wait and only get a job ID for later polling.
Constraining Structure with JSON Schema¶
firecrawl agent "extract products" --schema '{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}' --wait --json -o .firecrawl/products.json
When --schema is not provided, the Agent returns freeform data, resulting in higher downstream parsing costs.
Constraining Pages¶
firecrawl agent "get feature list" --urls "<url>" --wait --json -o .firecrawl/features.json
Replace <url> with the target address.
Combined with Alexandria Toolkits¶
firecrawl agent "find the head of sales at <company>" --toolkits apollo,crunchbase --wait --json -o .firecrawl/contacts.json
Async & Status Queries¶
firecrawl agent "<job-id>"
firecrawl agent "<job-id>" --wait --poll-interval 10 --timeout 300
firecrawl agent "<job-id>" --cancel
For the complete list of options, refer to firecrawl agent --help.
Use Cases & Considerations¶
Better suited for:
- Tasks requiring cross-page clicking, list or detail aggregation, with no Alexandria contract to cover them.
- When you want the Agent to directly produce JSON in a coding session, feeding into RAG, ETL, or internal toolchains.
- When field shapes are known and
--schemais used to fix output for validation and database insertion.
Should consider other Skills/commands first:
- Single-page, static content: the official recommendation is to prioritize
firecrawl scrape(faster, cheaper), corresponding Skill firecrawl-scrape. - Requiring human-like page interaction: firecrawl-interact.
- Large-scale, AI-free site traversal: firecrawl-crawl.
- Writing structured extraction into application code: firecrawl-build-scrape.
Limitations & Costs:
- A single Agent run typically takes 2–5 minutes, unsuitable for sub-second real-time interfaces.
- Credit consumption is higher than scraping; always set an upper limit with
--max-credits. - When an existing provider/capability is available, prefer Alexandria before the Agent to avoid reinventing the wheel.
Conclusion¶
firecrawl-agent consolidates “autonomous navigation + structured extraction” into an agent-executable terminal workflow: first search Alexandria, then decide whether to launch the Agent, and control risks with Schema, URL constraints, and credit limits. To enable it in Cursor or similar environments, install Firecrawl CLI and run init or setup core, ensuring API authentication is ready. Official Skill path: https://github.com/firecrawl/cli/tree/main/skills/firecrawl-agent.