Skip to content

Commit 9e4e65f

Browse files
committed
[Agent][Firecrawl] Add symfony/ai-firecrawl-tool
Extract Firecrawl tool to a dedicated bridge following the same pattern as Tavily and Brave bridges. This creates a new package symfony/ai-firecrawl-tool with its own composer.json, tests, and dependencies. Changes: - Move Firecrawl.php to src/agent/src/Bridge/Firecrawl/ - Update namespace from Symfony\AI\Agent\Toolbox\Tool to Symfony\AI\Agent\Bridge\Firecrawl - Move tests and fixtures to bridge directory - Create dedicated composer.json for the bridge - Update examples to use new namespace - Update documentation with new namespace
1 parent 1f2a8f1 commit 9e4e65f

21 files changed

+217
-79
lines changed

docs/bundles/ai-bundle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ To use existing tools, you can register them as a service:
787787
Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch: ~
788788
Symfony\AI\Agent\Toolbox\Tool\Wikipedia: ~
789789
Symfony\AI\Agent\Toolbox\Tool\YouTubeTranscriber: ~
790-
Symfony\AI\Agent\Toolbox\Tool\Firecrawl:
790+
Symfony\AI\Agent\Bridge\Firecrawl\Firecrawl:
791791
$endpoint: '%env(FIRECRAWL_ENDPOINT)%'
792792
$apiKey: '%env(FIRECRAWL_API_KEY)%'
793793
Symfony\AI\Agent\Bridge\Brave\Brave:

examples/toolbox/firecrawl-crawl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
use Symfony\AI\Agent\Agent;
13+
use Symfony\AI\Agent\Bridge\Firecrawl\Firecrawl;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Firecrawl;
1515
use Symfony\AI\Agent\Toolbox\Toolbox;
1616
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1717
use Symfony\AI\Platform\Message\Message;

examples/toolbox/firecrawl-map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
use Symfony\AI\Agent\Agent;
13+
use Symfony\AI\Agent\Bridge\Firecrawl\Firecrawl;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Firecrawl;
1515
use Symfony\AI\Agent\Toolbox\Toolbox;
1616
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1717
use Symfony\AI\Platform\Message\Message;

examples/toolbox/firecrawl-scrape.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
use Symfony\AI\Agent\Agent;
13+
use Symfony\AI\Agent\Bridge\Firecrawl\Firecrawl;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Firecrawl;
1515
use Symfony\AI\Agent\Toolbox\Toolbox;
1616
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1717
use Symfony\AI\Platform\Message\Message;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/Tests export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/.git* export-ignore
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Please do not submit any Pull Requests here. They will be closed.
2+
---
3+
4+
Please submit your PR here instead:
5+
https://github.com/symfony/ai
6+
7+
This repository is what we call a "subtree split": a read-only subset of that main repository.
8+
We're looking forward to your PR there!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Close Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: superbrothers/close-pull-request@v3
12+
with:
13+
comment: |
14+
Thanks for your Pull Request! We love contributions.
15+
16+
However, you should instead open your PR on the main repository:
17+
https://github.com/symfony/ai
18+
19+
This repository is what we call a "subtree split": a read-only subset of that main repository.
20+
We're looking forward to your PR there!
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor/
2+
composer.lock
3+
phpunit.xml
4+
.phpunit.result.cache
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG
2+
=========
3+
4+
0.1
5+
---
6+
7+
* Add the bridge

src/agent/src/Toolbox/Tool/Firecrawl.php renamed to src/agent/src/Bridge/Firecrawl/Firecrawl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\AI\Agent\Toolbox\Tool;
12+
namespace Symfony\AI\Agent\Bridge\Firecrawl;
1313

1414
use Symfony\AI\Agent\Toolbox\Attribute\AsTool;
1515
use Symfony\Contracts\HttpClient\HttpClientInterface;

0 commit comments

Comments
 (0)