neuron-streaming

neuron-streaming is a skill for Claude Code, Codex from neuron-core/neuron-ai. It costs 223 tokens per session (7,259 once invoked), scanned A, original, MIT.

A guide to sending live output from a Neuron AI agent or workflow to another program. It explains chunks, progress events, formats such as server-sent events (SSE), and delivery through a channel or a web connection.

In plain words
What is it for?
Use it to stream agent text and progress to browser interfaces, Vercel AI SDK, AG-UI, SSE endpoints, or other consumers.
Why use it?
It avoids making users wait for the complete response and helps keep the format and destination of streamed data consistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to stream agent text and progress to browser interfaces, Vercel AI SDK, AG-UI, SSE endpoints, or other consumers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neuron-core/neuron-ai/neuron-streaming
About the project

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.

neuron-core/neuron-ai · 2,140 stars · on GitHub · neuron-ai.dev

Install

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.

Any agent
npx skills add neuron-core/neuron-ai --skill neuron-streaming
Clone the repo
git clone --depth 1 https://github.com/neuron-core/neuron-ai

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for neuron-streaming

README.md
[![agentmods](https://agentmods.dev/badge/skills/neuron-core/neuron-ai/neuron-streaming/github.svg)](https://agentmods.dev/skills/neuron-core/neuron-ai/neuron-streaming)
Your own site
<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.

agentmods 80×15 button for neuron-streaming

Your own site · 80×15
<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>
Per session 223 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 11d ago against content hash 6eccbda3640c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

skills/neuron-streaming/SKILL.md · 460 lines

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.

Read the full file on GitHub · 460 lines

Files

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.

Changes

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.

  1. 11d ago Changed · +35 lines · +10 tokens per session 6eccbda3640c
  2. 15d ago First seen · 425 lines · 213 tokens per session scan A 6916fd08fc9f

Subscribe to this mod's changes

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.