{"slug": "show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends", "title": "Show HN: AG-UI, An open protocol for connecting AI agents to front ends", "summary": "A developer released AG-UI Inspector, a Manifest V3 Chrome DevTools extension that captures, decodes and debugs AG-UI 1.0 protocol streams in real time, reconstructing agent runs into a collapsible execution tree and exporting captured traffic into Playwright and MSW test mocks. The extension intercepts HTTP and Server-Sent Events traffic via the Chrome DevTools Protocol (chrome.debugger), including nested iframes, without SDK changes, and replays RFC 6902 STATE_DELTA JSON Patches from a STATE_SNAPSHOT to reconstruct agent state at any point in the timeline. It also validates AG-UI 1.0 lifecycle rules, flags truncated streams or malformed frames, and scrubs sensitive headers and secret/token/password keys before storing or exporting traces; it requires Node.js 20+ and installs via Load unpacked in about 30 seconds.", "body_md": "A Manifest V3 Chrome DevTools extension for capturing, decoding, and debugging **AG-UI 1.0** protocol streams in real time.\n\nInstead of squinting at raw `text/event-stream` chunks in Chrome's Network tab, **AG-UI Inspector** reconstructs agent runs into a collapsible execution tree, lets you scrub through state patches step by step, and exports real agent traffic into deterministic Playwright and MSW test mocks.\n\n- \n**Zero-Config Stream Capture:** Passively intercepts HTTP + Server-Sent Events (SSE) and`EventSource` traffic via Chrome DevTools Protocol (`chrome.debugger` ), including nested iframes—no SDK changes required.\n- \n**Flat & Execution Tree Views:** Switch between a chronological wire log and a nested execution tree (`RUN_STARTED` →`STEP_STARTED` →`TOOL_CALL_*` →`TEXT_MESSAGE_*` ) with roll-up span durations and automatic token-chunk collapsing.\n- \n**State Time-Travel:** Reconstructs agent state at any event in the timeline by starting from`STATE_SNAPSHOT` and immutably replaying RFC 6902`STATE_DELTA` JSON Patches.\n- \n**1-Click Test Codegen:** Export any captured run directly into a copy-pasteable**Playwright `page.route()`** mock or**MSW (` http.post`)** streaming handler.\n- \n**Protocol Diagnostics:** Validates AG-UI 1.0 lifecycle rules, flags truncated streams or malformed frames, and inspects redacted`RunAgentInput` payloads.\n- \n**Built-In Redaction:** Automatically scrubs sensitive headers, query parameters, and secret/token/password keys before storing or exporting traces.\n- \n**1-Click Sample Run:** Includes a built-in sample agent run so you can test the timeline, state time-travel, and mock generators without a live backend.\n\nYou can load the prebuilt extension directly into Chrome or Edge in ~30 seconds:\n\n1. \nDownload the latest `ag-ui-inspector-v*.zip` from the[**Releases**](https://github.com/akshaypalekar15/ag-ui-inspector/releases/latest) page.\n2. \nUnzip the archive to a local folder (verify `manifest.json` is directly inside the extracted folder).\n3. \nOpen `chrome://extensions` in your browser.\n4. \nToggle **Developer mode** ON in the top-right corner.\n5. \nClick **Load unpacked** and select the extracted folder.\n\n1. \nOpen any application running AG-UI (or test immediately on the [AG-UI Dojo](https://dojo.ag-ui.com/) ).\n2. \nOpen Chrome DevTools ( `F12` or`Cmd+Option+I` /`Ctrl+Shift+I` ) and select the**AG-UI** panel tab.\n3. \nClick **Attach** to begin capturing live streams (or click**Load Sample Run** from the empty state to explore offline).\n4. \nUse the **Flat | Tree** toggle and**Collapse chunks** checkbox to inspect tool calls, scrub`STATE_DELTA` patches in the**State** tab, or click**Copy as Playwright Mock** /**Copy as MSW Handler** .\n\n- \nNode.js 20+\n- \nnpm\n\n```\n# Install dependencies\nnpm install\n\n# Run unit tests (Vitest)\nnpm test\n\n# Run TypeScript typecheck\nnpm run typecheck\n\n# Build production extension into dist/\nnpm run build\n```\n\nAfter running `npm run build`, load the generated `dist/` directory via `chrome://extensions` → **Load unpacked**.\n\n```\nInspected Tab\n  └─▶ chrome.debugger (CDP Network events)\n        └─▶ CdpCapture (src/background/cdp-capture.ts)\n              └─▶ SseStreamDecoder (src/lib/sse.ts)\n                    └─▶ InspectorStore (src/background/store.ts)\n                          └─▶ chrome.runtime.Port (throttled deltas)\n                                └─▶ React DevTools Panel (src/panel/)\n```\n\n| Path | Responsibility | \n|---|---|\n| `src/assets/manifest.json` | Manifest V3 configuration and permissions ( `debugger` ,`storage` ) | \n| `src/devtools/` | Registers the `AG-UI` tab inside Chrome DevTools | \n| `src/background/sw.ts` | MV3 service worker managing panel ports and throttled state updates | \n| `src/background/cdp-capture.ts` | CDP network attachment, iframe auto-attach, and stream chunk decoding | \n| `src/background/store.ts` | Run grouping ( `runId` ), truncation detection, and`chrome.storage.session` persistence | \n| `src/lib/sse.ts` | Incremental SSE frame parser | \n| `src/lib/agui.ts` | AG-UI 1.0 event family mapping and structural diagnostics | \n| `src/lib/eventTree.ts` | Hierarchical event tree projection and roll-up duration calculator | \n| `src/lib/codegen.ts` | Playwright and MSW mock generator | \n| `src/shared/redaction.ts` | Header, query string, and secret key redaction | \n| `src/panel/` | React UI, virtualized event list, and RFC 6902 state inspector | \n\n- \nWebSocket and custom transport decoding\n- \nProtobuf wire format support\n- \nFull AG-UI JSON Schema validation\n- \nIndexedDB retention for cross-session trace history\n\nAll captured traffic stays strictly local within your browser's memory and `chrome.storage.session`. Sensitive authorization headers, tokens, and secret-matching keys are redacted before storage or export.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends", "canonical_source": "https://github.com/akshaypalekar15/ag-ui-inspector", "published_at": "2026-12-03 14:33:24+00:00", "updated_at": "2026-12-03 14:48:00.386612+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["AG-UI Inspector", "AG-UI 1.0", "Chrome DevTools", "Playwright", "MSW", "Chrome", "Microsoft Edge", "AG-UI Dojo"], "also_reported_by": [], "takeaway": "AG-UI Inspector attaches via chrome.debugger to capture AG-UI 1.0 SSE streams without SDK changes, replays STATE_DELTA patches from STATE_SNAPSHOT for state time-travel, and exports captured runs as Playwright page.route() or MSW http.post streaming mocks.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends", "markdown": "https://wpnews.pro/news/show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends.md", "text": "https://wpnews.pro/news/show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends.txt", "jsonld": "https://wpnews.pro/news/show-hn-ag-ui-an-open-protocol-for-connecting-ai-agents-to-front-ends.jsonld"}}