a2ui-vue

May 24, 2026 ยท View on GitHub

A2UI Protocol docs

a2ui-vue is a community Vue 3 renderer for the A2UI (Agent-to-UI) open protocol, fully supporting the official A2UI v0.9 specification.
It enables AI agents to express UI intent as structured JSON and have it rendered as rich, interactive components inside any Vue 3 application โ€” with no HTML/CSS knowledge required by the agent.

๐Ÿ“– Documentation ยท ๐ŸŒ ไธญๆ–‡่ฏดๆ˜Ž

้กน็›ฎๆˆชๅ›พ้กน็›ฎๆˆชๅ›พ

TL;DR

  • Product: Vue 3 renderer for the A2UI (Agent-to-UI) protocol
  • Input: structured A2UI JSON messages generated by AI agents or backend services
  • Output: rich, interactive Vue user interfaces
  • Best for: generative UI, agent UX, AI copilots, tool-driven workflows, structured frontend rendering
  • Stack: Vue 3, TypeScript, Composition API, extensible component catalog
  • Compatibility: Fully supports the official A2UI v0.9 specification (Surface management, component rendering, DataModel binding, function calls, and more). v0.8 specs are included in the repository for reference
  • Version mapping: Use a2ui-vue@0.8.x for A2UI v0.8 specification; use a2ui-vue@0.9.x for A2UI v0.9 specification

Why a2ui-vue?

  • Decouples agent logic from frontend implementation details
  • Lets AI agents describe interface intent with structured JSON instead of raw HTML
  • Gives Vue teams a native renderer with TypeScript, theming, and component reuse
  • Makes agent-generated UI more deterministic, inspectable, and maintainable

What is A2UI?

A2UI (Agent-to-UI) is an open protocol that defines how AI agents communicate UI intent to a frontend renderer. Instead of generating raw HTML/CSS, an agent emits typed JSON messages ("show a card with title X and a list of Y"). The renderer translates those messages into real visual components.

AI Agent  โ”€โ”€(A2UI JSON)โ”€โ”€โ–บ  a2ui-vue Renderer  โ”€โ”€โ–บ  User Interface

a2ui-vue is the community Vue 3 implementation of this protocol:

  • 20+ built-in components (layout, content, media, inputs)
  • Composables: provideA2UI, useMessageProcessor, useA2UIConfig
  • Extensible component Catalog & theme system
  • Full TypeScript support, ESM + CJS dual build
  • Compatible with Google's official Angular and Lit A2UI renderers

Installation

npm install a2ui-vue
# or
pnpm add a2ui-vue

Requirements: Vue 3.4+, Node.js 18+

Quick Start

// main.ts
import { createApp } from 'vue'
import App from './App.vue'
import { provideA2UI, DEFAULT_CATALOG, defaultTheme } from 'a2ui-vue'
import 'a2ui-vue/dist/a2ui-vue.css'

const app = createApp(App)

provideA2UI({
  app,
  catalog: DEFAULT_CATALOG,
  theme: defaultTheme,
})

app.mount('#app')
<!-- App.vue -->
<script setup lang="ts">
import { computed } from 'vue'
import { A2UISurface, useMessageProcessor } from 'a2ui-vue'

const processor = useMessageProcessor()

// Feed agent messages and render
processor.processMessages(messages)

const surfaces = computed(() => Array.from(processor.getSurfaces()))
</script>

<template>
  <A2UISurface
    v-for="[surfaceId] in surfaces"
    :key="surfaceId"
    :surface-id="surfaceId"
  />
</template>

Use Cases

  • AI chat applications that need structured cards, lists, forms, and media blocks
  • Internal copilots that generate task-oriented workflow UIs from tool outputs
  • Agent platforms that need a protocol-first generative UI renderer for Vue 3
  • Systems that want consistent rendering across model providers and agent implementations

Documentation Map

TopicLink
IntroductionDocs: Introduction
Quick StartDocs: Getting Started
Renderer ConceptsDocs: Vue Renderer
ComponentsDocs: Component Reference

FAQ

What is a2ui-vue?

a2ui-vue is a Vue 3 renderer for the A2UI open protocol. It turns structured JSON messages from AI agents into real, interactive Vue components.

What is A2UI?

A2UI stands for Agent-to-UI. It is a protocol for describing UI intent in a structured, renderer-agnostic format.

How is this different from generating HTML directly?

The agent produces structured UI data rather than raw markup. The renderer owns presentation, theming, and component behavior, which improves consistency and maintainability.

Can I use this with any LLM or agent framework?

Yes. Any model or agent system that can produce A2UI-compliant JSON can work with a2ui-vue.

Does it support custom components?

Yes. You can extend the default catalog and inject your own components through the configuration layer.

Monorepo Structure

a2ui-vue/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ vue-renderer/       # a2ui-vue โ€” Vue 3 renderer (main package)
โ”‚   โ””โ”€โ”€ web_core/           # @a2ui/web_core โ€” protocol core & types
โ”œโ”€โ”€ node-a2ui/
โ”‚   โ”œโ”€โ”€ agent_sdks/         # @a2ui/agent-sdks โ€” Node.js agent toolkit
โ”‚   โ””โ”€โ”€ a2a_agents/         # Agent implementation samples
โ”œโ”€โ”€ samples/
โ”‚   โ”œโ”€โ”€ agent/              # Server-side agent samples
โ”‚   โ”‚   โ”œโ”€โ”€ component_gallery/
โ”‚   โ”‚   โ”œโ”€โ”€ contact_lookup/
โ”‚   โ”‚   โ””โ”€โ”€ restaurant_finder/
โ”‚   โ””โ”€โ”€ client/             # Vue frontend client samples
โ”‚       โ”œโ”€โ”€ gallery/
โ”‚       โ”œโ”€โ”€ contact/
โ”‚       โ””โ”€โ”€ restaurant/
โ”œโ”€โ”€ specification/          # A2UI protocol spec (v0.8 ~ v0.10)
โ””โ”€โ”€ docs/                   # VitePress documentation site

Available Scripts

CommandDescription
pnpm run build:libBuild all library packages
pnpm run build:docBuild the VitePress documentation site
pnpm run dev:galleryStart Component Gallery demo (agent + client)
pnpm run dev:contactStart Contact Lookup demo (agent + client)
pnpm run dev:restaurantStart Restaurant Finder demo (agent + client)

Demo Applications

DemoDescription
Component GalleryStatic showcase of all 20+ built-in components, no LLM required
Contact LookupAI agent queries contacts and returns card-based UI
Restaurant FinderAI agent recommends restaurants with structured UI output

License

MIT