AIFeed

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

Original text(via HN AI)

AG-UI Inspector

题图
题图

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.

Features

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

Quick Install (Unpacked — No Build Required)

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

  • Download the latest ag-ui-inspector-v*.zip from the Releases page.
  • Unzip the archive to a local folder (verify manifest.json is directly inside the extracted folder).
  • Open chrome://extensions in your browser.
  • Toggle Developer mode ON in the top-right corner.
  • Click Load unpacked and select the extracted folder.

Usage

  • Open any application running AG-UI (or test immediately on the AG-UI Dojo).
  • Open Chrome DevTools (F12 or Cmd+Option+I / Ctrl+Shift+I) and select the AG-UI panel tab.
  • Click Attach to begin capturing live streams (or click Load Sample Run from the empty state to explore offline).
  • 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.

Local Development

Prerequisites

Setup & Build


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

Project Architecture


        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/)
      
PathResponsibility
src/assets/manifest.jsonManifest V3 configuration and permissions ( debugger , storage )
src/devtools/Registers the AG-UI tab inside Chrome DevTools
src/background/sw.tsMV3 service worker managing panel ports and throttled state updates
src/background/cdp-capture.tsCDP network attachment, iframe auto-attach, and stream chunk decoding
src/background/store.tsRun grouping ( runId ), truncation detection, and chrome.storage.session persistence
src/lib/sse.tsIncremental SSE frame parser
src/lib/agui.tsAG-UI 1.0 event family mapping and structural diagnostics
src/lib/eventTree.tsHierarchical event tree projection and roll-up duration calculator
src/lib/codegen.tsPlaywright and MSW mock generator
src/shared/redaction.tsHeader, query string, and secret key redaction
src/panel/React UI, virtualized event list, and RFC 6902 state inspector

Roadmap

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

Privacy & Security

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.

License

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗