# Show HN: AG-UI, An open protocol for connecting AI agents to front ends

> Source: <https://github.com/akshaypalekar15/ag-ui-inspector>
> Published: 2026-12-03 14:33:24+00:00

**Key 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.

A Manifest V3 Chrome DevTools extension for capturing, decoding, and debugging **AG-UI 1.0** protocol streams in real time.

Instead 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.

- 
**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.
- 
**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.
- 
**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.
- 
**1-Click Test Codegen:** Export any captured run directly into a copy-pasteable**Playwright `page.route()`** mock or**MSW (` http.post`)** streaming handler.
- 
**Protocol Diagnostics:** Validates AG-UI 1.0 lifecycle rules, flags truncated streams or malformed frames, and inspects redacted`RunAgentInput` payloads.
- 
**Built-In Redaction:** Automatically scrubs sensitive headers, query parameters, and secret/token/password keys before storing or exporting traces.
- 
**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.

You can load the prebuilt extension directly into Chrome or Edge in ~30 seconds:

1. 
Download the latest `ag-ui-inspector-v*.zip` from the[**Releases**](https://github.com/akshaypalekar15/ag-ui-inspector/releases/latest) page.
2. 
Unzip the archive to a local folder (verify `manifest.json` is directly inside the extracted folder).
3. 
Open `chrome://extensions` in your browser.
4. 
Toggle **Developer mode** ON in the top-right corner.
5. 
Click **Load unpacked** and select the extracted folder.

1. 
Open any application running AG-UI (or test immediately on the [AG-UI Dojo](https://dojo.ag-ui.com/) ).
2. 
Open Chrome DevTools ( `F12` or`Cmd+Option+I` /`Ctrl+Shift+I` ) and select the**AG-UI** panel tab.
3. 
Click **Attach** to begin capturing live streams (or click**Load Sample Run** from the empty state to explore offline).
4. 
Use 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** .

- 
Node.js 20+
- 
npm

```
# Install dependencies
npm install

# Run unit tests (Vitest)
npm test

# Run TypeScript typecheck
npm run typecheck

# Build production extension into dist/
npm run build
```

After running `npm run build`, load the generated `dist/` directory via `chrome://extensions` → **Load unpacked**.

```
Inspected Tab
  └─▶ chrome.debugger (CDP Network events)
        └─▶ CdpCapture (src/background/cdp-capture.ts)
              └─▶ SseStreamDecoder (src/lib/sse.ts)
                    └─▶ InspectorStore (src/background/store.ts)
                          └─▶ chrome.runtime.Port (throttled deltas)
                                └─▶ React DevTools Panel (src/panel/)
```

| Path | Responsibility | 
|---|---|
| `src/assets/manifest.json` | Manifest V3 configuration and permissions ( `debugger` ,`storage` ) | 
| `src/devtools/` | Registers the `AG-UI` tab inside Chrome DevTools | 
| `src/background/sw.ts` | MV3 service worker managing panel ports and throttled state updates | 
| `src/background/cdp-capture.ts` | CDP network attachment, iframe auto-attach, and stream chunk decoding | 
| `src/background/store.ts` | Run grouping ( `runId` ), truncation detection, and`chrome.storage.session` persistence | 
| `src/lib/sse.ts` | Incremental SSE frame parser | 
| `src/lib/agui.ts` | AG-UI 1.0 event family mapping and structural diagnostics | 
| `src/lib/eventTree.ts` | Hierarchical event tree projection and roll-up duration calculator | 
| `src/lib/codegen.ts` | Playwright and MSW mock generator | 
| `src/shared/redaction.ts` | Header, query string, and secret key redaction | 
| `src/panel/` | React UI, virtualized event list, and RFC 6902 state inspector | 

- 
WebSocket and custom transport decoding
- 
Protobuf wire format support
- 
Full AG-UI JSON Schema validation
- 
IndexedDB retention for cross-session trace history

All 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.

MIT
