Firecrawl + Mastra
Give Mastra agents the web.
Use Firecrawl Search and Scrape as typed tools, and attach FirecrawlBrowser so agents can log in, click, and fill forms on pages a scrape can't reach.
companies of all sizes
await firecrawl.scrape()
await firecrawl.scrape()
await firecrawl.scrape()
await firecrawl.scrape()
Key Features
Give a Mastra agent a browser
FirecrawlBrowser was built by the Firecrawl team and lives in the Mastra repo. Add it to an agent in three steps.
Install the package
Add the Mastra browser provider. The agent-browser pin keeps the current release's import working.
npm install @mastra/core @mastra/memory @mastra/browser-firecrawl agent-browser@0.19.0Set your API keys
Set FIRECRAWL_API_KEY and the key for your model provider. Get a Firecrawl key from your dashboard.
Attach the browser to an agent
Pass a FirecrawlBrowser to the agent's browser field. The agent snapshots the page, then types and clicks by element ref.
import { Agent } from "@mastra/core/agent";
import { Memory } from "@mastra/memory";
import { FirecrawlBrowser } from "@mastra/browser-firecrawl";
export const portalAgent = new Agent({
id: "portal-agent",
name: "Portal Agent",
model: "openai/gpt-5.6-sol",
browser: new FirecrawlBrowser({ apiKey: process.env.FIRECRAWL_API_KEY }),
memory: new Memory(),
defaultOptions: { maxSteps: 40 },
instructions: "Snapshot the page before each action and use the refs to type and click.",
});People love
building with Firecrawl











Firecrawl is an open-source framework that takes a URL, crawls it, and conver..."

Upload a CSV of emails and..."



Firecrawl is an open-source framework that takes a URL, crawls it, and conver..."

Upload a CSV of emails and..."
Tutorials & guides
Give a Mastra Agent a Browser for Logged-in Pages with Firecrawl
Log a Mastra agent in to a portal with FirecrawlBrowser, keep each user's session separate, and stay signed in between runs with profiles.
Read tutorial →Mastra Tutorial: How to Build AI Agents in TypeScript
Build a changelog tracker with Mastra tools and workflows, using Firecrawl Search and Scrape for the web data.
Read tutorial →Frequently
asked questions
Flexible pricing
Free Plan
Hobby
StandardMost popular
Growth
Scale Plans
High-volume plans for teams that need more power and dedicated support. Get access to higher rate limits, more concurrent browsers, and priority support. Scale checks out instantly, no sales call needed.
Need more? Contact usAlso on AWS Marketplace and Google Cloud Marketplace.

















