LarAgent v0.4 is here — Gemini, Streaming, Fallbacks & More! 🚀

LarAgent v0.4 is here — Gemini, Streaming, Fallbacks & More! 🚀

We’re excited to announce the release of LarAgent v0.4.0, bringing major upgrades that make your Laravel-based AI agents faster, smarter, and more resilient.

Let’s break down what’s new 👇


🔹 Gemini Driver Support
Now you can use Google’s Gemini API alongside OpenAI with zero hassle. Swap drivers effortlessly and explore multiple LLMs in your projects.

use LarAgent\Drivers\OpenAi\GeminiDriver;

🔹 Streaming Responses
Get real-time output as the model generates it. Perfect for chatbots or anything interactive. No more waiting for full responses.

$stream = YourAgent::forUser($user)->respondStreamed($input);

🔹 Fallback Provider Logic
Your agent now auto-switches to a fallback provider when the primary fails — due to rate limits, downtime, or network errors.

Set it in your config:

'fallback_provider' => 'default'

🔹 Flexible Configuration Per Agent
Need different settings for each agent? Now you can override apiKey, apiUrl, or fetch them dynamically from your DB or tenant logic.

public function getApiKey(): string
{
    return auth()->user()->apiKey;
}

🔹 Tooling Upgrades
You can now add/remove tools dynamically at runtime using either class references or objects — no need to hardcode.

$agent->withTool(MyTool::class);
$agent->removeTool(MyTool::class);

This release is packed with enhancements to make your agents more modular, reliable, and developer-friendly.

Check the full docs here 👉 https://docs.laragent.ai

Subscribe to learn more about AI development with Laravel 💪

Happy building,
The LarAgent Team 💥

Read more