Overview

Neuron is a PHP framework for creating and orchestrating AI agents inside PHP applications. It covers the agentic development lifecycle end to end: LLM interfaces, data loading, multi-agent orchestration, and monitoring and debugging. It requires PHP 8.1 or newer and installs with Composer.
You build an agent by extending the `Agent` class and overriding a few methods: `provider()` returns the LLM, `instructions()` the system prompt, and `tools()` the tools or toolkits the agent may call. The base class manages conversation memory, tool calls and structured output for you. A companion `RAG` class adds an embeddings provider and a vector store for retrieval-augmented chatbots, and a `neuron` CLI scaffolds both (`make:agent`, `make:rag`). Switching LLM providers is a one-line change — the README lists Anthropic, OpenAI (including the Responses API and Azure), OpenAI-compatible APIs, Ollama, Gemini and Gemini Vertex, Mistral, HuggingFace, Deepseek, Grok, AWS Bedrock Runtime, Cohere, ZAI and Alibaba DashScope.

For systems the ready-made Agent and RAG classes don't fit, Workflow lets you wire every Neuron component — providers, embeddings, data loaders, chat history, vector stores, and Agent or RAG themselves — into a custom event-driven graph of nodes. The project positions Workflow as the one architecture that scales from a first agent to a multi-agent system, with checkpointing, human-in-the-loop interruption, streaming adapters for AG-UI and the Vercel AI SDK, MCP connectors and asynchronous execution. Monitoring is handled by Inspector, the commercial service from the same team: setting `INSPECTOR_INGESTION_KEY` sends each agent's execution timeline to its dashboard.
What it does
- Extendable `Agent` class with built-in chat memory, tool calling and structured output
- One-line switching between LLM providers, from Anthropic, OpenAI and Gemini to Ollama, Bedrock and any OpenAI-compatible API
- Tools and toolkits (e.g. a MySQL toolkit), plus an `McpConnector` that loads tools from any MCP server
- Structured output mapped onto plain PHP classes annotated with `#[SchemaProperty]`
- A `RAG` class with pluggable embeddings providers and vector stores
- Event-driven Workflow with middleware, checkpointing, human-in-the-loop, streaming and async execution
Getting started
The README's three-step path: install the package, scaffold an agent, and chat with it. Neuron requires PHP 8.1 or newer.

Install with Composer
composer require neuron-core/neuron-aiCreate an agent
Scaffold the class with the CLI, then set its provider and instructions. Put your own API key and model name in place of the placeholders.
vendor/bin/neuron make:agent DataAnalystAgent
<?php
namespace App\Neuron;
use NeuronAI\Agent\Agent;
use NeuronAI\Agent\SystemPrompt;
use NeuronAI\Providers\AIProviderInterface;
use NeuronAI\Providers\Anthropic\Anthropic;
class DataAnalystAgent extends Agent
{
protected function provider(): AIProviderInterface
{
return new Anthropic(
key: 'ANTHROPIC_API_KEY',
model: 'ANTHROPIC_MODEL',
);
}
protected function instructions(): string
{
return "You are a data analyst expert in creating reports from SQL databases.";
}
}Talk to the agent
The agent keeps memory of the ongoing conversation, so a follow-up question can refer back to earlier messages.
$agent = DataAnalystAgent::make();
$response = $agent->chat(
new UserMessage("Hi, I'm Valerio. Who are you?")
)->getMessage();
echo $response->getContent();Give it tools
Return tools from `tools()` — a built-in toolkit, or every tool an MCP server exposes via `McpConnector`.
protected function tools(): array
{
return [
...McpConnector::make([
'command' => 'npx',
'args' => ['-y', '@modelcontextprotocol/server-everything'],
])->tools(),
];
}Optional: turn on monitoring
With an Inspector account, set the ingestion key in the application's environment file to see each agent run's execution timeline.
INSPECTOR_INGESTION_KEY=your-ingestion-keyCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Add an AI agent to an existing Laravel or other PHP application without bringing in a second language runtime
- Let an agent answer questions about your database through a toolkit such as the MySQL toolkit
- Build a retrieval-augmented chatbot over your own documents with a vector store and embeddings provider
- Orchestrate multi-step or multi-agent processes that need human approval partway through
How Neuron AI compares
Neuron AI alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| DeepSeek Harness | ★ 243k | DeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles. |
| AutoGPT | ★ 188k | One of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows. |
| DeerFlow | ★ 83.4k | ByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks. |
| nanobot | ★ 48.8k | Lightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations. |
| LangGraph | ★ 42.7k | A library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints. |
| Agno | ★ 42.5k | A fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production. |
| AgentGPT | ★ 36.3k | AgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser. |
| Neuron AI | ★ 2.1k | A PHP framework for building and orchestrating AI agents |