You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://go.copilotkit.ai/ag-ui-working-group-3)
1
+
[](https://go.copilotkit.ai/ag-ui-build-an-agent-canvas)
# <imgsrc="https://github.com/user-attachments/assets/ebc0dd08-8732-4519-9b6c-452ce54d8058"alt="ag-ui Logo"height="42px" /> AG-UI: The Agent-User Interaction Protocol
6
+
AG-UI is a lightweight, event-based protocol that standardizes how AI agents connect to front-end applications. Built for simplicity and flexibility, it enables seamless integration between your AI agents and user interfaces.
4
7
5
-
AG-UI is an open, lightweight, event-based protocol that standardizes **how AI agents connect to front-end applications**.
## AG-UI Showcase: The AG-UI Dojo (Building-Blocks Viewer)
92
88
93
-
The [ag-ui dojo](https://feature-viewer-langgraph.vercel.app/) showcases many of the building blocks that ag-ui supports.
89
+
## AG-UI Showcase: The AG-UI Dojo (Building-Blocks Viewer)
90
+
The [AG-UI Dojo](https://copilotkit-feature-viewer.vercel.app/) showcases many of the building blocks that AG-UI supports ([AG-UI Dojo Source Code](https://github.com/ag-ui-protocol/ag-ui/tree/main/typescript-sdk/apps/dojo)).
94
91
95
92
The building blocks are designed to be simple and focused -- between 50-200 lines of code.
An AG-UI integration makes your agent speak the AG-UI protocol. This means your agent can work with any AG-UI compatible client application - like chat interfaces, copilots, or custom AI tools.
17
+
18
+
Think of it like adding a universal translator to your agent. Instead of building custom APIs for each client, you implement AG-UI once and instantly work with any compatible application.
19
+
20
+
Agents integrating with AG-UI can:
21
+
-**Stream responses** - Real-time text that appears as it's generated
22
+
-**Call client-side tools** - Your agent can use functions and services defined by clients
23
+
-**Share state** - Your agent's state is bidirectional shared state
24
+
-**Execute universally** - Integrate with any AG-UI compatible client application
25
+
-**And much more!** - Check out the full specification [here](/concepts/events).
26
+
27
+
### When should I make any integration?
28
+
If the integration you're looking for is not listed on our [integrations page](/integrations), you'll need to make an integration. We've got a few guides on this below!
29
+
30
+
However, if you're looking to utilize an existing integration (like LangGraph, CrewAI, Mastra, etc.), you can skip this step and go straight to [building an application](/quickstart/applications).
31
+
32
+
# Types of Integrations
33
+
So you've decided you need an integration! Great, there are **two main ways** to implement an AG-UI integration:
34
+
35
+
<CardGroupcols={2}>
36
+
<Card
37
+
icon="server"
38
+
title="Server Implementation"
39
+
href="/quickstart/server"
40
+
>
41
+
Emit AG-UI events **directly from your agent** or server.
42
+
</Card>
43
+
<Card
44
+
icon="code"
45
+
title="Middleware Implementation"
46
+
href="/quickstart/middleware"
47
+
>
48
+
**Translate existing protocols** and applications to AG-UI events.
49
+
</Card>
50
+
</CardGroup>
51
+
52
+
### When to use a server implementation
53
+
Server implementations allow you to directly emit AG-UI events from your agent or server. If you are not using an
54
+
agent framework or haven't created a protocol for your agent framework yet, this is the best way to get started.
55
+
56
+
Server implementations are also great for:
57
+
- Building a **new agent frameworks** from scratch
58
+
-**Maximum control** over how and what events are emitted
59
+
- Exposing your agent as a **standalone API**
60
+
61
+
### When to use a middleware implementation
62
+
Middleware is the flexible option. It allows you to translate existing protocols and applications to AG-UI events
63
+
creating a bridge between your existing system and AG-UI.
64
+
65
+
Middleware is great for:
66
+
- Taking your **existing protocol or API** and **translating it universally**
67
+
- Working within the confines of **an existing system or framework**
68
+
-**When you don't have direct control** over the agent framework or system
0 commit comments