{"id":51006560,"url":"https://github.com/MaestroError/LarAgent","last_synced_at":"2026-07-08T20:00:31.231Z","repository":{"id":268228170,"uuid":"903027523","full_name":"MaestroError/LarAgent","owner":"MaestroError","description":"Power of AI Agents in your Laravel project","archived":false,"fork":false,"pushed_at":"2026-05-08T13:04:26.000Z","size":1369,"stargazers_count":635,"open_issues_count":9,"forks_count":57,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-05-08T15:10:05.788Z","etag":null,"topics":["ai","ai-agents","framework","laravel","laravel-package"],"latest_commit_sha":null,"homepage":"https://laragent.ai/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaestroError.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"MaestroError"}},"created_at":"2024-12-13T19:17:49.000Z","updated_at":"2026-05-07T00:10:39.000Z","dependencies_parsed_at":"2024-12-15T11:28:26.551Z","dependency_job_id":"764d8264-2e4b-4c77-aecf-3ce896aed766","html_url":"https://github.com/MaestroError/LarAgent","commit_stats":null,"previous_names":["maestroerror/laragent"],"tags_count":20,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/MaestroError/LarAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaestroError%2FLarAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaestroError%2FLarAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaestroError%2FLarAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaestroError%2FLarAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaestroError","download_url":"https://codeload.github.com/MaestroError/LarAgent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaestroError%2FLarAgent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35276781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","framework","laravel","laravel-package"],"created_at":"2026-06-20T21:00:19.830Z","updated_at":"2026-07-08T20:00:31.226Z","avatar_url":"https://github.com/MaestroError.png","language":"PHP","funding_links":["https://github.com/sponsors/MaestroError"],"categories":["Natural Language Processing"],"sub_categories":["Laravel Integrations"],"readme":"# LarAgent\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/maestroerror/laragent.svg?style=flat-square)](https://packagist.org/packages/maestroerror/laragent)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/maestroerror/laragent/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/maestroerror/laragent/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/maestroerror/laragent/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/maestroerror/laragent/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/maestroerror/laragent.svg?style=flat-square)](https://packagist.org/packages/maestroerror/laragent)\n\n\u003e \"The **easiest** way to **create** and **maintain** AI agents in your Laravel projects.\"\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eLarAgent is an AI agent development framework for Laravel\u003c/strong\u003e\u003cbr\u003e\n  Officially powered by \u003ca href=\"https://redberry.international?utm_source=github\u0026utm_medium=github_laragent_readme\u0026utm_campaign=AI+service+campaign\"\u003eRedberry\u003c/a\u003e, a Diamond-tier Laravel partner.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://laragent.ai\"\u003eWebsite\u003c/a\u003e •\n  \u003ca href=\"https://docs.laragent.ai\"\u003eDocs\u003c/a\u003e •\n  \u003ca href=\"https://discord.gg/NAczq2T9F8\"\u003eDiscord\u003c/a\u003e •\n  \u003ca href=\"https://blog.laragent.ai\"\u003eBlog\u003c/a\u003e •\n  \u003ca href=\"https://redberry.international/ai-agent-development/?utm_source=github\u0026utm_medium=github_laragent_readme\u0026utm_campaign=AI+service+campaign\"\u003eAI Dev Sprint\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 What is LarAgent?\n\nLarAgent is an open-source framework that lets you create powerful AI agents in Laravel with minimal configuration and maximum extensibility.\n\nLarAgent brings Laravel-grade productivity to AI agent development. That’s why Laravel + LarAgent is the most productive stack out there for building AI agents.\n\nWhether you're looking to automate internal operations or build conversational experiences for your product, LarAgent offers developer-first tools:\n\n- Eloquent-style API for building real AI agents - define agents, tools, memories, and workflows\n- First-class tooling system with MCP server support\n- Pluggable memory \u0026 context management\n- Multi-agent workflows with queues, chainable tasks, and reasoning\n- Structured output for reliability and seamless integration\n- Multi-modal input and modular provider support\n- Extensive Event system for effortless customization and observability\n- Built-in API exposure via OpenAI-compatible schema\n\n---\n\n## 🧠 Backed by Redberry\n\nLarAgent is officially powered by [Redberry](https://redberry.international?utm_source=github\u0026utm_medium=github_laragent_readme\u0026utm_campaign=AI+service+campaign), one of only 10 Diamond-tier Laravel partners worldwide. This partnership ensures the continued evolution of LarAgent with increased engineering support, better documentation, and a growing ecosystem of AI-first Laravel tools.\n\n\u003e Need help with building your AI agent? [Talk to us](https://redberry.international/ai-agent-development/?utm_source=github\u0026utm_medium=github_laragent_readme\u0026utm_campaign=AI+service+campaign) about our 5-week PoC sprint for AI agent development.\n\n---\n\n## 📚 Documentation\n\nCheck out our [full documentation](https://docs.laragent.ai/introduction) to get started.\n\n__If you prefer article to get started, check it out: [Laravel AI Agent Development Made Easy](https://medium.com/towardsdev/laravel-ai-agent-development-made-easy-ac7ddd17a7d0)__\n\n---\n\n## 💬 Community \u0026 Support\n\nJoin our [Discord community](https://discord.gg/NAczq2T9F8) to ask questions, suggest features, or share what you're building.\n\n---\n\n## 🧩 Ecosystem\n\n- [MCP Client](https://github.com/RedberryProducts/mcp-client-laravel) – a modular client for managing tools and resources from MCP servers\n\nYou can find tutorials here: \n\n- LarAgent Blog - [Tutorials](https://blog.laragent.ai/tag/tutorials/)\n\n---\n       \n\u003e Each GitHub ⭐️ helps the community grow. Thanks for the support!\n\n\nAny questions? Join our [Discord](https://discord.gg/NAczq2T9F8) server!\n       \n---\n\n## Table of Contents\n\n- [📖 Introduction](#introduction)\n- [🎉 Features](#features) \n- [🚀 Getting Started](#getting-started)\n  - [Requirements](#requirements)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n- [🤝 Contributing](#contributing)\n- [🤝 Getting Help](#getting-help)\n- [🧪 Testing](#testing)\n- [🔒 Security](#security)\n- [🙌 Credits](#credits)\n- [📜 License](#license)\n- [🛣️ Roadmap](#roadmap)\n\n## Introduction\n\nLarAgent 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.\n\nWhat if you can create AI agents just like you create any other Eloquent model?\n\nWhy not?! 👇\n\n```bash\nphp artisan make:agent YourAgentName\n```\n\nAnd it looks familiar, isn't it?\n\n```php\nnamespace App\\AiAgents;\n\nuse LarAgent\\Agent;\n\nclass YourAgentName extends Agent\n{\n    protected $model = 'gpt-4';\n\n    protected $history = 'in_memory';\n\n    protected $provider = 'default';\n\n    protected $tools = [];\n\n    public function instructions()\n    {\n        return \"Define your agent's instructions here.\";\n    }\n\n    public function prompt($message)\n    {\n        return $message;\n    }\n}\n\n```\n\nAnd you can tweak the configs, like `history`\n\n```php\n// ...\nprotected $history = \\LarAgent\\History\\CacheChatHistory::class;\n// ...\n```\n\nOr add `temperature`:\n \n```php\n// ...\nprotected $temperature = 0.5;\n// ...\n```\nEven disable parallel tool calls:\n \n```php\n// ...\nprotected $parallelToolCalls = false;\n// ...\n```\n\nOr configure multi-provider fallback for automatic failover:\n\n```php\n// Simple array of providers (first is primary, others are fallbacks in order)\nprotected $provider = ['default', 'gemini', 'claude'];\n\n// With per-provider config overrides\nprotected $provider = [\n    'default',\n    'gemini' =\u003e ['model' =\u003e 'gemini-2.0-flash'],\n    'claude',\n];\n```\n\nOh, and add a new tool as well:\n\n```php\n// ...\n#[Tool('Get the current weather in a given location')]\npublic function exampleWeatherTool($location, $unit = 'celsius')\n{\n    return 'The weather in '.$location.' is '.'20'.' degrees '.$unit;\n}\n// ...\n```\n\nAnd run it, per user:\n\n```php\nUse App\\AiAgents\\YourAgentName;\n// ...\nYourAgentName::forUser(auth()-\u003euser())-\u003erespond($message);\n```\n\nOr use a custom name for the chat history:\n\n```php\nUse App\\AiAgents\\YourAgentName;\n// ...\nYourAgentName::for(\"custom_history_name\")-\u003erespond($message);\n```\n\nLet's find out more in [documentation](https://docs.laragent.ai/) 👍\n\n\n## Features\n\n- Eloquent-like syntax for creating and managing AI agents\n- Laravel-style artisan commands\n- Flexible agent configuration (model, temperature, context window, etc.)\n- Structured output handling\n- Image input support\n- Easily extendable, including chat histories and LLM drivers\n- Multiple built-in chat history storage options (in-memory, cache, json, etc.)\n    - Per-user chat history management\n    - Custom chat history naming support\n- Custom tool creation with attribute-based configuration\n    - Tools via classes\n    - Tools via methods of AI agent class (Auto)\n    - `Tool` facade for shortened tool creation\n    - Parallel tool execution capability (can be disabled)\n- Extensive Event system for agent interactions (Nearly everything is hookable)\n- Multiple provider support (Can be set per model)\n- Multi-provider fallback with automatic failover\n- Support for both Laravel and standalone usage\n\n## Getting Started\n\n### Requirements\n\n*   Laravel 10.x or higher\n*   PHP 8.3 or higher\n\n### Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require maestroerror/laragent\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"laragent-config\"\n```\n\nThese are the contents of the published config file:\n\n```php\nreturn [\n    'default_driver' =\u003e \\LarAgent\\Drivers\\OpenAi\\OpenAiDriver::class,\n    'default_chat_history' =\u003e \\LarAgent\\History\\InMemoryChatHistory::class,\n\n    'providers' =\u003e [\n\n        'default' =\u003e [\n            'label' =\u003e 'openai',\n            'api_key' =\u003e env('OPENAI_API_KEY'),\n            'default_truncation_threshold' =\u003e 50000,\n            'default_max_completion_tokens' =\u003e 100,\n            'default_temperature' =\u003e 1,\n        ],\n    ],\n];\n\n```\n\n### Configuration\n\nYou can configure the package by editing the `config/laragent.php` file. Here is an example of custom provider with all possible configurations you can apply:\n\n```php\n    // Example custom provider with all possible configurations\n    'custom_provider' =\u003e [\n        // Just name for reference, changes nothing\n        'label' =\u003e 'mini',\n        'model' =\u003e 'gpt-3.5-turbo',\n        'api_key' =\u003e env('CUSTOM_API_KEY'),\n        'api_url' =\u003e env('CUSTOM_API_URL'),\n        // Default driver and chat history\n        'driver' =\u003e \\LarAgent\\Drivers\\OpenAi\\OpenAiDriver::class,\n        'chat_history' =\u003e \\LarAgent\\History\\InMemoryChatHistory::class,\n        'default_truncation_threshold' =\u003e 15000,\n        'default_max_completion_tokens' =\u003e 100,\n        'default_temperature' =\u003e 1,\n        // Enable/disable parallel tool calls\n        'parallel_tool_calls' =\u003e true,\n        // Store metadata with messages\n        'store_meta' =\u003e true,\n        // Save chat keys to memory via chatHistory\n        'save_chat_keys' =\u003e true,\n    ],\n```\n\nProvider just gives you the defaults. Every config can be overridden per agent in agent class.\n\n#### OpenAI Responses API\n\nFor newer OpenAI models that require the Responses API (e.g. models using `reasoning_effort`), use the `OpenAiResponsesDriver`:\n\n```php\n    'openai_responses' =\u003e [\n        'label' =\u003e 'openai_responses',\n        'api_key' =\u003e env('OPENAI_API_KEY'),\n        'driver' =\u003e \\LarAgent\\Drivers\\OpenAi\\OpenAiResponsesDriver::class,\n        'default_truncation_threshold' =\u003e 50000,\n        'default_max_completion_tokens' =\u003e 10000,\n        'default_temperature' =\u003e 1,\n    ],\n```\n\nYou can then use `reasoning_effort` via the agent's `$extras` property:\n\n```php\nclass MyReasoningAgent extends Agent\n{\n    protected $provider = 'openai_responses';\n    protected $model = 'gpt-5.4-mini';\n    protected $extras = ['reasoning_effort' =\u003e 'high'];\n}\n```\n\nFor third-party providers offering a Responses-API-compatible endpoint, use `OpenAiResponsesCompatible` with an `api_url`.\n\n\n## Contributing\n\nWe welcome contributions to LarAgent! Whether it's improving documentation, fixing bugs, or adding new features, your help is appreciated. Here's how you can [contribute](https://docs.laragent.ai/development).\n\nWe aim to review all pull requests within a 2 weeks. Thank you for contributing to LarAgent!\n\n## Getting Help\n\n- Open an issue for bugs or feature requests\n- Join discussions in existing issues\n- Join community server on [Discord](https://discord.gg/NAczq2T9F8)\n- Reach out to maintainers for guidance\n\n\n## Testing\n\n```bash\ncomposer test\n```\n\nTo run manual tests create files in `testsManual\\.gitignore` with API keys and run:\n\n```bash\n./vendor/bin/pest testsManual\n```\n\nAPI key files looks like:\n```php\n\u003c?php\n\nreturn 'YourApiKey';\n```\n\n## Security\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\nThanks to these people and projects, LarAgent would not be possible without them:\n\n-   [maestroerror](https://github.com/maestroerror)\n-   [All Contributors](../../contributors)\n-   [Redberry International](https://redberry.international?utm_source=github\u0026utm_medium=github_laragent_readme\u0026utm_campaign=AI+service+campaign)\n-   [openai-php/client](https://github.com/openai-php/client)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Roadmap\n\nPlease see GitHub Projects for more information on the future development of LarAgent.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaestroError%2FLarAgent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMaestroError%2FLarAgent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaestroError%2FLarAgent/lists"}