Description
The easiest way to create and maintain AI agents in your Laravel projects.
LarAgent brings the power of AI agents to your Laravel projects with an elegant syntax. Create, extend, and manage AI agents with ease while maintaining Laravel's fluent API design patterns.
What if you can create AI agents just like you create any other Eloquent model?
Why not?! 👇
php artisan make:agent YourAgentName
And it looks familiar, isn't it?
namespace App\AiAgents; use LarAgent\Agent; class YourAgentName extends Agent{ protected $model = 'gpt-4'; protected $history = 'in_memory'; protected $provider = 'default'; protected $tools = []; public function instructions() { return "Define your agent's instructions here."; } public function prompt($message) { return $message; }}
And you can tweak the configs, like history
// ...protected $history = \LarAgent\History\CacheChatHistory::class;// ...
Or add temperature:
// ...protected $temperature = 0.5;// ...
Even disable parallel tool calls:
// ...protected $parallelToolCalls = false;// ...
Recent Courses on Laravel Daily
NativePHP Mobile v4 with SuperNative: Mini-Course
5 lessons
18 min
Marketing for Developers in 2026
7 lessons
52 min
Laravel 13 Starter Kit Teams and Customizations
10 lessons
33 min