# AG-UI

> Bring your agents from any framework to your users through AG-UI and CopilotKit.

## What is the AG-UI Protocol? [#what-is-the-ag-ui-protocol]

Build your agent with LangGraph, Mastra, Pydantic AI, or another framework, and CopilotKit's UI talks to it the same way.
That shared language is AG-UI, an open event protocol. For the protocol itself, see [docs.ag-ui.com](https://docs.ag-ui.com).
AG-UI is an open standard, developed by the CopilotKit team and several agent framework partners.

<Image
  src="/images/agui-ecosystem-light.png"
  alt="AG-UI Ecosystem Diagram"
  width={4096}
  height={2304}
  className="block dark:hidden"
/>
<Image
  src="/images/agui-ecosystem-dark.png"
  alt="AG-UI Ecosystem Diagram"
  width={4096}
  height={2304}
  className="hidden dark:block"
/>

## How CopilotKit uses AG-UI [#how-copilotkit-uses-ag-ui]

CopilotKit uses AG-UI to abstract the connection between your applications and the AI Agents that power your copilots. Your agents can be built using any agent framework that supports AG-UI, including LangGraph, Mastra, and Pydantic AI. [Pick yours](/) to open its quickstart.

- **Flexibility and Interoperability**: CopilotKit components work with any AG-UI agent. You can change the backend model and keep the UI.
- **Unified Communication**: CopilotKit uses the AG-UI protocol to manage all the back-and-forth communication between the frontend and the AI agent.
- **Frontend Tool Calls**: When an agent needs to use a tool that's integrated into the frontend application, AG-UI events handle this interaction.

- **UI Components**: CopilotKit provides React components that are built for the AG-UI protocol. These components use AG-UI events to receive and display streaming AI responses and other data from the agent.

- **State Management**: The AG-UI protocol includes events for managing shared state between the frontend and the agent. CopilotKit can then use these events to keep the application's UI and the agent's state synchronized in real-time.

To learn more, check out the [AG-UI](https://ag-ui.com) website.
