DEV Community

Cover image for Introducing AG-UI: The Protocol Where Agents Meet Users
Nathan Tarbert for CopilotKit

Posted on • Edited on • Originally published at copilotkit.ai

107 26 29 27 26

Introducing AG-UI: The Protocol Where Agents Meet Users

I'm thrilled to announce AG-UI, the Agent-User Interaction Protocol, a streamlined bridge connecting AI agents to real-world applications.

This brand new protocol is brought to you by CopilotKit

ag-ui1

Check out AG-UI's GitHub ⭐️

What is AG-UI?

AG-UI is an open, lightweight protocol that streams a single sequence of JSON events over standard HTTP or an optional binary channel. These events—messages, tool calls, state patches, lifecycle signals—flow seamlessly between your agent backend and front-end interface, maintaining perfect real-time synchronization.

Get started in minutes using our TypeScript or Python SDK with any agent backend (OpenAI, Ollama, LangGraph, or custom code). Visit docs.ag-ui.com for the specification, quick-start guide, and interactive playground.

ag-ui2

Agent-User Interaction

Today’s AI Agent ecosystem is maturing. Agents are going from interesting viral demos to actual production use, including by some of the biggest enterprises in the world.

However, the ecosystem has largely focused on backend automation, processes that run independently with limited user interaction. Workflows that are set off, or happen automatically, whose output is then used.

Common use-cases include data migration, research and summarization, form-filling, etc.

Repeatable and simple workflows, where accuracy can be ensured, or where 80% accuracy is good enough.

These have already been big productivity boosters. Automating time-consuming and tedious tasks.

Where Agents Meet Users

ag-ui3

Coding tools (Devin vs. Cursor)

Throughout the adoption of generative AI, coding tools have been canneries in the coal mine, and Cursor is the best example of a user-interactive agent. An AI agent that works alongside users, in a shared workspace.

This contrasts with Devin, which was the promise of a fully autonomous agent that automates high-level work.

For many of the most important use-cases, Agents are helpful if they can work alongside users. This means users can see what the agent is doing, can co-work on the same output, and easily iterate together in a shared workspace.

The Challenges of Building a User-Interactive Agent

Creating these collaborative experiences presents significant technical challenges:

  • Real-time streaming: LLMs produce tokens incrementally; UIs need them instantly without blocking on the full response.

  • Tool orchestration: Modern agents call functions, run code, hit APIs. The UI must show progress and results, sometimes ask for human approval, and then resume the run—all without losing context.

  • Shared mutable state: Agents often generate plans, tables, or code folders that evolve step-by-step. Shipping entire blobs each time wastes bandwidth; sending diffs demands a clear schema.

  • Concurrency & cancellation: A user might fire off multiple queries, stop one mid-flight, or switch threads. The backend and front-end need thread IDs, run IDs, and an orderly shutdown path.

  • Security boundaries: Streaming arbitrary data over WebSockets is easy until you need CORS, auth tokens, and audit logs that an enterprise will sign off on.

  • Framework sprawl: LangChain, CrewAI, Mastra, AG2, home-grown scripts—all speak slightly different dialects. Without a standard, every UI must reinvent adapters and edge-case handling.

The AG-UI Solution

Diagram

AG-UI addresses these challenges through a simple yet powerful approach:

Your client makes a single POST to the agent endpoint, then listens to a unified event stream. Each event has a type(e.g., TEXT_MESSAGE_CONTENT, TOOL_CALL_START, STATE_DELTA), and minimal payload. Agents emit events as they occur, and UIs respond appropriately—displaying partial text, rendering visualizations when tools complete, or updating interfaces when state changes.

Built on standard HTTP, AG-UI integrates smoothly with existing infrastructure while offering an optional binary serializer for performance-critical applications.

What This Enables

Tweet

Please like and follow

AG-UI establishes a consistent contract between agents and interfaces, eliminating custom WebSocket formats and text parsing hacks. With this unified protocol:

  • Components become interchangeable: Use CopilotKit's React components with any AG-UI source

  • Backend flexibility: Switch between cloud and local models without UI changes

  • Multi-agent coordination: Orchestrate specialized agents through a single interface

  • Enhanced development: Build faster with richer experiences and zero vendor lock-in

AG-UI isn't just a technical specification—it's the foundation for the next generation of AI-enhanced applications where humans and agents seamlessly collaborate.

Please check out the Getting Started docs, and I look forward to you trying it out.

Please RSVP for 2 events on May 16th

Follow CopilotKit on Twitter and say hi, and if you'd like to build something cool, join our Discord.

ACI image

ACI.dev: The Only MCP Server Your AI Agents Need

ACI.dev’s open-source tool-use platform and Unified MCP Server turns 600+ functions into two simple MCP tools on one server—search and execute. Comes with multi-tenant auth and natural-language permission scopes. 100% open-source under Apache 2.0.

Star our GitHub!

Top comments (16)

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Crazy things are happening right now. Really awesome work by the team! 🙌

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

Really appreciate it Anmol!

I love seeing agent builders get so excited around this protocol

Collapse
 
uliyahoo profile image
uliyahoo

🔥🔥

Collapse
 
srbhr profile image
𝚂𝚊𝚞𝚛𝚊𝚋𝚑 𝚁𝚊𝚒

Sweet 😁

Collapse
 
nevodavid profile image
Nevo David

pretty cool seeing stuff actually move toward more real collaboration - kinda makes me wonder tho, you think the hardest part is tech or just keeping people in the loop long-term

Collapse
 
nevodavid profile image
Nevo David

Pretty cool seeing real progress here - honestly makes me wanna dig in and mess around with it more.

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

You certainly should, Nevo.
I would love to get your feedback when you do.

Collapse
 
necatiozmen profile image
Necati Özmen

Maybe we can think about to integrating Voltagent as well:)
github.com/VoltAgent/voltagent

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

Hey Necati, if you'd like, send me a DM on Twitter @nathan_tarbert and I can set up a shared Slack workspace and we can guide you.

Collapse
 
david-723 profile image
David

Sick!

Collapse
 
zack-123 profile image
Sayeed

This makes so much sense. It seems like the UI layer was missing

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

I agree, Sayeed!

Collapse
 
james0123 profile image
James

This is so awesome!

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

Thanks James!

Collapse
 
ferguson0121 profile image
Ferguson

I'm going to give this a try. I think this might be exactly what I'm looking for.

I've been trying to build everything from scratch and I'm banging my head against a wall.

Thanks for this

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

ACI image

ACI.dev: Fully Open-source AI Agent Tool-Use Infra (Composio Alternative)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Check out our GitHub!