What’s New in Neuron AI v3.0.0? Key Features and Migration Guide for PHP AI Agents
Neuron AI v3.0.0 introduces a workflow‑based architecture, native human‑in‑the‑loop support, automatic conversation summarization, enhanced middleware, full reasoning model compatibility, structured output constraints, streaming adapters, new providers, file‑ID content blocks, and a set of breaking changes with detailed migration steps for PHP developers.
New Features
Workflow‑based architecture: Agent, RAG and Message systems are rebuilt on a Workflow component, enabling stronger extensibility.
Native Human‑in‑the‑Loop support: Built‑in tool approval and manual intervention mechanisms.
Automatic conversation summarization: Middleware integrates context management to compress history automatically.
Middleware layer: Agents and RAG inherit extensible hooks (before/after node execution) via Workflow middleware.
Full reasoning model support: All providers now support reasoning models.
Structured Output enhancements: New schema constraints such as SchemaProperty, min, max, minLength, maxLength, anyOf, etc.
Streaming adapters: Compatibility with front‑end protocols like Vercel AI SDK and AG‑UI.
New providers:
Mistral provider – supports multimodal input and reasoning models.
Cohere AI provider – supports cloud and on‑premise deployments.
Text‑to‑Speech provider – handles audio content.
File ID Content Blocks: Reference files (images, documents, etc.) by ID to dramatically reduce token consumption.
Middleware system: Adds hook‑based control over Workflow execution.
Breaking Changes & Migration Guide
Agent namespace change: Move to NeuronAI\Agent; SystemPrompt moves to NeuronAI\Agent\SystemPrompt.
Removal of chatAsync() : Migrate to the new async pattern (see /agent/async).
chat() return value change: Now returns a Workflow State instead of a direct Message; extract the LLM response from the state.
Message content redesign: Attachments replaced by Content Blocks; getContent() now returns only text blocks, skipping media.
Streaming chunk refactor: Use dedicated classes such as TextChunk, ReasoningChunk, ToolCallChunk, and ToolResultChunk.
Rename ToolCallResultMessage to ToolResultMessage .
Workflow interrupt request: Old array replaced by typed InterruptRequest.
Database persistence change: Column data renamed to interrupt.
Observer pattern update: Replace \SplSubject / \SplObserver with new ObserverInterface supporting Workflow, Node, and Middleware level events.
HttpClientOptions removal: Switch to an Adapter pattern to inject custom HTTP clients.
Qdrant version requirement: Upgrade to version 1.10.x or higher.
AbstractChatHistory method change: Hook methods are now protected and no longer declare a return type.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
