Skip to content

Commit 5396cd2

Browse files
committed
[Agent][Tavily] Add symfony/ai-tavily-tool
1 parent b245a7a commit 5396cd2

File tree

14 files changed

+149
-9
lines changed

14 files changed

+149
-9
lines changed

docs/bundles/ai-bundle.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,15 +785,15 @@ To use existing tools, you can register them as a service:
785785
Symfony\AI\Agent\Toolbox\Tool\SerpApi:
786786
$apiKey: '%env(SERP_API_KEY)%'
787787
Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch: ~
788-
Symfony\AI\Agent\Toolbox\Tool\Tavily:
789-
$apiKey: '%env(TAVILY_API_KEY)%'
790788
Symfony\AI\Agent\Toolbox\Tool\Wikipedia: ~
791789
Symfony\AI\Agent\Toolbox\Tool\YouTubeTranscriber: ~
792790
Symfony\AI\Agent\Toolbox\Tool\Firecrawl:
793791
$endpoint: '%env(FIRECRAWL_ENDPOINT)%'
794792
$apiKey: '%env(FIRECRAWL_API_KEY)%'
795-
Symfony\AI\Agent\Toolbox\Tool\Brave:
793+
Symfony\AI\Agent\Bridge\Brave\Brave:
796794
$apiKey: '%env(BRAVE_API_KEY)%'
795+
Symfony\AI\Agent\Bridge\Tavily\Tavily:
796+
$apiKey: '%env(TAVILY_API_KEY)%'
797797
798798
Custom tools can be registered by using the :class:`Symfony\\AI\\Agent\\Toolbox\\Attribute\\AsTool` attribute::
799799

examples/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
"probots-io/pinecone-php": "^1.0",
1919
"psr/http-factory-implementation": "*",
2020
"symfony/ai-agent": "@dev",
21+
"symfony/ai-brave-tool": "@dev",
2122
"symfony/ai-chat": "@dev",
2223
"symfony/ai-platform": "@dev",
2324
"symfony/ai-store": "@dev",
24-
"symfony/ai-brave-tool": "@dev",
25+
"symfony/ai-tavily-tool": "@dev",
2526
"symfony/cache": "^7.3|^8.0",
2627
"symfony/clock": "^7.3|^8.0",
2728
"symfony/console": "^7.3|^8.0",

examples/openai/agent-stream-sources.php

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

1212
use Symfony\AI\Agent\Agent;
13+
use Symfony\AI\Agent\Bridge\Tavily\Tavily;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
1415
use Symfony\AI\Agent\Toolbox\Tool\Clock;
15-
use Symfony\AI\Agent\Toolbox\Tool\Tavily;
1616
use Symfony\AI\Agent\Toolbox\Toolbox;
1717
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1818
use Symfony\AI\Platform\Message\Message;

examples/toolbox/tavily.php

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

1212
use Symfony\AI\Agent\Agent;
13+
use Symfony\AI\Agent\Bridge\Tavily\Tavily;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
1415
use Symfony\AI\Agent\Toolbox\Tool\Clock;
15-
use Symfony\AI\Agent\Toolbox\Tool\Tavily;
1616
use Symfony\AI\Agent\Toolbox\Toolbox;
1717
use Symfony\AI\Platform\Bridge\OpenAi\PlatformFactory;
1818
use Symfony\AI\Platform\Message\Message;

src/agent/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ CHANGELOG
2525
- `SimilaritySearch` for RAG/vector store searches
2626
- `Agent` allowing agents to use other agents as tools
2727
- `Clock` for current date/time
28-
- `Brave` for web search integration
2928
- `Crawler` for web page crawling
3029
- `Mapbox` for geocoding addresses to coordinates and reverse geocoding
3130
- `OpenMeteo` for weather information
3231
- `SerpApi` for search engine results
33-
- `Tavily` for AI-powered search
3432
- `Wikipedia` for Wikipedia content retrieval
3533
- `YouTubeTranscriber` for YouTube video transcription
34+
* Add bridges:
35+
- `Brave` for web search integration (`symfony/ai-brave-tool`)
36+
- `Tavily` for AI-powered search (`symfony/ai-tavily-tool`)
3637
* Add structured output support:
3738
- PHP class output with automatic conversion from LLM responses
3839
- Array structure output with JSON schema validation
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

0 commit comments

Comments
 (0)