Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

docs: make architecture diagram horizontal (LR lanes) and skimmable

shukieshahfc1fce36b69d
diff --git a/browser-extension/README.md b/browser-extension/README.md
index 1de36105..1be254ec 100644
--- a/browser-extension/README.md
+++ b/browser-extension/README.md
@@ -16,49 +16,49 @@ POSTs **OTLP GenAI logs** to the Beacon collector already listening on `http://1
which normalizes, redacts, rotates, and forwards them exactly like every other source.
```mermaid
-flowchart TB
- subgraph PAGE["Chat page — claude.ai / chatgpt.com"]
+flowchart LR
+ subgraph PAGE["Chat page · claude.ai / chatgpt.com"]
direction TB
- FETCH["site's streamed SSE response (window.fetch)"]
- MAIN["interceptor.js · MAIN world<br/>monkeypatch fetch → response.clone() tee"]
- ISO["content.js · ISOLATED world<br/>validate + relay"]
- FETCH -->|clone stream| MAIN
- MAIN -->|window.postMessage| ISO
+ MAIN["interceptor.js<br/>MAIN world · tee fetch SSE"]
+ ISO["content.js<br/>ISOLATED world · relay"]
+ MAIN -->|postMessage| ISO
end
- subgraph SW["Extension service worker (background)"]
+ subgraph SW["Extension service worker"]
direction TB
- ASM["assembler.ts<br/>accumulate per (tab, request)"]
- ADP["per-site adapter · claude.ts / chatgpt.ts<br/>parse SSE → ChatTurn"]
- NRM["normalize.ts — pure, site-agnostic<br/>ChatTurn → OTLP GenAI logs<br/>prompt.submitted · agent.response.completed · tool.invoked"]
- DLV["delivery.ts<br/>durable queue (chrome.storage) + retry (chrome.alarms)"]
+ ASM["assembler.ts<br/>accumulate per tab/request"]
+ ADP["adapters<br/>claude.ts · chatgpt.ts<br/>SSE → ChatTurn"]
+ NRM["normalize.ts · pure<br/>ChatTurn → OTLP"]
+ DLV["delivery.ts<br/>queue + retry"]
ASM --> ADP --> NRM --> DLV
end
- subgraph BEACON["Local Beacon agent (already running)"]
+ subgraph BEACON["Local Beacon agent"]
direction TB
- COL["beacon-otelcol<br/>OTLP receiver · 127.0.0.1:4318"]
- JSONL["runtime.jsonl<br/>normalize · redact · rotate"]
- VEC["Vector forwarders"]
- COL --> JSONL --> VEC
+ COL["beacon-otelcol<br/>OTLP · 127.0.0.1:4318"]
+ JSONL["runtime.jsonl"]
+ COL --> JSONL
end
subgraph DOWN["Downstream"]
direction TB
+ VEC["Vector"]
OBJ["S3 / GCS"]
- DASH["ClickHouse → telemetry dashboard"]
- OBJ --> DASH
+ DASH["ClickHouse → dashboard"]
+ VEC --> OBJ --> DASH
end
- ISO -->|"chrome.runtime.sendMessage (BEACON_RAW)"| ASM
- DLV -->|"OTLP/HTTP POST /v1/logs"| COL
- VEC --> OBJ
+ ISO -->|BEACON_RAW| ASM
+ DLV -->|OTLP POST| COL
+ JSONL --> VEC
```
**Two capture surfaces per page:** the **MAIN-world** `interceptor.js` runs in the page's own JS
context so it can tee `window.fetch`'s streamed SSE via `response.clone()`; the **ISOLATED-world**
`content.js` holds the privileged `chrome.runtime` channel to the service worker. Everything from
`ChatTurn` onward is **site-agnostic** — only the per-site adapters know each site's wire format.
+Each captured turn emits one `prompt.submitted` + one `agent.response.completed` OTLP log (plus a
+`tool.invoked` per tool call).
## Setup