Skip to main content
Integrate Firecrawl, the context API for AI agents, with Microsoft AutoGen to give multi-agent conversations live web search and scrape tools. Microsoft has archived AutoGen, so start new projects on Microsoft Agent Framework.
Microsoft has archived AutoGen and no longer maintains it. For new projects, Microsoft recommends Microsoft Agent Framework, and existing projects can follow the migration guide. The Firecrawl functions below are plain Python, so you can reuse them as tools there.

Setup

Set your keys:

Firecrawl as an AutoGen Tool

This example wraps Firecrawl’s scrape and search as AutoGen function tools, then lets a single AssistantAgent use them to answer a question.
Run it:

Multi-Agent: Researcher + Writer

Hand Firecrawl output from a researcher agent to a writer agent in a round-robin team.

Notes

  • These examples use the synchronous Firecrawl client, which works inside AutoGen’s event loop for small workloads. For heavy concurrent scraping, use AsyncFirecrawl with async def tools, or use batch scrape.
  • Replace OpenAIChatCompletionClient with any AutoGen-supported model client (Azure OpenAI, Anthropic via autogen-ext, Ollama, etc.). Firecrawl is model-agnostic.
  • See the AutoGen docs for agent patterns beyond round-robin (selector, swarm, nested teams).