Skip to content

Commit 993d11b

Browse files
committed
Create symfony/ai-tools package
Move third-party tools from agent component to new dedicated package: - Brave Search, Firecrawl, Mapbox, OpenMeteo, SerpApi, Tavily, Wikipedia, YouTube Transcriber - Create new package structure with composer.json, tests, documentation - Update namespaces from Symfony\AI\Agent\Toolbox\Tool to Symfony\AI\Toolbox\Tool - Reorganize test fixtures into tool-specific subdirectories - Update examples and demo configurations to use new package - Clean up agent component by removing moved tools and fixtures
1 parent f612478 commit 993d11b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+582
-67
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Symfony AI consists of several lower and higher level **components** and the res
1717
* **[Agent](src/agent/README.md)**: Framework for building AI agents that can interact with users and perform tasks.
1818
* **[Store](src/store/README.md)**: Data storage abstraction with indexing and retrieval for AI applications.
1919
* **[MCP SDK](src/mcp-sdk/README.md)**: SDK for [Model Context Protocol](https://modelcontextprotocol.io) enabling communication between AI agents and tools.
20+
* **[Toolbox](src/tools/README.md)**: Collection of third-party tools for AI agents.
2021
* **Bundles**
2122
* **[AI Bundle](src/ai-bundle/README.md)**: Symfony integration for AI Platform, Store and Agent components.
2223
* **[MCP Bundle](src/mcp-bundle/README.md)**: Symfony integration for MCP SDK, allowing them to act as MCP servers or clients.

demo/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"php-http/discovery": "^1.20",
1414
"runtime/frankenphp-symfony": "^0.2.0",
1515
"symfony/ai-bundle": "@dev",
16+
"symfony/ai-tools": "@dev",
1617
"symfony/asset": "~7.3.0",
1718
"symfony/asset-mapper": "~7.3.0",
1819
"symfony/clock": "~7.3.0",

demo/config/packages/ai.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ai:
3838
text: 'Please answer the users question based on Wikipedia and provide a link to the article.'
3939
include_tools: true
4040
tools:
41-
- 'Symfony\AI\Agent\Toolbox\Tool\Wikipedia'
41+
- 'Symfony\AI\Toolbox\Tool\Wikipedia'
4242
audio:
4343
model:
4444
class: 'Symfony\AI\Platform\Bridge\OpenAi\Gpt'
@@ -75,14 +75,15 @@ services:
7575
autoconfigure: true
7676

7777
# Symfony\AI\Agent\Toolbox\Tool\Clock: ~
78-
# Symfony\AI\Agent\Toolbox\Tool\OpenMeteo: ~
79-
# Symfony\AI\Agent\Toolbox\Tool\SerpApi:
80-
# $apiKey: '%env(SERP_API_KEY)%'
81-
Symfony\AI\Agent\Toolbox\Tool\Wikipedia: ~
8278
Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch:
8379
$vectorizer: '@ai.vectorizer.openai'
8480
$store: '@ai.store.chroma_db.symfonycon'
8581

82+
# Symfony\AI\Toolbox\Tool\OpenMeteo: ~
83+
# Symfony\AI\Toolbox\Tool\SerpApi:
84+
# $apiKey: '%env(SERP_API_KEY)%'
85+
Symfony\AI\Toolbox\Tool\Wikipedia: ~
86+
8687
Symfony\AI\Store\Document\Loader\RssFeedLoader: ~
8788
Symfony\AI\Store\Document\Transformer\TextTrimTransformer: ~
8889

examples/aimlapi/toolcall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\AiMlApi\Completions;
1716
use Symfony\AI\Platform\Bridge\AiMlApi\PlatformFactory;
1817
use Symfony\AI\Platform\Capability;
1918
use Symfony\AI\Platform\Message\Message;
2019
use Symfony\AI\Platform\Message\MessageBag;
20+
use Symfony\AI\Toolbox\Tool\Wikipedia;
2121

2222
require_once dirname(__DIR__).'/bootstrap.php';
2323

examples/anthropic/toolcall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\Anthropic\Claude;
1716
use Symfony\AI\Platform\Bridge\Anthropic\PlatformFactory;
1817
use Symfony\AI\Platform\Message\Message;
1918
use Symfony\AI\Platform\Message\MessageBag;
19+
use Symfony\AI\Toolbox\Tool\Wikipedia;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

examples/bedrock/toolcall-claude.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\Anthropic\Claude;
1716
use Symfony\AI\Platform\Bridge\Bedrock\PlatformFactory;
1817
use Symfony\AI\Platform\Message\Message;
1918
use Symfony\AI\Platform\Message\MessageBag;
19+
use Symfony\AI\Toolbox\Tool\Wikipedia;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

examples/bedrock/toolcall-nova.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\Bedrock\Nova\Nova;
1716
use Symfony\AI\Platform\Bridge\Bedrock\PlatformFactory;
1817
use Symfony\AI\Platform\Message\Message;
1918
use Symfony\AI\Platform\Message\MessageBag;
19+
use Symfony\AI\Toolbox\Tool\Wikipedia;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

examples/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"symfony/ai-agent": "@dev",
2020
"symfony/ai-platform": "@dev",
2121
"symfony/ai-store": "@dev",
22+
"symfony/ai-tools": "@dev",
2223
"symfony/cache": "^7.3|^8.0",
2324
"symfony/console": "^7.3|^8.0",
2425
"symfony/css-selector": "^7.3|^8.0",

examples/dockermodelrunner/toolcall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\DockerModelRunner\Completions;
1716
use Symfony\AI\Platform\Bridge\DockerModelRunner\PlatformFactory;
1817
use Symfony\AI\Platform\Message\Message;
1918
use Symfony\AI\Platform\Message\MessageBag;
19+
use Symfony\AI\Toolbox\Tool\Wikipedia;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

examples/mistral/toolcall-stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Tool\YouTubeTranscriber;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\Mistral\Mistral;
1716
use Symfony\AI\Platform\Bridge\Mistral\PlatformFactory;
1817
use Symfony\AI\Platform\Message\Message;
1918
use Symfony\AI\Platform\Message\MessageBag;
19+
use Symfony\AI\Toolbox\Tool\YouTubeTranscriber;
2020

2121
require_once dirname(__DIR__).'/bootstrap.php';
2222

0 commit comments

Comments
 (0)