Weave Code
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 open-source AI agent framework for Laravel. Build and maintain agents with an Eloquent-style API, pluggable tools (incl. MCP server support), memory/context management, multi-agent workflows, queues, and structured output for reliable integrations.

View on GitHub
Deep Wiki
Context7

Power of AI Agents in your Laravel project

Frequently asked questions about Laragent
How does LarAgent compare to Laravel Nova or Filament for AI agent integration?
LarAgent is a dedicated framework for AI agent development, not a UI toolkit like Nova or Filament. While Nova/Filament handle admin interfaces, LarAgent focuses on backend agent logic—Eloquent-style APIs, tooling, and workflows—making it ideal for embedding AI into Laravel apps without frontend bloat.
Can I use LarAgent with Laravel 10+ and PHP 8.3+ only? What if I’m on an older version?
Yes, LarAgent requires Laravel 10+ and PHP 8.3+ due to modern dependencies like Symfony 7+. If you’re on an older stack, you’ll need to upgrade or evaluate alternatives like custom LLM integrations or older Laravel packages with broader version support.
How do I define a custom tool for my agent? Does it support dynamic MCP tool registration?
Define tools using LarAgent’s Eloquent-like syntax (e.g., `Tool::make()->name('fetchUser')->description('Retrieves user data')->action(fn($userId) => User::find($userId))`). For dynamic MCP tools, use the `mcp-client-laravel` package to register tools at runtime, enabling SaaS-style pluggable features.
What memory providers does LarAgent support, and how do I customize chat history storage?
LarAgent includes built-in providers like `CacheChatHistory` (Laravel cache) and `DatabaseChatHistory` (Eloquent). For compliance or encryption needs, extend the `MemoryProvider` interface or integrate third-party storage (e.g., Redis with encryption) via Laravel’s caching layer.
How do I handle agent workflows with queues? Will parallel tool calls work in production?
Use `Agent::queue()` to dispatch workflows to Laravel queues. Parallel tool calls (`$parallelToolCalls = true`) improve speed but may hit API rate limits. Disable parallelism for synchronous tasks or monitor LLM provider quotas. Benchmark with your workload—queues add latency but scale horizontally.
Are there alternatives to LarAgent for Laravel AI agents? What’s the trade-off?
Alternatives include custom LLM integrations (e.g., OpenAI SDK) or frameworks like LangChain (PHP ports). LarAgent’s advantage is Laravel-native tooling (Eloquent APIs, queues, events) and structured output, reducing boilerplate. Custom solutions offer flexibility but lack built-in memory/workflow systems.
How do I secure agent interactions handling PII? Does LarAgent support encryption or retention policies?
LarAgent doesn’t enforce encryption by default, but you can wrap `MemoryProvider` storage (e.g., encrypt Redis cache or use Laravel’s `Encrypted` attribute for Eloquent models). For retention, implement custom `MemoryProvider` logic or integrate with Laravel’s scheduling for cleanup.
What’s the best way to debug agent tool failures or event listeners?
Use LarAgent’s events (`BeforeToolExecution`, `AfterToolExecution`) to log tool calls via Laravel’s logging or third-party tools like Laravel Debugbar. For workflow debugging, enable queue worker logging (`--verbose`) and trace agent execution with `Agent::debug(true)`.
Can I use LarAgent with multiple LLM providers (e.g., OpenAI + Anthropic) in the same app?
Yes, LarAgent supports multi-provider setups via the `LLM` facade. Configure providers in `config/laragent.php` and switch contexts dynamically (e.g., `LLM::use('anthropic')`). Fallback logic requires custom error handling for provider outages.
How do I deploy LarAgent agents to production? Are there specific concerns for latency or cost?
Deploy agents like any Laravel job: queue workers for async tasks, monitor LLM API costs (token usage), and set rate-limit alerts. Use `Agent::timeout()` to handle slow responses. For cost control, cache frequent tool responses or implement request batching.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope