A2UI क्या है?
A2UI एजेंट्स के लिए एक ओपन प्रोटोकॉल, जिससे वे declarative UI भेजते हैं और ऐप्स उसे अपने native components से render करते हैं. यह App UIs & Builders टूल्स की Generative UI SDKs श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।
सारांश
A2UI (Agent-to-User Interface) एक ओपन स्टैंडर्ड और लाइब्रेरी का सेट है, जो AI एजेंट्स को “UI में बात” करने देता है। सादे टेक्स्ट में जवाब देने या executable code भेजने के बजाय, एजेंट एक declarative JSON payload भेजता है, जो इंटरफ़ेस का इरादा बताता है: जैसे बुकिंग फ़ॉर्म, फ़्लाइट स्टेटस कार्ड या अप्रूवल डैशबोर्ड। क्लाइंट ऐप उस विवरण को अपनी native component library से render करता है। प्रोजेक्ट इसे “डेटा जैसा सुरक्षित, लेकिन code जैसा expressive” बताता है।

सुरक्षा ही शुरुआती बिंदु है। क्लाइंट के पास भरोसेमंद, पहले से मंज़ूर components (Card, Button, TextField आदि) की एक catalog होती है, और एजेंट सिर्फ़ उसी catalog से components माँग सकता है। इसलिए दूर से चलने वाला, किसी third party का, या trust boundary के पार चलने वाला एजेंट कभी आपके ऐप में code नहीं भेजता। UI ID references वाले components की एक flat list है, जिसे LLM टुकड़ों में आसानी से generate कर सकता है। स्ट्रीम होते समय इंटरफ़ेस धीरे-धीरे render हो सकता है, और बातचीत आगे बढ़ने पर एजेंट उसे patch कर सकता है।

वही payload framework-agnostic है। स्पेसिफ़िकेशन ने नवंबर 2026 में अपना पहला स्थिर संस्करण, 1.0, जारी किया, जिसमें bidirectional function calls, accessibility support और extensions जोड़े गए। रिपॉज़िटरी में React, Lit (web components), Angular, Flutter, SwiftUI और Jetpack Compose के renderers हैं, साथ ही Python, TypeScript और Dart के लिए agent SDKs हैं, जो LLM को catalog समझाते हैं और उसके जवाब को A2UI messages में parse करते हैं। Messages A2A protocol और AG-UI जैसे मौजूदा transports पर चलते हैं। A2UI Apache 2.0 license के तहत है, Google ने इसे बनाया है, और इसमें CopilotKit तथा open-source community का योगदान है।
यह क्या करता है
- Declarative JSON format: एजेंट components और data model का विवरण देते हैं, executable code कभी नहीं
- Component catalogs: कौन से components मौजूद हैं, यह क्लाइंट तय करता है, और आप अपने design system से मेल खाने वाली अपनी catalog बना सकते हैं
- Streaming, incrementally updatable UI, जो एक flat adjacency list से बना है और जिसे LLMs टुकड़ों में generate कर सकते हैं
- React, Lit, Angular, Flutter और SwiftUI के लिए renderers, साथ ही Jetpack Compose (v0.9.1, 1.0 जल्द आने की घोषणा हुई है)
- Agent SDKs (Python `a2ui-agent-sdk`, TypeScript `@a2ui/agent`, Dart `a2ui_agent`), जिनमें A2A protocol और Google के Agent Development Kit के लिए adapters हैं
- A2UI Composer: एक browser-based visual editor, जिसमें Gemini assistant, live preview और JSON editor है
शुरू करें
A2UI को पहले browser में आज़माया जा सकता है, पूरा full-stack demo locally चलाया जा सकता है, या अपने ऐप में renderer जोड़ा जा सकता है।

बिना कुछ इंस्टॉल किए आज़माएँ
https://a2ui-project.github.io/composer/ पर A2UI Composer खोलें, उसके Gemini assistant को कोई इंटरफ़ेस बताएँ (इसके लिए Gemini API key चाहिए), और render हुआ preview तथा बना A2UI JSON साथ-साथ देखें। इस JSON को आप किसी भी agent prompt में paste कर सकते हैं।
Restaurant Finder demo चलाएँ
Quickstart में Lit renderer के साथ एक Gemini-powered ADK agent चलता है। इसके लिए आपको Corepack enabled वाला Node.js 18+, uv और Gemini API key चाहिए। Commands workspaces इंस्टॉल करते हैं, renderers build करते हैं, Python agent शुरू करते हैं और client को http://localhost:5173 पर खोलते हैं।
git clone https://github.com/a2ui-project/a2ui.git
cd a2ui
export GEMINI_API_KEY="your_gemini_api_key"
corepack enable
yarn install
cd samples/client/lit
yarn demo:restaurantअपनी web app में renderer जोड़ें
अपने framework का renderer shared @a2ui/web_core package के साथ इंस्टॉल करें। React renderer एक MessageProcessor class, एक <A2UISurface> component और एक useA2UI() hook देता है; @a2ui/lit और @a2ui/angular भी इसी तरह इंस्टॉल होते हैं।
npm install @a2ui/react @a2ui/web_coreया Flutter पर render करें
a2ui_flutter A2UI surfaces को Flutter widgets के रूप में render करता है, और a2ui_core messages को process करता है तथा surface state संभालता है। ये packages पुराने genui package की जगह लेते हैं।
flutter pub add a2ui_flutter a2ui_coreकोई भी agent framework जोड़ें
A2UI को LangGraph, CrewAI, Mastra, ADK, Strands या किसी अन्य harness के साथ इस्तेमाल करने के लिए, उसके CLI से एक AG-UI app scaffold करें और फिर प्रोजेक्ट की गाइड “Use A2UI with Any Agent Framework” में बताए अनुसार A2UI rendering enable करें।
npx create-ag-ui-app@latestकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- एजेंट को सामने वाले अनुरोध के लिए कस्टम फ़ॉर्म (date pickers, sliders, inputs) बनाने दें, जैसे कोई खास reservation
- किसी remote sub-agent, जैसे travel-booking agent, से लौटा UI अपनी main chat window के भीतर render करें, बिना उसके code पर भरोसा किए
- Enterprise agent workflows में तुरंत approval dashboards या data visualizations बनवाएँ
- एक ही JSON payload से एक ही agent को web, Flutter और native mobile clients तक पहुँचाएँ
How A2UI compares
A2UI alongside other open-source generative ui sdks tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| CopilotKit | ★ 39.1k | इन-ऐप AI copilots और agent-driven generative UI को React और उससे आगे तक जोड़ें |
| Vercel AI SDK | ★ 28.3k | Provider-agnostic TypeScript टूलकिट, AI ऐप्स, agents और chat UI बनाने के लिए |
| OpenUI | ★ 22.8k | सादे शब्दों में UI का वर्णन करें और LLM को उसे लाइव रेंडर होते देखें |
| AG-UI प्रोटोकॉल | ★ 22.5k | AI एजेंट को यूज़र-फेसिंग ऐप्स से जोड़ने वाला एक ओपन, इवेंट-आधारित प्रोटोकॉल |
| json-render | ★ 19.9k | मॉडल से कॉम्पोनेंट नहीं, JSON लिखवाएं, और उसे अपने ख़ुद के UI में रेंडर करें |
| A2UI | ★ 19.2k | एजेंट्स के लिए एक ओपन प्रोटोकॉल, जिससे वे declarative UI भेजते हैं और ऐप्स उसे अपने native components से render करते हैं |
| OpenUI (Thesys) | ★ 16.1k | मॉडल से बनी UI को स्ट्रीम करने के लिए एक खुला स्टैंडर्ड और React रनटाइम |
| assistant-ui | ★ 13.5k | ChatGPT जैसा UX, composable React primitives के रूप में |
