Skip to content

feat: add agent-events-inspector demo - #25

Closed
luke-speechify wants to merge 2 commits into
mainfrom
feat/agent-events-inspector
Closed

feat: add agent-events-inspector demo#25
luke-speechify wants to merge 2 commits into
mainfrom
feat/agent-events-inspector

Conversation

@luke-speechify

Copy link
Copy Markdown
Contributor

Pairs with the upcoming speechify.ai post "Realtime agent events: debugging a live voice agent call."

What this demo is

A tiny debug timeline for a Speechify Voice Agent call. Two modes:

  • Replay a bundled sample realtime event stream (app/sample-events.ts) against a scrubber at 0.5×–4× — session start, user transcripts, agent replies, tool calls/results, session end, colour-coded with expandable JSON.
  • Inspect a live conversation by conv_… id — the server proxies GET /v1/agents/conversations/{id} on the Voice Agents API and renders what comes back.

The workspace key stays server-side in a single route handler (app/api/conversation/route.ts).

Hosting + abuse protection

  • Registered as a Vercel Service under /agent-events-inspector (vercel.json + pnpm-workspace.yaml), basePath set, README table regenerated via pnpm generate.
  • Gates /api/conversation with the shared Cloudflare Turnstile helper (app/lib/turnstile.ts, verbatim). Fail-opens when TURNSTILE_SECRET_KEY is unset.

Verification

  • pnpm --filter agent-events-inspector build
  • Voice Agents API reachable with the workspace key (/v1/agents/conversations returns the list envelope).

⚠️ Reviewer note

This one rides on a realtime-events capability that may not be fully shipped yet. The confirmed conversation fields (id, agent_id, status, started_at, ended_at, duration_ms) match what voice-agent-showcase reads. The per-event stream schema in sample-events.ts is illustrative — the inspector renders whichever event/transcript array a live conversation returns, and the README says so. Confirm the live event field names against the docs before the blog post commits to them.

Part of a batch getting the speechify.ai demo backlog ahead of schedule. Blog post is written separately.

A debug timeline for Voice Agent calls: replay a sample realtime event
stream, or inspect a live conversation by id via the Voice Agents API.
Hosted under /agent-events-inspector, gated with the shared Turnstile
helper. The workspace key stays server-side in one route handler.
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
speechify-api-demos Ready Ready Preview Aug 21, 2026 12:16am

Request Review

@luke-speechify

Copy link
Copy Markdown
Contributor Author

Closing in favour of #31. The 'realtime agent events' feature this demo was built around couldn't be verified against the API or docs (no live event stream/schema exists that I could find). Rather than ship a demo + changelog for something unconfirmed, DRG-381 pivots to a real, verified capability: realtime streaming TTS with word timestamps and dual highlighting — see #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant