Installation
To get started with thecrawl4ai integration in AG2, follow these
steps:
-
Install AG2 with the
crawl4aiextra:Note: If you have been using
autogenorag2, all you need to do is upgrade it using:orasautogen, andag2are aliases for the same PyPI package. -
Set up Playwright:
-
For running the code in Jupyter, use
nest_asyncioto allow nested event loops.bash pip install nest_asyncio
Imports
LLM-Free Crawl4AI
Crawl4AI with LLM
Note:Crawl4AIis built on top of LiteLLM and supports the same models as LiteLLM. We had great experience withOpenAI,Anthropic,GeminiandOllama. However, as of this writing,DeepSeekis encountering some issues.