neuron-frontend-integration

neuron-frontend-integration is a skill for Claude Code, Codex from neuron-core/neuron-laravel. It costs 205 tokens per session (5,663 once invoked), scanned A, original, MIT.

A PHP integration guide for connecting a Neuron AI agent to a web frontend, where some tools run in the browser. It covers the server endpoint, client messages, tool results, and approval decisions.

In plain words
What is it for?
Use it to build browser-based agent tools, handle new and resumed conversations, and connect Neuron with the Vercel AI SDK, AG-UI, or CopilotKit.
Why use it?
It removes the guesswork of keeping the browser and server in sync when an agent pauses for browser work or user input. It also explains how to connect common chat client libraries.

Skill for Claude CodeCodex

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

Good fit Use it to build browser-based agent tools, handle new and resumed conversations, and connect Neuron with the Vercel AI SDK, AG-UI, or CopilotKit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neuron-core/neuron-laravel/neuron-frontend-integration
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-laravel --skill neuron-frontend-integration
Clone the repo
git clone --depth 1 https://github.com/neuron-core/neuron-laravel

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-frontend-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/neuron-core/neuron-laravel/neuron-frontend-integration/github.svg)](https://agentmods.dev/skills/neuron-core/neuron-laravel/neuron-frontend-integration)
Your own site
<a href="https://agentmods.dev/skills/neuron-core/neuron-laravel/neuron-frontend-integration"><img src="https://agentmods.dev/badge/skills/neuron-core/neuron-laravel/neuron-frontend-integration/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-frontend-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/neuron-core/neuron-laravel/neuron-frontend-integration"><img src="https://agentmods.dev/badge/skills/neuron-core/neuron-laravel/neuron-frontend-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,663 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.00205 $0.05663
Opus 5.5 $0.00082 $0.02265
Sonnet 5.5 $0.00041 $0.01133
Haiku 4.5 $0.00020 $0.00566

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

Security

Grade A, and why

neuron-frontend-integration 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 15d 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.

resources/boost/skills/neuron-frontend-integration/SKILL.md · 411 lines

How it starts

The opening of the file, as written. The whole thing — 411 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Neuron AI Frontend Integration

This skill covers the round trip between a Neuron agent and a frontend that executes some of the agent's tools: the backend endpoint, the inbound translation of what the client sends, and the exact client-side wiring for the Vercel AI SDK, the official AG-UI client, and CopilotKit.

Every example and every behavioural claim below is proven by the integration suite in tests/Integration/Frontend/ (run it with composer test:frontend). If you change how the clients are wired, prove the change there first.

The Mental Model

A deferred tool is a tool the model may call but the backend cannot execute. When the model calls one, ToolNode executes the local tools of the batch, then AwaitToolResultsNode suspends the run with a ToolResultsRequest carrying the calls that wait for the frontend. The stream adapter (AGUIAdapter or VercelAIAdapter, see the neuron-streaming skill for how adapters shape output and how channels push it) publishes those calls in the protocol's vocabulary, the browser executes them, and the client library sends the outcomes back over HTTP. The endpoint rebuilds the agent and continues with submitToolResults($results)->events() for a native result map. Raw SDK envelopes use submitInputs($payload, $translator)->events() so the protocol translator can extract the responses. The next inference sees the results as ordinary tool result messages.

Three identities, never interchangeable:

Identity What it is Who owns it
Thread The conversation and the workflow ID. AG-UI threadId, Vercel chat id Application
Call ID The only identity of a tool result. Results, approvals and retries are matched by it Model / provider
AG-UI runId A per-request identifier of the client. Not Neuron's durable run ID Client

Two rules decide correctness:

  • The request shape decides new turn versus continuation. A user message starts a turn; tool results, approval responses or an AG-UI resume array continue one. An invalid continuation is an error response, never a fallback to a new turn.
  • Results accumulate by call ID. A partial batch re-suspends with the accepted results kept, an identical repeat is accepted, a different outcome for a settled call is refused, and a submission that belongs to a completed run or an earlier turn is refused.

Read the full file on GitHub · 411 lines

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. 15d ago First seen · 411 lines · 205 tokens per session scan A 0fc8115e2e01

Subscribe to this mod's changes

neuron-frontend-integration is a skill published in the GitHub repository neuron-core/neuron-laravel (122 stars, last pushed 16d ago), licensed MIT. It adds 205 tokens to every session and 5,663 once invoked, about $0.0008 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.