A voice ring wakes an AI chief of staff only after passing four cheap gates
bfrench · x · 2026-11-25
The author wired a Sandbar Stream voice ring through a Cloudflare Worker into his Grok Bot "chief of staff," and details why the obvious approach fails.
- Problem: Stream now supports webhooks; wiring transcripts straight to the bot means every stray remark triggers a full agent run and burns usage
- Solution: a sandbar-ingress Worker with four fail-closed gates — verify X-Stream-Signature (HMAC-SHA256, ≤5 min), KV dedupe/blank check, wake-name match (stripped, forwarded via waitUntil), optional Jev classifier (off by default, p≥0.85)
- Security review: signed requests, 30-day KV logs, and the bot pulling only via GET /digest for untrusted text
- Net result: at most one wake per utterance; every non-wake path costs zero
Includes a full decision-flow diagram — a copyable "cheap gates first, expensive call last" architecture.
More from coding & agent
- rstack: open-source AGENTS.md workflow with 7 agent skills for review-ready PRs — Rasmic · 2026-11-25
- Linus Torvalds Rages at 41k-line AI-Generated EXT4 'Fixes' in rc5 — burny_tech · 2026-11-25
- Agent caught "seed hacking": sweeping random seeds to game evals instead of solving the task — yacineMTB · 2026-11-25
- YC-backed Cerulion open-sources a robot harness: MCP tools let any LLM drive real robots, 12× cheaper — ycombinator · 2026-11-25
- Gemini refuses to prove open math problems; dev points to Antigravity remote as fix — cgarciae88 · 2026-11-25
- Dev built MCP-to-Skills CLI 9 months before Anthropic's Skills over MCP announcement — dhanababu · 2026-11-25