Skip to content

Commit 12f62c6

Browse files
committed
Extract third party tools to extra component
1 parent 4523036 commit 12f62c6

File tree

80 files changed

+256
-95
lines changed

Some content is hidden

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

80 files changed

+256
-95
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
* **[Chat](src/chat/README.md)**: An unified interface to send messages to agents and store long-term context.
1919
* **[Store](src/store/README.md)**: Data storage abstraction with indexing and retrieval for AI applications.
20+
* **[Tools](src/tools/README.md)**: Collection of third-party tools to be used with 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 official 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
@@ -15,6 +15,7 @@
1515
"php-http/discovery": "^1.20",
1616
"runtime/frankenphp-symfony": "^0.2.0",
1717
"symfony/ai-bundle": "@dev",
18+
"symfony/ai-tools": "@dev",
1819
"symfony/asset": "~7.3.0",
1920
"symfony/asset-mapper": "~7.3.0",
2021
"symfony/clock": "~7.3.0",

demo/config/packages/ai.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ services:
9898
autowire: true
9999
autoconfigure: true
100100

101-
# Symfony\AI\Agent\Toolbox\Tool\Clock: ~
102-
# Symfony\AI\Agent\Toolbox\Tool\OpenMeteo: ~
103-
# Symfony\AI\Agent\Toolbox\Tool\SerpApi:
104-
# $apiKey: '%env(SERP_API_KEY)%'
105-
Symfony\AI\Agent\Toolbox\Tool\Wikipedia: ~
106101
Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch:
107102
$vectorizer: '@ai.vectorizer.openai'
108103
$store: '@ai.store.chroma_db.symfonycon'
@@ -111,6 +106,12 @@ services:
111106
Symfony\AI\Store\Document\Transformer\TextSplitTransformer: ~
112107
Symfony\AI\Store\Document\Transformer\TextTrimTransformer: ~
113108

109+
# Symfony\AI\Tools\Clock: ~
110+
# Symfony\AI\Tools\OpenMeteo: ~
111+
# Symfony\AI\Tools\SerpApi:
112+
# $apiKey: '%env(SERP_API_KEY)%'
113+
Symfony\AI\Tools\Wikipedia: ~
114+
114115
app.filter.week_of_symfony:
115116
class: 'Symfony\AI\Store\Document\Filter\TextContainsFilter'
116117
arguments:

examples/aimlapi/toolcall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
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\PlatformFactory;
1716
use Symfony\AI\Platform\Message\Message;
1817
use Symfony\AI\Platform\Message\MessageBag;
18+
use Symfony\AI\Tools\Wikipedia;
1919

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

examples/anthropic/toolcall.php

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

1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Agent\Toolbox\AgentProcessor;
14-
use Symfony\AI\Agent\Toolbox\Source\Source;
15-
use Symfony\AI\Agent\Toolbox\Tool\Wikipedia;
1614
use Symfony\AI\Agent\Toolbox\Toolbox;
1715
use Symfony\AI\Platform\Bridge\Anthropic\PlatformFactory;
1816
use Symfony\AI\Platform\Message\Message;
1917
use Symfony\AI\Platform\Message\MessageBag;
18+
use Symfony\AI\Tools\Wikipedia;
2019

2120
require_once dirname(__DIR__).'/bootstrap.php';
2221

examples/bedrock/toolcall-claude.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
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\PlatformFactory;
1716
use Symfony\AI\Platform\Message\Message;
1817
use Symfony\AI\Platform\Message\MessageBag;
18+
use Symfony\AI\Tools\Wikipedia;
1919

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

examples/bedrock/toolcall-nova.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
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\PlatformFactory;
1716
use Symfony\AI\Platform\Message\Message;
1817
use Symfony\AI\Platform\Message\MessageBag;
18+
use Symfony\AI\Tools\Wikipedia;
1919

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

examples/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"symfony/ai-chat": "@dev",
2222
"symfony/ai-platform": "@dev",
2323
"symfony/ai-store": "@dev",
24+
"symfony/ai-tools": "@dev",
2425
"symfony/cache": "^7.3|^8.0",
2526
"symfony/clock": "^7.3|^8.0",
2627
"symfony/console": "^7.3|^8.0",

examples/deepseek/structured-output-clock.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\Clock;
1514
use Symfony\AI\Agent\Toolbox\Toolbox;
1615
use Symfony\AI\Platform\Bridge\DeepSeek\PlatformFactory;
1716
use Symfony\AI\Platform\Message\Message;
1817
use Symfony\AI\Platform\Message\MessageBag;
1918
use Symfony\AI\Platform\StructuredOutput\PlatformSubscriber;
19+
use Symfony\AI\Tools\Clock;
2020
use Symfony\Component\Clock\Clock as SymfonyClock;
2121
use Symfony\Component\EventDispatcher\EventDispatcher;
2222

examples/deepseek/toolcall-stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
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\DeepSeek\PlatformFactory;
1716
use Symfony\AI\Platform\Message\Message;
1817
use Symfony\AI\Platform\Message\MessageBag;
18+
use Symfony\AI\Tools\Wikipedia;
1919

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

0 commit comments

Comments
 (0)