LarAgent  by MaestroError

Laravel SDK for AI agent creation and management

Created 9 months ago
467 stars

Top 65.2% on SourcePulse

GitHubView on GitHub
Project Summary

LarAgent provides a framework for integrating AI agents into Laravel applications, simplifying the creation and management of conversational AI functionalities. It targets Laravel developers seeking to leverage LLMs within their existing projects, offering an Eloquent-like syntax for agent definition and interaction.

How It Works

LarAgent abstracts LLM interactions through an Agent class, allowing developers to define agent behavior, models, and chat history management using familiar Laravel patterns. Agents can be configured with specific instructions, prompts, and tools (function calling), enabling complex AI-driven tasks. The framework supports various chat history storage mechanisms and offers a flexible event system for customizing agent lifecycles.

Quick Start & Requirements

  • Install via Composer: composer require maestroerror/laragent
  • Requires Laravel 10.x+ and PHP 8.3+.
  • Configuration is managed via config/laragent.php and .env for API keys.
  • Official documentation: https://github.com/MaestroError/LarAgent#readme

Highlighted Details

  • Eloquent-like syntax for agent creation (php artisan make:agent).
  • Support for custom tools via methods (with #[Tool] attribute) or classes.
  • Multiple chat history options: in-memory, cache, session, file, JSON.
  • Structured output support with JSON Schema validation.
  • Real-time streaming responses (respondStreamed, streamResponse).
  • OpenAI-compatible driver for other LLM providers (e.g., Ollama, OpenRouter).
  • Extensive event system for hooking into agent lifecycle and engine processes.

Maintenance & Community

  • Active development with a clear roadmap including Gemini, Anthropic, RAG, and streaming support.
  • Community engagement via GitHub issues and discussions.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source Laravel applications.

Limitations & Caveats

The project is under active development, with some features marked as "Planned" or "@todo". While designed for Laravel, standalone usage outside of Laravel is supported but requires consulting separate documentation.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
4
Issues (30d)
5
Star History
46 stars in the last 30 days

Explore Similar Projects

Starred by Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
29 more.

browser-use by browser-use

0.6%
70k
SDK for AI agent browser control
Created 10 months ago
Updated 1 day ago
Feedback? Help us improve.