neuron-core/neuron-ai
A PHP framework for tool-using agents, retrieval, and resumable workflows
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Neuron is a Composer library embedded in a PHP application, not a standalone agent server. An Agent subclass supplies the model through AIProviderInterface, defines instructions, and can register tools. The application binds the agent to a thread with setThreadId() before calling chat() to carry conversation history across turns. RAG adds separate interfaces for embeddings and vector storage; the example pairs Voyage embeddings with Pinecone.
Workflow is the lower-level orchestration layer. It can use Agent and RAG as steps or compose providers, data loaders, chat history, and vector stores directly. Its event-driven model supports checkpointing and interruption for multi-agent and human-in-the-loop flows. McpConnector brings server-exposed tools into the same tool surface as PHP toolkits; the repository also contains a Node workspace with frontend build and test scripts, separate from the Composer integration path.
Key Capabilities & Differentiators
Provider adapters cover Anthropic, OpenAI—including the Responses API and Azure OpenAI—Gemini and Vertex, AWS Bedrock Runtime, OpenAI-compatible endpoints, and Ollama, among others. The framework supports async execution and stream adapters for AG-UI and the Vercel AI SDK. Structured output maps model responses into PHP classes with SchemaProperty attributes; v4.1.29 added support for arrays of scalar values.
Tools give the model access to application operations, either through PHP toolkits or MCP. The MySQL example restricts the toolkit to schema inspection and SELECT, with queries running in read-only transactions. That blocks writes but does not narrow what the connection can read. For retrieval, the application selects an embeddings provider and vector store independently of the chat model.
Trade-offs & Limitations
Compared with calling a model API directly from PHP, Neuron gives teams reusable abstractions for thread history, tooling, retrieval, and workflow control, at the cost of more interfaces and state to configure and test. Compared with a separate Python orchestration service, it keeps business logic in the PHP application and avoids an additional service boundary, but it is less attractive if your pipeline already depends on Python-native components. A provider interface makes substitution easier; it does not guarantee identical tool calls, schemas, or stream behavior across models.
Use application authorization, not thread IDs, to isolate users and tenants. Give SQL tools dedicated least-privilege credentials and a statement timeout, and scope MCP tools to the actions the agent actually needs. For workflows that can resume after interruption, test duplicate execution and make side-effecting steps safe to retry. MIT is permissive for commercial embedding, but does not change the terms or data-handling obligations of external services.
Hardware & Deployment Guide
The PHP requirement is ^8.1. Install with composer require neuron-core/neuron-ai and run it inside your application; the Node workspace is not the core PHP installation path. Hosted model APIs shift inference off the PHP host. Ollama offers a local-inference option, but an offline deployment also needs local or otherwise available replacements for any remote embedding, storage, or tool dependencies the application uses.
The bundled Compose stack explicitly targets development and testing. It builds from the root Dockerfile, defaults its build argument to PHP 8.3, bind-mounts the checkout, uses host networking, and starts integration backends including Redis, Qdrant, and PostgreSQL. These are not blanket production prerequisites. Provision only the services your application uses and test stream handling, checkpoint persistence, and resource limits in your own runtime. Recent releases distinguish runtime changes from tooling updates: 4.1.29 added scalar-array output and listed the IQ-Stream channel; 4.1.30 and 4.1.31 updated integration and developer skills.
vendor/bin/neuron make:agent and make:rag.McpConnector.SchemaProperty; v4.1.29 added scalar-array output support.PHP teams embedding document Q&A, structured extraction, or approval-driven workflows into an existing product, especially when agents must use application tools and stream results to a UI.
You need a turnkey hosted agent product, only make a handful of stateless model calls, or already have a Python orchestration service with no reason to move it into PHP.
Quick Start & Installation
# Start all services docker compose up -d
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| neuron-ai ★ | 2.2k | +6 | PHP | MIT | A PHP framework for tool-using agents, retrieval, and resumable workflows |
| ruflo | 82.8k | +312 | TypeScript | MIT | A TypeScript orchestration layer for coding agents, with shared memory and MCP |
| rocketride-server | 19.9k | +22 | Python | MIT | C++ workflow engine for building and running extensible AI pipelines |
| browser-use | 122.7k | +477 | Python | MIT | Python REPL and CDP for adaptive browser automation |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/neuron-core/neuron-ai.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about neuron-ai
When should I use Agent, RAG, or Workflow?
Does Neuron AI require a GPU, and what should I size?
Can we self-host Neuron AI in a commercial product?
How does this compare with a Python agent service or direct API calls?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy