R_REDDYX.XYZ
AgentsTypeScript★ 18,397⑂ 1,894 forksMIT

ag-ui-protocol/ag-ui

AG-UI AGENT-USER INTERACTION PROTOCOL

Open event-based protocol for connecting AI agents to frontend applications. Standardizes bidirectional stream of typed events between agent and any client.

// KEY FEATURES

  • Bidirectional stream of typed events between agent and client
  • SDK for TypeScript, Python and .NET generated from JSON Schema
  • One agent works with web, mobile apps, terminal and Slack
  • CLI create-ag-ui-app scaffolds Next.js or terminal client project

// DEEP DIVE: HOW IT WORKS

AG-UI defines a single interaction protocol: the agent accepts RunAgentInput and returns an event stream (RunStarted, TextMessageContent, ToolCall, RunFinished, etc.). Transport is HTTP with Server-Sent Events or WebSocket; event encoding is described in JSON Schema from which SDKs for TypeScript, Python and .NET are generated. This eliminates the need to write adapters for each agent framework.

Unlike MCP (tools and context) and A2A (agent-to-agent), AG-UI focuses exclusively on the agent–user boundary. Protocol version 1.0 is frozen, backwards compatible with 0.x and covered by a migration guide. The ecosystem includes ready integrations with CopilotKit, LangGraph, CrewAI, Mastra, PydanticAI and others.

Running requires Node.js 20+ or Python 3.9+. The CLI `create-ag-ui-app` scaffolds a Next.js app with CopilotKit or a terminal client, pre-wired to the chosen framework. API keys (e.g., OpenAI) are set via environment variables. No specific hardware or OS requirements are mentioned in the README.

// USE CASES

Best for: Frontend and backend developers integrating AI agents into applications

  • Connect one agent to web interface, mobile app and terminal simultaneously
  • Replace custom WebSocket adapters with standard event-based protocol
  • Rapidly prototype chat interface via CLI and swap agent framework without frontend changes

// QUICK START

npx create-ag-ui-app@latest
export OPENAI_API_KEY="sk-..."
npm run dev
pip install ag-ui-protocol fastapi uvicorn
uvicorn server:app --port 8000

Commands are taken from the repository README — check the current version on GitHub before running.

#ag-ui-protocol#agent-frontend#agent-ui#agentic-workflow#ai-agents
Open on GitHub →

New repositories every 30 minutes

REDDYX AI scans GitHub 24/7 and ships the best AI/ML/Web3 projects to Telegram.

Join on Telegram
← Full catalog·Full index

// SIMILAR REPOSITORIES

WEB INTERFACE FOR HERMES AGENT★ 19523OPEN SOURCE COWORK DESKTOP FOR AI AGENTS★ 15836MULTI-LANGUAGE AI AGENT FRAMEWORK★ 14707AI AGENT FOR BROWSER AUTOMATION★ 14332AI GENERATION OF CAD MODELS FROM TEXT★ 26372OPEN A2A PROTOCOL FOR AGENTS★ 26556

← FULL CATALOG

ag-ui-protocol/ag-ui — AG-UI Agent-User Interaction Protocol