LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

copilotkit-agui

Use when building custom agent backends, implementing the AG-UI protocol, debugging streaming issues, or understanding how agents communicate with frontends. Covers event types, SSE transport, AbstractAgent/HttpAgent patterns, state synchronization, tool calls, and human-in-the-loop flows.

36,360stars4,489forksUpdated 7/30/2026
Web DevelopmentDocumentation#agents#documentation#copilotkit#protocol#server-sent-events#typescript

Security Assessment

Safe(96/100)
Security Score96/100

About copilotkit-agui

This skill documents CopilotKit's AG-UI (Agent-User Interaction) protocol, an open, event-based protocol for streaming communication between agent backends and frontends. It solves the problem of standardizing how an agent's output — text, tool calls, state, reasoning, and lifecycle signals — reaches a UI, so developers building custom agent backends or new framework integrations have a precise contract to implement rather than reverse-engineering the wire format.

The skill covers the full event taxonomy grouped into families: lifecycle (RUN_STARTED/FINISHED/ERROR, STEP_STARTED/FINISHED), streaming text, tool calls, state synchronization (snapshots versus JSON Patch deltas per RFC 6902), reasoning, activity updates, and custom extension points. It documents the SSE wire format, convenience chunk events that auto-expand into Start/Content/End triads, and the three core npm packages (@ag-ui/core, @ag-ui/client, @ag-ui/encoder). Reference material walks through building an AG-UI backend step by step — extending AbstractAgent to return an RxJS Observable, exposing an HTTP SSE endpoint with EventEncoder, handling tool-call round trips, emitting state and activity updates, and reporting steps — with concrete TypeScript and Express examples.

It targets developers building custom agent backends, integrating new agent frameworks (LangGraph, Mastra, CrewAI) with CopilotKit, or debugging streaming, event-ordering, and encoding issues. It explicitly defers React hooks/components to the copilotkit-develop skill and runtime setup to copilotkit-setup, positioning itself as the protocol-and-backend reference in the CopilotKit skill family.

FAQ

What is AG-UI?

AG-UI (Agent-User Interaction) is CopilotKit's open, event-based protocol for agent-to-frontend communication. All interaction flows as typed events streamed over SSE (Server-Sent Events) or binary protobuf transport.

How do I build an AG-UI backend?

Define an endpoint that accepts a POST with a RunAgentInput body and responds with text/event-stream. Emit events in order — RUN_STARTED first, then content events, then RUN_FINISHED or RUN_ERROR — encoding each with @ag-ui/encoder's EventEncoder. In-process agents can instead extend AbstractAgent and return an RxJS Observable<BaseEvent>.

How does state synchronization work?

Agents emit STATE_SNAPSHOT to replace all client state, or STATE_DELTA with JSON Patch (RFC 6902) operations for incremental updates. MESSAGES_SNAPSHOT and activity snapshot/delta events follow similar patterns.

How are tool calls handled?

The agent emits TOOL_CALL_START/ARGS/END, then typically RUN_FINISHED. The client executes the tool, appends the result to messages, and starts a new run; the agent sees the tool result in input.messages and continues.

When should I use a different CopilotKit skill?

Use copilotkit-develop for React hooks and frontend components, copilotkit-setup for runtime configuration, and copilotkit-integrations for framework-specific guides. This skill is for the protocol and custom backends.

All Files

6 files
references/building-agents.md11.5 KB
View
sources.md2.0 KB
View
references/event-flow-diagrams.md18.5 KB
View
references/protocol-spec.md25.1 KB
View
SKILL.md5.3 KB
View
references/client-sdk.md18.9 KB
View

Install copilotkit-agui

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

copilotkit/copilotkit

Related Skills

tigris-security-access-control

3

rebuttal-writing

362

building-blocks

189

docs-search

189