Documentation Index
Fetch the complete documentation index at: https://patter-06b046ce-feat-observability-otel-attrs-0-6-1.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Dashboard
Patter ships a built-in web dashboard for monitoring calls in real time. It tracks live calls, latency waterfalls, and per-component cost breakdowns, and is embedded in both the Python and TypeScript SDKs from a single source of truth.Architecture
The dashboard UI is a Vite + React 18 + TypeScript single-page app living at the repo root indashboard-app/. It is bundled by vite-plugin-singlefile into one self-contained dist/index.html (~190 KB, JS + CSS inlined) and copied into both SDKs as ui.html.
- Python:
importlib.resources.files("getpatter.dashboard").joinpath("ui.html").read_text()— seelibraries/python/getpatter/dashboard/ui.py. - TypeScript:
readFileSync(join(__dirname, "ui.html"), "utf8")— seelibraries/typescript/src/dashboard/ui.ts.
GET / by the embedded FastAPI / Express app. End users never touch Node — ui.html is checked into both packages so pip install getpatter and npm install getpatter work out of the box.
Local development
The dashboard talks to a running SDK server over the existing/api/dashboard/* REST + SSE API. The Vite dev server proxies /api to 127.0.0.1:8000 so you can iterate on the UI against a real backend.
npm run dev proxies /api/* and /sse/* to http://127.0.0.1:8000, so the SPA renders against whatever the running SDK reports.
Build and sync into the SDKs
npm run build && npm run sync is the canonical pre-publish step:
scripts/sync.mjs copies the bundled file to:
libraries/python/getpatter/dashboard/ui.html(shipped via[tool.setuptools.package-data])libraries/typescript/src/dashboard/ui.html(copied todist/dashboard/ui.htmlbytsup)
ui.html will be overwritten — always edit dashboard-app/src/.
Embedded dashboard
When runningserve(), the dashboard is enabled by default at the root URL:
Standalone dashboard
Run the dashboard as a separate process — useful when using the SDK as a tool (e.g. from LangGraph or Claude Code).Features
- Top metrics row — Total Calls, Total Cost, Avg Duration, Avg Latency. Numerics in JetBrains Mono so columns align.
- Call table — every completed call with cost, latency, turn count, provider, voice mode.
- Live-call right rail — caller/callee, streaming transcript, per-call latency waterfall (STT, LLM first-token, TTS first-byte, total turn), and cost breakdown updating as the call progresses.
- Call detail — click any historical call for the full transcript, averaged + P95 latency waterfall, and cost breakdown.
- Real-time updates — Server-Sent Events on
/api/dashboard/events; no polling. - Design system — peach accent, dot-grid surfaces, JetBrains Mono numerics, matching the rest of the Patter brand.
API endpoints
The SPA is a thin client over a stable REST + SSE API — useful for direct integrations.| Endpoint | Description |
|---|---|
GET / | Dashboard web UI (the bundled ui.html). |
GET /api/dashboard/calls | List calls (paginated). |
GET /api/dashboard/calls/:id | Single call detail. |
GET /api/dashboard/active | Active calls. |
GET /api/dashboard/aggregates | Aggregate stats. |
GET /api/dashboard/events | SSE event stream. |
GET /api/dashboard/export/calls | Export as CSV (?format=csv) or JSON. |

