maestroerror/laragent
LarAgent is an AI agent development framework for Laravel. Build and maintain agents with an Eloquent-style API, first-class tools and MCP server support, pluggable memory and context, multi-agent workflows, and structured output for reliable results.
Architecture fit. LarAgent is a Laravel-native agent framework that follows framework conventions rather than fighting them: service provider registration, config publishing via vendor:publish, artisan generators (make:agent), attribute-based tooling, and an Eloquent-flavored agent class (::forUser(), ::for()). For a Laravel/PHP stack, this is a significantly lower structural cost than introducing Python (LangChain/LangGraph) or Node (LangChain.js) sidecars. Agent definitions live in App\AiAgents, so the codebase stays homogeneous and standard PHP tooling (PHPStan, Pest, Pint) continues to apply.
Integration feasibility. Install is a single composer require plus config publish. Hard constraints are Laravel ≥10 and PHP ≥8.3-8.5, which are modern but realistic for current projects. Provider configuration is env-driven and per-agent overridable, so it slots into existing secret management. Chat history, tool execution, and event hooks are all configurable — meaning the framework maps cleanly onto existing auth, cache, and queue infrastructure.
Technical risk.
BeforeToolExecution/AfterToolExecution event signatures and hook callback arity. Even at v1.x, treat minor bumps as potentially breaking. Budget for pinning and upgrade testing.OpenAiResponsesDriver); third-party Responses-compatible endpoints need yet another (OpenAiResponsesCompatible). The "one abstraction for all providers" story has caveats.Key questions for the maintainers.
Stack fit. Best-in-class fit for a standard Laravel app already using PHP 8.3+, Redis/cache, queues, and Horizon. Chat history backends (InMemoryChatHistory, CacheChatHistory, JSON store) map directly onto existing storage primitives. Multi-agent workflows riding the queue system means no new runtime — just Horizon workers.
Migration path. Greenfield pilots are trivial: define a provider, an agent class, run respond(). Brownfield integration should be tool-first: expose existing domain services as #[Tool] methods and let the agent orchestrate rather than rewriting business logic. Existing controllers, policies, and events remain authoritative; the agent becomes an additional caller.
Compatibility. Multi-provider fallback (protected $provider = ['default','gemini','claude']) with per-provider model overrides provides resilience without code changes. OpenAI-compatible API exposure from the package lets existing front-ends or downstream services call agents as if they were model endpoints — a useful decoupling lever.
Sequencing.
Maintenance. Composer-managed with an MIT license and an active changelog; but the observed cadence includes breaking event/hook changes on minor bumps. Operationalize this with version pinning, a dedicated upgrade ticket per release, and an integration test suite covering hook signatures.
Support. Documentation at docs.laragent.ai, a Discord community, GitHub issues, a blog with tutorials, and a commercial path via Redberry's 5-week AI PoC sprint. Realistically, the team should assume self-support for anything beyond documented patterns; Redberry engagement is the escalation route for non-trivial incidents.
Scaling. Agents themselves are stateless; state lives in the configured chat history backend — so horizontal scaling reduces to standard Laravel scaling (Horizon workers, cache sizing). The real scaling constraints are LLM-side: per-provider rate limits, token-budget management (default_truncation_threshold, default_max_completion_tokens), and cost-per-request. Multi-agent workflows multiply request volume — track cost per user/agent as a first-class metric before opening to customers.
Failure modes to design for.
AfterToolExecution into existing alerting.Ramp-up. For Laravel developers, the Eloquent-style API means near-zero framework ramp — an afternoon to first working agent. The real learning curve is LLM-specific: tool-calling semantics, context-window management, cost/latency tradeoffs, and prompt-injection mitigation. Expect 1-2 weeks for a mid-level team to reach production confidence, and budget for a designated agent-platform owner because the abstraction is still evolving.
How can I help you explore Laravel packages today?