ag-ui
Skill1 starsChanged 31 days agoMITView on GitHub
AG-UI: stream agent runs to user-facing apps with the Agent-User Interaction Protocol 1.0. Use when building or reviewing an AG-UI agent endpoint (producer), a client or UI that consumes one (consumer), a framework bridge, or middleware: RunAgentInput (threadId, runId, messages, tools, context, state, forwardedProps, resume), the 31 event types in eight families (RUN_STARTED, RUN_FINISHED with success, interrupt and cancelled outcomes, RUN_ERROR, steps, TEXT_MESSAGE_*, TOOL_CALL_*, REASONING_*, STATE_SNAPSHOT, STATE_DELTA with JSON Patch, MESSAGES_SNAPSHOT, ACTIVITY_*, SUBAGENT_*, RAW and CUSTOM), the chunked form, the HTTP + SSE and HTTP + Protobuf bindings, frontend tools, human-in-the-loop interrupts and resume, the processing model (unknown versus malformed), protocolVersion negotiation, the AG-UI JSON Schema, and the TypeScript, Python and .NET SDKs. Triggers: ag-ui, agui, agent-user interaction protocol, agent UI streaming, copilot UI events, generative UI, shared state, human in the loop.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Follow the workflow below step by step: Every rule here comes from a source in Sources, cited by page title.
- Very specific: line 28
A stream begins with
RUN_STARTEDorRUN_ERROR;: every message, tool call, step, reasoning span and subagent a run opens is closed …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AG-UI
AG-UI (Agent-User Interaction Protocol) connects agents to user-facing applications: one request (RunAgentInput) in, one ordered stream of typed events out, carrying text, tool calls, reasoning, shared state and progress. Version 1.0 is the first release with a normative specification; the JSON Schema is authoritative for structure and the specification for behaviour (Specification, "What this document is"). With this skill the agent builds or reviews a producer, a consumer, or middleware.
Follow the workflow below step by step. Every rule here comes from a source in Sources, cited by page title. When a rule and the pinned source disagree, the source wins; when the source has a newer version than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: producer (agent endpoint or bridge), consumer (client SDK or UI), middleware, or several.
- Transport: HTTP + SSE (required for HTTP), HTTP + Protobuf (optional), or a custom binding.
- Features: which event families beyond the run lifecycle, frontend tools, interrupts, shared state.
- Revision: AG-UI 1.0 as pinned in Sources, unless the user names another.
- Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources, check
https://docs.ag-ui.com/llms.txtfor a newer frozen spec version, check the@ag-ui/coreversion and the repository head, and update the pins.
Invariants
- Arrival order is the protocol's order. Consumers must not order by
timestamp(The Event Model). - A stream begins with
RUN_STARTEDorRUN_ERROR; every message, tool call, step, reasoning span and subagent a run opens is closed beforeRUN_FINISHED; nothing butRUN_STARTEDfollowsRUN_ERROR(Runs and Steps). - Absent means absent. Optional fields without a value are omitted, never
null(The Event Model). - Unrecognised material is stripped with a warning; a malformed known value is fatal (Processing Model).
- Middleware runs before enforcement, enforcement before chunk expansion and verification, and all before application code (Processing Model).
- Tool arguments are not acted on before
TOOL_CALL_END, and are validated as untrusted input (Tool Calls). - A producer never answers a frontend tool call it made; the run ends as success, and a continuing thread answers every pending call (Tool Calls, "Frontend tools").
- An interrupted run ends with the interrupt outcome, and a resume covers every interrupt, answered or explicitly abandoned (Interrupts and Resume).
- A truncated stream is not a finished run. Consumers never synthesize
RUN_FINISHEDand never infer success from HTTP 200 (Transports; HTTP + Server-Sent Events). - Model output is untrusted. Applications validate what they act on, never render streamed content as executable markup, and never represent an action as user-approved when it was not (Specification, "Security and Trust & Safety").
Workflow
- Choose roles and transport. Speak HTTP + SSE if you speak HTTP; add Protobuf only if needed. Put authentication in the binding.
->
references/transports.md✓ The endpoint accepts a JSON POST, answerstext/event-streamwith one JSON event perdatafield, and rejects bad input with an HTTP error before any stream. - Emit or consume the run lifecycle. Implement
RUN_STARTED,RUN_FINISHEDwith its outcome,RUN_ERROR, steps, and token usage. ->references/events.md✓ Every run is bracketed; outcomes aresuccess,interruptorcancelled; a stopped run is never reported as success. - Add the event families you need. Text messages, tool calls, reasoning, state, activity, subagents, passthrough, in triad or chunked form.
->
references/events.md✓ Each item follows open, content, close; deltas are RFC 6902 patches against a baseline the consumer has. - Wire human-in-the-loop. Advertise frontend tools, handle pending tool calls, raise interrupts and send resume entries; ask consent before side effects.
->
references/human-in-the-loop.md✓ Approval-gated actions never run on an absent resume entry; declined calls are answered as declined. - Build the processing pipeline and version handshake. Strip unknown material with warnings, fail on malformed known values, declare
protocolVersion. ->references/processing-and-versioning.md✓ A test stream with an unknown event type survives with a warning; amessageIdholding a number fails the run.
Verify before done
- Producer streams validate against the 1.0 JSON Schema in tests; the runtime receive path strips rather than rejects unknown material.
- No optional field is sent as
null; identifiers are treated as opaque. RUN_STARTED.protocolVersionandRunAgentInput.protocolVersionare sent ("1.0").- Cancelled, interrupted, errored and truncated runs are each surfaced differently from success.
- Activity messages are stripped from outgoing
messages. - Tool arguments, tool results, state,
RAWandCUSTOMpayloads are validated before use and never rendered as markup. - No secrets are placed in state or messages, which round-trip through the client.
Reference index
references/events.md: the envelope, identifiers, the eight families, the run lifecycle and outcomes, streaming and the chunked form, snapshots and deltas, passthrough. Load for steps 2 and 3.references/transports.md: the binding contract, HTTP + SSE, HTTP + Protobuf, truncation, custom transports, and a framework-neutral endpoint sketch. Load for step 1.references/human-in-the-loop.md: frontend tools, interrupts and resume, and the security rules. Load for step 4.references/processing-and-versioning.md: the processing pipeline, version negotiation, downgrades, the JSON Schema, capabilities, SDKs and the relation to MCP and A2A. Load for step 5.
Related skills
owasp-agenticfor reviewing human-agent trust, tool misuse and approvals around the UI:npx skills add ScaleDockHQ/scaledock-skills --skill owasp-agentic.a2afor agent-to-agent traffic behind an AG-UI front end:npx skills add ScaleDockHQ/scaledock-skills --skill a2a.
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- AG-UI Specification 1.0: Released, 1.0, checked 2026-10-02.
- The Event Model: Released, 1.0, checked 2026-10-02.
- Run Input: Released, 1.0, checked 2026-10-02.
- Metadata: Released, 1.0, checked 2026-10-02.
- Capabilities: Released, 1.0, checked 2026-10-02.
- Event Streams: Released, 1.0, checked 2026-10-02.
- Runs and Steps: Released, 1.0, checked 2026-10-02.
- Text Messages: Released, 1.0, checked 2026-10-02.
- Tool Calls: Released, 1.0, checked 2026-10-02.
- Reasoning: Released, 1.0, checked 2026-10-02.
- State: Released, 1.0, checked 2026-10-02.
- Activity: Released, 1.0, checked 2026-10-02.
- Subagents: Released, 1.0, checked 2026-10-02.
- Raw and Custom Events: Released, 1.0, checked 2026-10-02.
- Schema files: Released, 1.0, checked 2026-10-02.
- Streaming Messages: Released, 1.0, checked 2026-10-02.
- Snapshots and Deltas: Released, 1.0, checked 2026-10-02.
- Interrupts and Resume: Released, 1.0, checked 2026-10-02.
- Transports: Released, 1.0, checked 2026-10-02.
- HTTP + Server-Sent Events: Released, 1.0, checked 2026-10-02.
- HTTP + Protobuf: Released, 1.0, checked 2026-10-02.
- Processing Model: Released, 1.0, checked 2026-10-02.
- Versioning and Compatibility: Released, 1.0, checked 2026-10-02.
- Key Changes: Released (informative), 1.0, checked 2026-10-02.
- AG-UI 1.0 JSON Schema: Released, 1.0 (
$idhttps://ag-ui.com/spec/1.0/schema.json, JSON Schema 2020-12), checked 2026-10-02. - Migrating to 1.0: Documentation, 1.0, checked 2026-10-02.
- MCP, A2A, and AG-UI: Documentation, as published, checked 2026-10-02.
- AG-UI repository README: MIT-licensed repository, commit e60019d (main, 2026-10-02, tag release/2026-10-02), checked 2026-10-02.
- @ag-ui/core on the npm registry: Published package, 1.0.0 (2026-09-17), latest 1.0.1 (2026-09-29), checked 2026-10-02.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- a2aSkill
- ap2Skill
- asyncapiSkill
- authzenSkill
- cedarSkill
- cloudeventsSkill
- eu-ai-actSkill
- fapiSkill
- gnapSkill
- jwtSkill
- mcp-authorizationSkill
- oauthSkill
- ocsfSkill
- openapi-arazzoSkill
- openapi-overlaySkill
- openapiSkill
- openfeatureSkill
- openid4vcSkill
- openid-connectSkill
- openid-federationSkill
- openidSkill
- opentelemetry-genaiSkill
- owasp-agenticSkill
- problem-detailsSkill
- ratelimit-headersSkill
- scaledock-agent-permissionsSkill
- scaledock-enterprise-identitySkill
- scaledock-http-apiSkill
- scaledock-mcp-serverSkill
- scaledock-repo-standardSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

