Mapping Laravel's AI Ecosystem: Prism, LarAgent, Neuron AI and Boost
From plain LLM calls to full agents in Laravel: what Prism, LarAgent, Neuron AI, the AI SDK and Boost each do, with a RAG example for HR policy questions.
This article is published in English.
Sources: From Calling an LLM to Building an Autonomous Agent: Mapping Laravel’s AI Ecosystem in 2026
Search Packagist for "laravel ai" and the list is dizzying. Dozens of packages have appeared over the last year, each billing itself as the easiest route to AI agents in Laravel. The names blur together and the READMEs all sound convincing, but once you install a few they turn out to solve rather different problems.
Plenty of developers have been burned by this. Someone wants a simple text-summary feature and ends up pulling in an entire agent framework with memory management, tool calling and multi-step orchestration that the feature never needed. The outcome is a pile of boilerplate and a setup that takes longer than the feature itself.
What follows sorts out three main players in Laravel's agent ecosystem, Prism, LarAgent and Neuron AI. It also untangles two names that get confused all the time, the Laravel AI SDK and Laravel Boost, and ends with a practical case: an assistant that answers questions from internal company documents.
From raw API calls to an ecosystem
A couple of years back, adding AI to a Laravel app had one route. You took the HTTP client, posted to the OpenAI endpoint by hand and parsed the JSON yourself. Moving to Anthropic the next day meant rewriting that code.
The picture is different now. The Laravel core team reportedly shipped an official AI SDK in early 2026, bundled with Boost and MCP support as part of a broader Laravel AI suite. More choice brings more decision fatigue, so a clear mental model matters: when is an agent framework needed, and when will the simplest tool do?
The ecosystem also moves quickly. A package that's popular this month may be stagnant in six months while another becomes the community favourite. Rather than memorising names, learn the category of problem each tool addresses. Get the category right and picking a tool is easy, even when a new one appears next month.
Calling an LLM versus having an agent
Most of the confusion starts here. Many developers assume that using AI means using an agent, yet the two sit at very different levels of complexity.
- Calling an LLM is simple: one prompt in, one response out. Think of generating a product description or summarising an article in three sentences. The exchange runs one way and nothing is decided along the route.
- An agent reasons through several steps. It chooses when to call a tool, when to ask a follow-up, when to pull data from a database before replying and when the job is done. There's a decision loop and not a single request-response cycle.
If the need is the first kind, reaching for an agent framework is like renting a shipping container to carry a week of groceries. It works, but it's wasted effort, and that's exactly where Prism makes sense.
Prism: the base layer for talking to an LLM
Prism is the lightest of the three. It's purely an abstraction layer. You write code once and swap providers, whether OpenAI, Anthropic, Gemini, Mistral, Ollama or others, without changing your code's structure. Basic text generation looks like this:
use Prism\Prism\Facades\Prism;
use Prism\Prism\Enums\Provider;
$response = Prism::text()
->using(Provider::Anthropic, 'claude-3-7-sonnet-latest')
->withSystemPrompt('You are an assistant who explains technical terms in plain language.')
->withPrompt('Explain what dependency injection is.')
->asText();
echo $response->text;
Its pleasant quality is a consistent interface across providers. Going from Anthropic to OpenAI means altering the using() call and nothing else. It also covers structured output, basic tool calling and image and document inputs.
Keep its limits in mind, though. Prism isn't meant to manage long-running state or autonomous multi-step workflows. If you want AI that feels alive, with memory and the ability to act across a chain of decisions, Prism by itself won't do it. That's where LarAgent comes in.
LarAgent: agents built like Eloquent models
LarAgent takes an approach that feels familiar at once to Laravel developers: you define an agent much as you'd define an Eloquent model. There's an artisan command, a class structure and configuration with a clearly Laravel flavour.
namespace App\AiAgents;
use LarAgent\Agent;
use LarAgent\Attributes\Tool;
class SupportAgent extends Agent
{
protected $model = 'gpt-4o';
protected $history = 'in_memory';
protected $provider = 'default';
public function instructions()
{
return 'You are a support agent that helps users track their order status.';
}
#[Tool('Get order status by invoice number')]
public function getOrderStatus($invoiceNumber)
{
return Order::where('invoice', $invoiceNumber)->first()?->status ?? 'Order not found';
}
}
After that, the agent can be called for a specific user, with conversation history stored automatically:
use App\AiAgents\SupportAgent;
SupportAgent::forUser(auth()->user())->respond($userMessage);
Compare this with Prism. Here a tool is registered through the #[Tool] attribute, and the agent itself decides when to invoke it based on what the user says. That's the agent behaviour described earlier, a decision layer underneath and not a single exchange.
LarAgent is a good match when an agent needs a clear identity tied to one feature, like customer support, a data-entry assistant or an internal helper that the same user calls repeatedly with context that must persist. History is handled per user, so there's no schema to design for it. You choose a history driver such as memory or cache, and LarAgent does the rest. For small teams that must ship an agent feature quickly without much configuration, that's a real head start.
Neuron AI: for work beyond a single agent
When a project grows to need production-grade RAG, several agents orchestrated together, or detailed visibility into each step an agent takes, Neuron AI is the option to look at.
It isn't Laravel-specific. It's a pure PHP agent framework that happens to fit into a Laravel project without friction. Its architecture feels like a proper framework: a SystemPrompt object that gives prompts shape, RAG handled by its RAG class, vector stores that run from a simple in-memory one up to Pinecone and Elasticsearch, and Inspector for monitoring, which shows a live timeline of what the agent is doing. A basic agent definition:
namespace App\Neuron;
use NeuronAI\Agent;
use NeuronAI\SystemPrompt;
use NeuronAI\Providers\AIProviderInterface;
use NeuronAI\Providers\Anthropic\Anthropic;
class DataAnalystAgent extends Agent
{
protected function provider(): AIProviderInterface
{
return new Anthropic(
key: env('ANTHROPIC_API_KEY'),
model: 'claude-3-7-sonnet-latest',
);
}
public function instructions(): string
{
return (string) new SystemPrompt(
background: ['You are a data analyst helping the marketing team understand sales trends.'],
steps: [
'Fetch sales data using the available tool.',
'Analyze the trends and patterns that emerge.',
'Communicate the insight in plain, easy-to-understand language.',
],
);
}
}
See how much more explicit this is than LarAgent. The system prompt cleanly separates background, steps and output, and that's deliberate. Neuron AI is meant for cases where complexity has already grown and where a clear structure is needed to keep the agent from going off the rails mid-process.
Laravel AI SDK and Laravel Boost: a common mix-up
Plenty of developers treat these as two names for the same thing. They solve entirely different problems, and the Laravel team reportedly published a dedicated post just to clear the confusion up.
- The Laravel AI SDK (
laravel/ai) is the official SDK from the core team. Its job is putting AI features inside your app, with one uniform API covering text, structured output, images, audio and embeddings. It sits on top of Prism, so anyone comfortable with Prism will find the transition easy. On top of that the official package brings fakes for testing, queued background work and automatic failover between providers. - Laravel Boost is something else entirely. It's an MCP server that runs in your development environment and helps AI coding assistants, such as Claude Code or Cursor, write Laravel code that follows the framework's conventions better. Boost never touches the production application. It's a dev-only dependency active while you code and no part of an AI feature that your end users meet.
Put simply, the AI SDK helps you build AI features, and Boost helps an AI help you write better Laravel code. They run side by side, and neither replaces the other.
Case study: answering questions from internal documents
Here's a common workplace request. The HR team is tired of answering the same leave-policy questions and wants a chatbot that replies from the policy documents that already exist. It's a classic RAG use case, meaning answers grounded in the company's own documents and not only in whatever the model picked up in training.
It needs a vector store, embeddings and automatic retrieval, which makes Neuron AI a natural fit:
namespace App\Neuron;
use NeuronAI\Providers\AIProviderInterface;
use NeuronAI\Providers\Anthropic\Anthropic;
use NeuronAI\RAG\RAG;
use NeuronAI\RAG\Embeddings\EmbeddingsProviderInterface;
use NeuronAI\RAG\VectorStore\VectorStoreInterface;
use NeuronAI\RAG\VectorStore\MemoryVectorStore;
class HrPolicyAgent extends RAG
{
protected function provider(): AIProviderInterface
{
return new Anthropic(
key: env('ANTHROPIC_API_KEY'),
model: 'claude-3-7-sonnet-latest',
);
}
protected function vectorStore(): VectorStoreInterface
{
return new MemoryVectorStore();
}
protected function embeddings(): EmbeddingsProviderInterface
{
// your preferred embeddings provider, e.g. OpenAI or Voyage
}
}
The flow, roughly:
- HR policy documents, PDF or plain text, are cut into smaller chunks, turned into embeddings and saved in the vector store.
- When an employee asks how many unused annual leave days carry over to next year, that question is converted to an embedding as well.
- Neuron AI searches for the chunks closest in meaning, not just by keyword, and injects them as extra context for the LLM.
- The LLM answers from those actual chunks instead of guessing from general knowledge.
The result is a chatbot whose replies refer to the company's real policy and not a generic answer that may simply be wrong. You could force a LarAgent setup with manual tools to do the same, but you'd then build your own retrieval logic, chunking and similarity search. Neuron AI ships those as ready-made components.
With only a handful of policy files, the MemoryVectorStore in the example is enough, since it keeps embeddings in memory for the session. Once the document set grows and has to survive deployments, swap the vectorStore() implementation for a real vector database such as Pinecone or Elasticsearch, with no change to the agent's logic. A clean abstraction lets you start small and scale later and avoids fixing the final architecture on day one.
A mistake that shows up often in RAG work like this is dumping a whole document in without chunking. A long HR policy fed as one unbroken block muddies similarity search, because the system can't tell which part answers the question. Splitting by topic or a few paragraphs at a time lets retrieval land on the right section.
Which one to pick
- Prism: a genuine single request and response, such as generating text, summaries or descriptions, where you want to switch providers without friction.
- Laravel AI SDK: the official, core-team-backed option with testing fakes, background jobs and provider failover, particularly for projects your team will maintain for years.
- LarAgent: an agent with a clear identity that the same user calls again and again, with a developer experience that feels like Eloquent and tools declared through simple attributes.
- Neuron AI: the project has outgrown simple agents and calls for serious RAG, several cooperating agents, close tracing or a workflow made of interdependent steps.
- Laravel Boost: not for your app's AI features, but to get your own coding assistant to write cleaner Laravel that follows convention.
No package here is simply the best, only the one that matches the complexity you really face. Begin with the simplest option and move up only when the problem demands it. The best code isn't the cleverest. It's the code that fits the problem.