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.
// ...#[Tool('Get the current weather in a given location')]public function exampleWeatherTool($location, $unit = 'celsius'){ return 'The weather in '.$location.' is '.'20'.' degrees '.$unit;}// ...
And run it, per user:
Copy
Use App\AiAgents\YourAgentName;// ...YourAgentName::forUser(auth()->user())->respond($message);
Or use your custom name for the chat history:
Copy
Use App\AiAgents\YourAgentName;// ...YourAgentName::for("custom_history_name")->respond($message);