Tool Management Made More Flexible in LarAgent

Tool Management Made More Flexible in LarAgent

We're excited to announce a major improvement in the flexibility and reliability of tool management within the agent system!

The latest PR introduces dynamic runtime management of tools, allowing you to add or remove tools on the fly. This enhancement addresses initialization issues, improves type safety, and ensures robust handling of tool instances and class references.

šŸ”§ Key Features:

Now you can add a tool at runtime

With the newly created tool object

$tool = Tool::create('test_tool', 'Test tool')->setCallback(fn () => 'test');
$agent->withTool($tool);

With the predefined tool class

$agent->withTool(WeatherTool::class);

And you can remove tools at runtime:

With tool name

// Remove tool by name
$agent->removeTool('get_current_weather');

With the tool object

$tool = Tool::create('test_tool', 'Test tool')->setCallback(fn () => 'test');
$agent->withTool($tool);
if (!$needsTool) {
    $agent->removeTool($tool);
}

With the tool class

$agent->removeTool(WeatherTool::class);

šŸ”„ Note: These changes will be deployed with version 0.4 soon. Stay tuned!

Read more

LarAgent v1.0 - Production-Ready AI Agents for Laravel

LarAgent v1.0 - Production-Ready AI Agents for Laravel

This major release takes LarAgent to the next level - focused on structured responses, reliable context management, richer tooling, and production-grade agent behavior. Designed for both development teams and business applications where predictability, observability, and scalability matter šŸ› ļø Structured Outputs with DataModel LarAgent introduces DataModel-based structured responses, moving beyond arrays to

By Revaz Gh.