Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Crawl4aiTools enable an Agent to perform web crawling and scraping tasks using the Crawl4ai library.

Prerequisites

The following example requires the crawl4ai library.
uv pip install -U crawl4ai

Example

The following agent will scrape the content from the https://github.com/agno-agi/agno webpage:
cookbook/14_tools/crawl4ai_tools.py
from agno.agent import Agent
from agno.tools.crawl4ai import Crawl4aiTools

agent = Agent(tools=[Crawl4aiTools(max_length=None)])
agent.print_response("Tell me about https://github.com/agno-agi/agno.")

Toolkit Params

ParameterTypeDefaultDescription
max_lengthint1000Specifies the maximum length of the text from the webpage to be returned.
timeoutint60Timeout in seconds for web crawling operations.
use_pruningboolFalseEnable content pruning to remove less relevant content.
pruning_thresholdfloat0.48Threshold for content pruning relevance scoring.
bm25_thresholdfloat1.0BM25 scoring threshold for content relevance.
headlessboolTrueRun browser in headless mode.
wait_untilstr"domcontentloaded"Browser wait condition before crawling (e.g., “domcontentloaded”, “load”, “networkidle”).
enable_crawlboolTrueEnable the web crawling functionality.
allboolFalseEnable all available functions. When True, all enable flags are ignored.

Toolkit Functions

FunctionDescription
web_crawlerCrawls a website using crawl4ai’s WebCrawler. Parameters include ‘url’ for the URL to crawl and an optional ‘max_length’ to limit the length of extracted content. The default value for ‘max_length’ is 1000.

Developer Resources