Neuron AI is a PHP framework for building AI applications in which agents connect language models, tools, data loaders, vector databases, memory, and user interfaces. PHP developers use it to create and manage applications with agent workflows, multi-agent coordination, streaming, monitoring, and human involvement.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add neuron-core/neuron-ai --skill neuron-streaminggit clone --depth 1 https://github.com/neuron-core/neuron-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/neuron-core/neuron-ai/neuron-streaming)<a href="https://agentmods.dev/skills/neuron-core/neuron-ai/neuron-streaming"><img src="https://agentmods.dev/badge/skills/neuron-core/neuron-ai/neuron-streaming/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/neuron-core/neuron-ai/neuron-streaming"><img src="https://agentmods.dev/badge/skills/neuron-core/neuron-ai/neuron-streaming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00223 | $0.07259 |
| Opus 5.5 | $0.00089 | $0.02904 |
| Sonnet 5.5 | $0.00045 | $0.01452 |
| Haiku 4.5 | $0.00022 | $0.00726 |
Grade A, and why
neuron-streaming scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 460 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Neuron AI Streaming
This skill covers how output leaves a running agent or workflow and reaches a consumer: the native chunk stream, portable progress events, protocol adapters for UI libraries, and channels for push delivery.
The Mental Model
A Workflow segment produces a sequence of live objects while it runs. Four independent concerns decide what happens to them:
| Concern | Question it answers | Component |
|---|---|---|
| Source | What is emitted? | Provider chunks and events yielded by nodes |
| Shape | What does the wire format look like? | StreamAdapterInterface via setStreamAdapter() |
| Destination | Where does it go? | Pull iteration over the generator, or eager delivery through StreamingChannelInterface via setChannel() |
| Encoding | How does it become bytes? | SSEEncoder on the HTTP edge; a channel encodes for its own transport |
Adapter and channel compose. The adapter decides the shape, the channel the destination. The Workflow converts each item once into a ProtocolEvent. run() consumes the pipeline eagerly; events() and Agent::stream() always return lazy generators. Consumption also delivers adapted events to a configured channel. It never frames bytes: the edge that owns the transport encodes it.
Live output is ephemeral. Nothing yielded during a segment is stored in persistence or replayed when a completed step is restored. Chat history is the record the UI reconciles from. Never make correctness depend on a client receiving a streamed item.
Resources constructed per segment
Use the streamAdapter() and channel() hooks, or pass a factory to
setStreamAdapter() / setChannel(); the setters take factories only:
$agent->setStreamAdapter(fn () => new AGUIAdapter($input['threadId'], $input['runId'] ?? null));
$state = $agent->run($request);
These factories run only for an owned execution and return a new adapter or channel for each segment: both hold the state of one segment's stream. There is no Workflow-mutating preparation callback; saved outcomes and idle polls skip resource construction. The AG-UI run ID is the client's per-request ID from its input, not Neuron's durable run ID. Lazy calls capture input at creation and execute during iteration. Setters configure the definition; an active execution keeps its already resolved resources and graph. This rule applies to Workflow, Agent and RAG configuration.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · +35 lines · +10 tokens per session 6eccbda3640c
- 15d ago First seen · 425 lines · 213 tokens per session scan A 6916fd08fc9f
neuron-streaming is a skill published in the GitHub repository neuron-core/neuron-ai (2,140 stars, last pushed yesterday), licensed MIT. It adds 223 tokens to every session and 7,259 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-01.
Other skills, from other repositories
agent-crdt-synchronizer
Agent skill for crdt-synchronizer - invoke with $agent-crdt-synchronizer.
agent-quorum-manager
Agent skill for quorum-manager - invoke with $agent-quorum-manager.
agent-dev-backend-api
Agent skill for dev-backend-api - invoke with $agent-dev-backend-api.
agent-docs-api-openapi
Agent skill for docs-api-openapi - invoke with $agent-docs-api-openapi.
agent-gossip-coordinator
Agent skill for gossip-coordinator - invoke with $agent-gossip-coordinator.
agent-raft-manager
Agent skill for raft-manager - invoke with $agent-raft-manager.