18
18
use Symfony \AI \Agent \AgentInterface ;
19
19
use Symfony \AI \Agent \Memory \MemoryInputProcessor ;
20
20
use Symfony \AI \Agent \Memory \StaticMemoryProvider ;
21
+ use Symfony \AI \Agent \MultiAgent \Handoff ;
22
+ use Symfony \AI \Agent \MultiAgent \MultiAgent ;
21
23
use Symfony \AI \AiBundle \AiBundle ;
22
24
use Symfony \AI \Store \Document \Filter \TextContainsFilter ;
23
25
use Symfony \AI \Store \Document \Loader \InMemoryLoader ;
27
29
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
28
30
use Symfony \Component \DependencyInjection \ContainerBuilder ;
29
31
use Symfony \Component \DependencyInjection \ContainerInterface ;
32
+ use Symfony \Component \DependencyInjection \Definition ;
30
33
use Symfony \Component \DependencyInjection \Reference ;
31
34
use Symfony \Component \Translation \TranslatableMessage ;
32
35
@@ -2129,7 +2132,7 @@ public function testValidMultiAgentConfiguration()
2129
2132
$ multiAgentDefinition = $ container ->getDefinition ('ai.multi_agent.support ' );
2130
2133
2131
2134
// Verify the class is correct
2132
- $ this ->assertSame (' Symfony\AI\Agent\ MultiAgent\MultiAgent ' , $ multiAgentDefinition ->getClass ());
2135
+ $ this ->assertSame (MultiAgent::class , $ multiAgentDefinition ->getClass ());
2133
2136
2134
2137
// Verify arguments
2135
2138
$ arguments = $ multiAgentDefinition ->getArguments ();
@@ -2146,8 +2149,8 @@ public function testValidMultiAgentConfiguration()
2146
2149
2147
2150
// Verify handoff structure
2148
2151
$ handoff = $ handoffs [0 ];
2149
- $ this ->assertInstanceOf (\ Symfony \ Component \ DependencyInjection \ Definition::class, $ handoff );
2150
- $ this ->assertSame (' Symfony\AI\Agent\MultiAgent\ Handoff' , $ handoff ->getClass ());
2152
+ $ this ->assertInstanceOf (Definition::class, $ handoff );
2153
+ $ this ->assertSame (Handoff::class , $ handoff ->getClass ());
2151
2154
$ handoffArgs = $ handoff ->getArguments ();
2152
2155
$ this ->assertCount (2 , $ handoffArgs );
2153
2156
$ this ->assertInstanceOf (Reference::class, $ handoffArgs [0 ]);
@@ -2223,8 +2226,8 @@ public function testMultiAgentWithMultipleHandoffs()
2223
2226
2224
2227
// Both handoffs should be Definition objects
2225
2228
foreach ($ handoffs as $ handoff ) {
2226
- $ this ->assertInstanceOf (\ Symfony \ Component \ DependencyInjection \ Definition::class, $ handoff );
2227
- $ this ->assertSame (' Symfony\AI\Agent\MultiAgent\ Handoff' , $ handoff ->getClass ());
2229
+ $ this ->assertInstanceOf (Definition::class, $ handoff );
2230
+ $ this ->assertSame (Handoff::class , $ handoff ->getClass ());
2228
2231
$ handoffArgs = $ handoff ->getArguments ();
2229
2232
$ this ->assertCount (2 , $ handoffArgs );
2230
2233
$ this ->assertInstanceOf (Reference::class, $ handoffArgs [0 ]);
@@ -2507,7 +2510,7 @@ public function testComprehensiveMultiAgentHappyPath()
2507
2510
2508
2511
// Test customer_support multi-agent configuration
2509
2512
$ customerSupportDef = $ container ->getDefinition ('ai.multi_agent.customer_support ' );
2510
- $ this ->assertSame (' Symfony\AI\Agent\ MultiAgent\MultiAgent ' , $ customerSupportDef ->getClass ());
2513
+ $ this ->assertSame (MultiAgent::class , $ customerSupportDef ->getClass ());
2511
2514
2512
2515
$ csArguments = $ customerSupportDef ->getArguments ();
2513
2516
$ this ->assertCount (4 , $ csArguments );
@@ -2523,14 +2526,14 @@ public function testComprehensiveMultiAgentHappyPath()
2523
2526
2524
2527
// Code expert handoff
2525
2528
$ codeHandoff = $ csHandoffs [0 ];
2526
- $ this ->assertInstanceOf (\ Symfony \ Component \ DependencyInjection \ Definition::class, $ codeHandoff );
2529
+ $ this ->assertInstanceOf (Definition::class, $ codeHandoff );
2527
2530
$ codeHandoffArgs = $ codeHandoff ->getArguments ();
2528
2531
$ this ->assertSame ('ai.agent.code_expert ' , (string ) $ codeHandoffArgs [0 ]);
2529
2532
$ this ->assertSame (['bug ' , 'error ' , 'code ' , 'debug ' , 'performance ' , 'optimization ' ], $ codeHandoffArgs [1 ]);
2530
2533
2531
2534
// Docs expert handoff
2532
2535
$ docsHandoff = $ csHandoffs [1 ];
2533
- $ this ->assertInstanceOf (\ Symfony \ Component \ DependencyInjection \ Definition::class, $ docsHandoff );
2536
+ $ this ->assertInstanceOf (Definition::class, $ docsHandoff );
2534
2537
$ docsHandoffArgs = $ docsHandoff ->getArguments ();
2535
2538
$ this ->assertSame ('ai.agent.docs_expert ' , (string ) $ docsHandoffArgs [0 ]);
2536
2539
$ this ->assertSame (['documentation ' , 'docs ' , 'readme ' , 'api ' , 'guide ' , 'tutorial ' ], $ docsHandoffArgs [1 ]);
0 commit comments