Overview
Concrete tool for web crawling with LLM-powered content extraction and structured page processing.
Description
The CrawlerBase class provides web crawling infrastructure with an `AutoPageContentHandler` for content processing. It uses an LLM for intelligent content extraction, supports async crawling, page navigation, and structured content extraction. Integrates with OpenRouter models for content analysis. The CrawlerCrawl4AIToolkit wraps `CrawlerBase` with `crawl4ai` for async web crawling with threaded concurrent execution.
Usage
- Web scraping: Crawl and extract structured content from web pages.
- Research workflows: Gather information from multiple pages concurrently.
- Content extraction: Use LLM to extract specific data from unstructured web content.
Code Reference
Source Location
Signature
class CrawlerBase:
# LLM-powered web crawling infrastructure
# AutoPageContentHandler for content processing
# Async crawling, page navigation, structured extraction
...
class CrawlerCrawl4AIToolkit(Toolkit):
# Wraps CrawlerBase with crawl4ai for async web crawling
# Threaded concurrent crawling with ThreadPoolExecutor
# Returns CrawlingResult with extracted content
...
Import
from evoagentx.tools.crawler_base import CrawlerBase
from evoagentx.tools.crawler_crawl4ai import CrawlerCrawl4AIToolkit
I/O Contract
Inputs
| Name |
Type |
Required |
Description
|
| urls |
List[str] |
Yes |
URLs to crawl
|
| llm |
BaseLLM |
No |
LLM for content extraction
|
Outputs
| Name |
Type |
Description
|
| crawl returns |
CrawlingResult |
Extracted content from crawled pages
|
Usage Examples
Crawl Web Pages
from evoagentx.tools.crawler_crawl4ai import CrawlerCrawl4AIToolkit
toolkit = CrawlerCrawl4AIToolkit()
# Attach to an agent for web crawling capabilities
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.