Requirements
Before installing LarAgent, make sure your environment meets the following requirements:- Laravel 10.x or higher
- PHP 8.3 or higher
- OpenAI API key or other supported LLM provider API key
Installation
You can install LarAgent via Composer:config/laragent.php file in your application.
Configuration
OpenAi
If you are using OpenAI API, just set your API key in your.env file and you are good to go:
Configuration file
The published configuration file contains the following settings and default providers:Custom Providers
You can configure additional providers with custom settings:Creating Your First Agent
Using Artisan Command
The quickest way to create a new agent is using the provided Artisan command:App\AiAgents directory with all the necessary boilerplate code.
Basic Usage
Simple Response
Adding Tools
Tools allow your agent to perform actions and access external data:Next Steps
Now that you have LarAgent set up, you can explore more advanced features:Agents
Learn more about creating and configuring agents
Tools
Discover how to create powerful tools for your agents
Structured Output
Get responses in structured formats like JSON
Streaming
Stream responses in real-time for better UX

