2.0.0
Muli-Agent Orchestration Finally Possible In PHP
The core advancement in v2 centers around a complete rearchitecture of the Workflow system. In v1 Workflow was marked as experimental. The previous implementation relied on a combination of nodes and edges to define the path workflow must follow to navigate through nodes. V2 introduces an event-driven model that uses only nodes as entities that handle incoming events and emit other events.
This shift eliminates the Edge class entirely and opens up possibilities that weren’t feasible with the graph-like workflows. Nodes now trigger and respond to events, creating dynamic execution paths based on runtime conditions rather than predetermined sequences.
- Real-Time Streaming in multi-agent systems
- Human-in-the-Loop Without Complexity
Getting started with Workflow: https://docs.neuron-ai.dev/workflow/getting-started
Neuron CLI – Enhanced Developer Tools
V2 ships with practical developer experience improvements that address common friction points. The new CLI tool brings the new “make” command that helps you scaffold common classes reducing boilerplate fatigue:
php vendor/bin/neuron make:agent App\\Neuron\\MyAgent
php vendor/bin/neuron make:rag App\\Neuron\\MyChatBot
php vendor/bin/neuron make:workflow App\\Neuron\\MyWorkflow
RAG Retrieval component
In the previous version the RAG component could interact with a vector store and an embeddings provider, but there was no way to customize this behavior. Recently many different retrieval techniques emerged trying to increase the accuracy of a RAG system.
NeuronAI RAG now has a separate retrieval component that allwos you to implement different strategies to accomplish context retrieval from an external data source. By default RAG uses SimilarityRetrieval that simply replicate the previous behaviour maintaining backward compatibility. But it depends now by its own interface so you can create custom implementation and inject it into the RAG.
Evaluators
When building AI agents, evaluating their performance is crucial during this process. It's important to consider various qualitative and quantitative factors, including response quality, task completion, success, and inaccuracies or hallucinations.
Neuron introduces a system to create evaluators against test cases, so you can continues verify the output of your agentic entities overtime.
Tool Max Tries
Agents now have a safety mechanism that tracks the number of times a tool is invoked during an execution session. If the agent exceeds this limit, execution is interrupted and an exception is thrown. By default the limit is 5 calls, and it count for each tool individually. You can customize this value with the toolMaxTries method.
try {
$result = YouTubeAgent::make()
->toolMaxTries(5) // Max number of calls for each tool
->chat(...);
} catch (ToolMaxTriesException $exception) {
// do something
}New Output validation rules
We introduced two new validation rules for structured output: WordsCount (works on string), and InRange (works on numeric).
Upgrade guide
Read the upgrade guide to better understand the new version: https://docs.neuron-ai.dev/overview/readme/upgrade-guide