Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laragent Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Abstraction churn. The v0.7→v0.8 changelog shows breaking changes to BeforeToolExecution/AfterToolExecution event signatures and hook callback arity. Even at v1.x, treat minor bumps as potentially breaking. Budget for pinning and upgrade testing.
  • Low external validation. 0 dependents means no observable production usage to learn from; the 645-star count reflects interest, not adoption depth. Absence of dependents is a genuine signal for a TPM weighing "safe to standardize on."
  • Maintainer concentration. Single primary author, mitigated by Redberry (Diamond-tier Laravel partner) backing and an active release cadence (v1.0 added Laravel 13 support).
  • Provider abstraction leakage. OpenAI's Responses API needs a distinct driver (OpenAiResponsesDriver); third-party Responses-compatible endpoints need yet another (OpenAiResponsesCompatible). The "one abstraction for all providers" story has caveats.
  • Security surface. Tool execution invokes real PHP methods with LLM-controlled arguments, plus MCP client integration. That is prompt-injection-to-code-execution adjacency and must be sandboxed and reviewed.

Key questions for the maintainers.

  • What is the stability commitment for events/hooks across 1.x minors, and is there a 2.0 roadmap?
  • What sandboxing, argument validation, and rate-limiting guidance exists for tool calls and MCP tools?
  • How does the framework integrate with Telescope, Horizon, and Sentry for agent-level observability?
  • What are the data-residency and retention implications of chat history backends (cache vs. JSON vs. custom)?

Integration Approach

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.

  1. Spike — one internal, non-customer-facing agent (search, summarization, or internal ops) to validate provider config, history backend, and event hooks.
  2. Harden — lock tool allow-lists, add validation on tool arguments, wire events into existing logging/monitoring.
  3. Expand — add multi-agent workflows only after single-agent paths prove stable under load.
  4. Standardize — pin a verified version, document upgrade process, and formalize provider-config ownership.

Operational Impact

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.

  • Provider outages / rate limits — covered by multi-provider fallback; add alerting on failed failovers.
  • Tool execution failures — surfaced through the event system; hook AfterToolExecution into existing alerting.
  • Context overflow — silent truncation is a correctness risk; set per-provider thresholds explicitly and log truncation events.
  • Structured-output violations — driver-dependent reliability; treat strict tool use as a per-provider capability to be verified, not assumed.
  • Secret exposure — all provider keys live in env; the OpenAI-compatible endpoint must not be exposed publicly without auth.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel