-
Notifications
You must be signed in to change notification settings - Fork 481
Ag2 1905 add firecrawl web tool 20250620 #1909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ag2 1905 add firecrawl web tool 20250620 #1909
Conversation
- Cast API return values to dict[str, Any] to satisfy return type annotations - Fix Optional parameter passing by providing fallback values - Update test calls to include required firecrawl_api_key and firecrawl_api_url parameters - All mypy errors resolved and pre-commit hooks pass
- Fixed test mocking to use _execute_firecrawl_* functions instead of FirecrawlApp - Fixed mypy type errors by casting FirecrawlApp return values to dict[str, Any] - Fixed Optional parameter passing to underlying functions - All tests now pass (12 passed, 2 skipped) - All mypy type checks pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the Firecrawl web scraping and crawling tool to the AG2 framework, including code integration, documentation, tests, and example notebooks.
- Registers
FirecrawlToolin the core API and WebSurferAgent - Provides user-guide docs and API reference for Firecrawl
- Adds unit tests and example notebooks for Firecrawl usage
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/user-guide/reference-tools/index.mdx | Adds Firecrawl section to tools index |
| website/docs/user-guide/reference-tools/firecrawl.mdx | New detailed Firecrawl tool documentation |
| autogen/tools/experimental/firecrawl/init.py | Introduces FirecrawlTool module |
| autogen/tools/experimental/init.py | Exposes FirecrawlTool in experimental tools |
| autogen/agents/experimental/websurfer/websurfer.py | Integrates FirecrawlTool into WebSurferAgent |
| test/tools/experimental/firecrawl/test_firecrawl.py | Adds unit tests for FirecrawlTool |
| test/agents/experimental/websurfer/test_websurfer.py | Updates WebSurferAgent tests to include firecrawl |
| notebook/websurfer_firecrawl_example.ipynb | Example notebook for WebSurferAgent+Firecrawl |
| notebook/tools_firecrawl.ipynb | Example notebook for FirecrawlTool |
Comments suppressed due to low confidence (3)
website/docs/user-guide/reference-tools/firecrawl.mdx:98
- Clarify in the URL Mapping section that map() returns a list of dictionaries each containing 'url', 'title', and 'content' (title/content may be empty), rather than just raw URLs.
### URL Mapping
website/docs/user-guide/reference-tools/firecrawl.mdx:76
- Mention that crawl() also accepts optional override parameters
firecrawl_api_keyandfirecrawl_api_urlso users know how to switch endpoints at runtime.
### Website Crawling
notebook/websurfer_firecrawl_example.ipynb:96
- Remove or correct entries ('Search' and 'Deep Research') under Available Firecrawl Methods since FirecrawlTool only supports scrape, crawl, and map.
"4. **Search**: Search the web for content\n",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Codecov ReportAttention: Patch coverage is
... and 58 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Why are these changes needed?
Add FireCrawl as a web search and URL scraping tool
Related issue number
Closes #1905
Checks