NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #1678 most downloaded on Packagist
A unified layer for building AI-native applications in PHP.
Latest stable
4.1.22
Last release 10 days ago
05 Nov 2026
Ships on a steady schedule
a new release about every 1 weeks
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
486 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
ZAI Image generation: https://docs.neuron-ai.dev/providers/image#zai-image
ZAI Image generation: https://docs.neuron-ai.dev/providers/image#zai-image
ZAI Transcription: https://docs.neuron-ai.dev/providers/audio#zai
This release adds the support for a new AI provider: ZAI, the company behing the awesome open source GLM models.
This release adds the support for a new AI provider: ZAI, the company behing the awesome open source GLM models.
You can now power your agentic systems with models like GLM-5:
use NeuronAI\Providers\ZAI\ZAI;
class MyAgent extends Agent
{
protected function provider(): AIProviderInterface
{
return new ZAI(
key: 'ZAI_API_KEY',
model: 'glm-5',
);
}
}
It supports chat, streaming, structured output, and vision (file, images, audio, video), for a full agentic experience.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Give the agent tha ability to plan complex tasks.
Give the agent tha ability to plan complex tasks.
class MyAgent extends Agent
{
...
/**
* Attach middleware to nodes.
*/
protected function middleware(): array
{
$todo = new TodoPlanning();
return [
ChatNode::class => [$todo],
StreamingNode::class => [$todo],
StructuredOutputNode::class => [$todo],
];
}
}
Agent state track tool runs instead of tool attempts
Agent state track tool runs instead of tool attempts
https://docs.neuron-ai.dev/agent/agent#tool-runs
Before this release, when the agent runs you are only able to get the last message generated by the model to answer your prompt. But internally the ag
Before this release, when the agent runs you are only able to get the last message generated by the model to answer your prompt. But internally the agent can performs many tool call iterations before coming up with the final answer.
Now the agent state stores the list of all messages between the agent and the provider for the current session, rather than only the final answer. So you can access the list of messages with the getSteps() method on the agent state:
$state = MyAgent::make()
->chat(new UserMessage("Who are you?"))
->run();
// Access the list of steps during the execution
foreach($state->getSteps() as $message) {
echo "- ".$message::class."\n";
}
// The final answer
echo $state->getMessage()->getContent();
Nothing published for this version
Nothing published for this version
Fix Gemini usage reporting when streaming. Fix #511
Fix Gemini usage reporting when streaming. Fix #511
Make the MySQLSelectTool prompts stronger.
Make the MySQLSelectTool prompts stronger.
Nothing published for this version
Nothing published for this version
Tool approval callback receives an instance of tool:
Tool approval callback receives an instance of tool:
new ToolApproval(
tools: [
// Enable tool approval based on custom rules
BuyTicketTool::class => function (ToolInterface $tool): bool {
return $tool->getInput('amount') > 100;
}
]
)
Built-in tool to build agents with on-demand RAG (Retrieval Augmented Generation) capabilities instead of the authomatic context injection provided by
Built-in tool to build agents with on-demand RAG (Retrieval Augmented Generation) capabilities instead of the authomatic context injection provided by the RAG component.
use NeuronAI\Tools\Toolkits\RetrievalTool;
use NeuronAI\RAG\Retrieval\SimilarityRetrieval;
class AgenticRAG extends Agent
{
protected function provider(): AIProviderInterface
{...}
protected function instructions(): string
{...}
protected function tools(): array
{
return [
RetrievalTool::make(
new SimilarityRetrieval(
$this->vectorStore(),
$this->embeddings()
)
),
];
}
protected function vectorStore(): VectorStoreInterface
{
return new FileVectorStore(__DIR__);
}
protected function embeddings(): EmbeddingsProviderInterface
{
return new OllamaEmbeddingsProvider(
model: 'OLLAMA_EMBEDDINGS_MODEL'
);
}
}
Learn more on the documentation.
Vertex allows null for location - PR #507 by @joecharm
Vertex allows null for location - PR #507 by @joecharm
Inspired by @ottoszika with PR #506
Fix http client baseUri
Inspired by @ottoszika with PR #506
fix openai tool call without arguments. #498
fix openai tool call without arguments. #498
Fix Neuron CLI, and introduce the make:event command. #502
Fix Neuron CLI, and introduce the make:event command. #502
Fix workflow global middleware
Fix workflow global middleware
Thank you to @bytestream for the contribution.
Thank you to @bytestream for the contribution.
Optimize Eloquent chat history query.
Optimize Eloquent chat history query.
@jamosaur in PR #494
Nothing published for this version
Thanks to @jamosaur for PR #497
Thanks to @jamosaur for PR #497
Create a WorkflowInterrupt model:
class WorkflowInterrupt extends Model
{
protected $fillable = ['workflow_id', 'interrupt'];
}
Use it with workflow:
use App\Models\WorkflowInterrupt;
use NeuronAI\Workflow\Persistence\EloquentPersistence;
// Creating a workflow
$workflow = WorkflowAgent(
persistence: new EloquentPersistence(WorkflowInterrupt::class)
);
Migration script and code snippets in the documentation.
Read more on the announcement: https://github.com/neuron-core/neuron-ai/discussions/493
Read more on the announcement: https://github.com/neuron-core/neuron-ai/discussions/493
Nothing published for this version
Nothing published for this version
Fix OpenAI tool call message map
Fix OpenAI tool call message map
Improved Evaluation suite with Output interface
New OpenSearch vector store thanks to the contribution of @jamosaur with PR #489
New OpenSearch vector store thanks to the contribution of @jamosaur with PR #489
use NeuronAI\RAG\RAG;
use NeuronAI\RAG\VectorStore\OpenSearchVectorStore;
use NeuronAI\RAG\VectorStore\VectorStoreInterface;
use OpenSearch\GuzzleClientFactory;
class MyChatBot extends RAG
{
...
protected function vectorStore(): VectorStoreInterface
{
$opensearch = new GuzzleClientFactory()->create([
'base_uri' => 'http://localhost:9200',
]);
return new OpenSearchVectorStore(
client: $opensearch,
index: 'neuron-ai',
);
}
}
You can condition the visibility of tools based on custom rules. The Tool class provides you with the visible method to determine if the agent should
You can condition the visibility of tools based on custom rules. The Tool class provides you with the visible method to determine if the agent should even known the tool exists:
class YouTubeAgent extends Agent
{
...
protected function tools(): array
{
return [
GetTranscriptionTool::make('API_KEY')->visible(
auth()->user()->can(...)
),
];
}
}
Nothing published for this version
Fix #469 thanks to @manuelkiessling PR #470
Fix #469 thanks to @manuelkiessling PR #470
Nothing published for this version
Bulk api for openai embeddings - PR #461
Bulk api for openai embeddings - PR #461
Catch image output for Gemini: #460
Catch image output for Gemini: #460
When you test an agent, you don't want every test run to make real API calls to OpenAI, Anthropic, or any other provider. Real calls are slow, cost mo
When you test an agent, you don't want every test run to make real API calls to OpenAI, Anthropic, or any other provider. Real calls are slow, cost money, and return different results every time, making your tests flaky and expensive. The same applies to RAG agents: you don't want to spin up a vector database or call an embeddings API just to verify your agent's logic.
This release introduces a set of "fake" components you can use to test the logic of your agentic system without the need to access real providers. FakeAIProvider replaces the AI provider, FakeEmbeddingsProvider replaces the embeddings provider, and FakeVectorStore replaces the vector store. They return predetermined responses, never hit the network, and record every interaction so you can assert exactly what your agent did.
Here is an example of a test you can create to prove the consistency of your implementation:
use NeuronAI\Chat\Messages\ToolCallMessage;
public function test_agent_uses_tools(): void
{
$searchTool = Tool::make('search', 'Search the web')
->addProperty(new ToolProperty('query', PropertyType::STRING, 'Search query', true))
->setCallable(fn (string $query): string => "Results for: {$query}");
$provider = new FakeAIProvider(
// First call: the model asks to use the search tool
new ToolCallMessage(null, [
(clone $searchTool)->setCallId('call_1')->setInputs(['query' => 'PHP frameworks']),
]),
// Second call: the model responds using the tool result
new AssistantMessage('Here are the top PHP frameworks...')
);
$agent = MyAgent::make()
->setAiProvider($provider)
->addTool($searchTool);
$message = $agent->chat(new UserMessage('Best PHP frameworks?'))->getMessage();
$this->assertSame('Here are the top PHP frameworks...', $message->getContent());
$provider->assertCallCount(2);
}
Check out the full documentation.
Fix toolkit with() mthod behaviour - PR #458
Fix toolkit with() mthod behaviour - PR #458
Reporting STOP_REASON from the LLM response via the AssistantMessage.
Reporting STOP_REASON from the LLM response via the AssistantMessage.
You can now get this information with a dedicated method:
$response = MyAgent::make()->chat(...);
$reson = $response->stopReason();
Nothing published for this version
tool getInput for a single key - https://github.com/neuron-core/neuron-ai/blob/2.x/src/Tools/Tool.php#L158
tool getInput for a single key - https://github.com/neuron-core/neuron-ai/blob/2.x/src/Tools/Tool.php#L158
Fix handling anthropic empty content - #450
Fix handling anthropic empty content - #450
Fi gemini when empty candidates - #447
Fi gemini when empty candidates - #447
fix LocalAI post processor HOST structure
fix LocalAI post processor HOST structure
New LocalAI reranker component #442
Fix workflow DatabasePersistence when PDO::ATTR_EMULATE_PREPARES is set to false. #434
Fix workflow DatabasePersistence when PDO::ATTR_EMULATE_PREPARES is set to false. #434
Fix Vertex AI authentication. #437
Fix Vertex AI authentication. #437
Structured output with tool for Gemini 3 series models. PR #435
Structured output with tool for Gemini 3 series models. PR #435
New Gemini Vertex AI provider - PR #421 thanks to @roke22
New Gemini Vertex AI provider - PR #421 thanks to @roke22
Remove restrictions from OpenAIResponses provider to use document URL attachment. PR #416
Remove restrictions from OpenAIResponses provider to use document URL attachment. PR #416
Support for File ID attachment. PR #412
Support for File ID attachment. PR #412
https://docs.neuron-ai.dev/the-basics/attachments-documents-and-images#file-id
FileVectorStore and FileChatHistory components now create the directory if it doesn't exists. From #414
FileVectorStore and FileChatHistory components now create the directory if it doesn't exists. From #414
Support for deepseek reaonser model #409
Support for deepseek reaonser model #409
Fix Gemini streaming with tools #391
Fix Gemini streaming with tools #391
new OpenAILikeResponses provider
new OpenAILikeResponses provider
Support for merging parameters in OpenAI structured output PR #408
Support for merging parameters in OpenAI structured output PR #408
Nothing published for this version
Support proxy configuration for providers using Guzzle client
Support proxy configuration for providers using Guzzle client
Fix Pinecone Vector Store search on empty filters
Fix Pinecone Vector Store search on empty filters
Add set methods to Tool interface
Add set methods to Tool interface
So you can now change this property on the fly attaching a tool to the agent:
protected function tools(): array
{
return [
MySQLSchemaTool::make(new \PDO(...), ['organizations', 'users'])->setName('account_schema'),
MySQLSchemaTool::make(new \PDO(...), ['orders', 'payments'])->setName('order_schema'),
];
}
MySQLSelectTool was extend with additional forbidden statements including: INTO, OUTFILE, DUMPFILE, LOAD_FILE
MySQLSelectTool was extend with additional forbidden statements including: INTO, OUTFILE, DUMPFILE, LOAD_FILE
MySQLWriteTool was extended with forbidden statements to avoid unsafe actions: DROP, CREATE, ALTER, GRANT, TRUNCATE, REPLACE, MERGE, CALL, EXECUTE, DELETE
All of this configurations can be customized at tool level.
Fix OpenAI responses streaming when error: PR #394
Fix OpenAI responses streaming when error: PR #394
One column per month.