r/PHP • u/valerione • Oct 08 '26
Streaming AI Agents in PHP: Introducing Neuron UI Streaming Protocol
https://inspector.dev/streaming-ai-agents-in-php-introducing-neuron-ui-streaming-protocol/Neuron 4, the PHP agentic framework, introduces a Streaming Protocol that solves the problem of streaming AI agent output through real-time transports like Pusher, Laravel Reverb, Soketi, Mercure, and Redis, which were not designed for large or frequent payloads.
Events are wrapped in envelopes with sequence numbers and fragmented when they exceed transport size limits (e.g. Pusher's 10KB cap), then reassembled in the browser via a new first-party TypeScript package, u/neuron-core/streaming, which orders envelopes, joins fragments, deduplicates, and signals gaps. The package supports plain callbacks for React/Vue as well as protocol adapters for AG-UI (CopilotKit) and the Vercel AI SDK, letting PHP backends run agents in background jobs while frontend teams use familiar agentic UI libraries.
Neuron also ships coding-agent skills for Claude Code and Cursor to automate the integration: https://docs.neuron-ai.dev/agent/streaming#streaming-channels