Loading...
Loading...
AG-UI (Agent-User Interaction) protocol reference for building AI agent frontends. Use when implementing AG-UI events (RUN_STARTED, TEXT_MESSAGE_*, TOOL_CALL_*, STATE_*), building agents that communicate with frontends, implementing streaming responses, state management with snapshots/deltas, tool call lifecycles, or debugging AG-UI event flows.
npx skill4agent add meetsmore/use-ai ag-ui-protocoldocs/2025-11-27/introduction.mdconcepts/architecture.mdconcepts/events.mdconcepts/messages.mdconcepts/state.mdconcepts/tools.mdconcepts/agents.mdconcepts/middleware.mdconcepts/serialization.mdquickstart/introduction.mdquickstart/server.mdquickstart/clients.mdenum EventType {
// Lifecycle
RUN_STARTED = "RUN_STARTED",
RUN_FINISHED = "RUN_FINISHED",
RUN_ERROR = "RUN_ERROR",
STEP_STARTED = "STEP_STARTED",
STEP_FINISHED = "STEP_FINISHED",
// Text Messages
TEXT_MESSAGE_START = "TEXT_MESSAGE_START",
TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT",
TEXT_MESSAGE_END = "TEXT_MESSAGE_END",
// Tool Calls
TOOL_CALL_START = "TOOL_CALL_START",
TOOL_CALL_ARGS = "TOOL_CALL_ARGS",
TOOL_CALL_END = "TOOL_CALL_END",
// State
STATE_SNAPSHOT = "STATE_SNAPSHOT",
STATE_DELTA = "STATE_DELTA",
MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT",
// Custom
RAW = "RAW",
CUSTOM = "CUSTOM",
}userassistantsystemtoolactivitydeveloperinterface Tool {
name: string; // Unique identifier
description: string; // Purpose explanation
parameters: JSONSchema; // Accepted arguments
}TOOL_CALL_STARTTOOL_CALL_ARGSTOOL_CALL_END