Adrian RomoAdrian Romo

independent system · Paused

Aegis — Self-Hosted Voice SRE Copilot

A realtime voice assistant for my homelab on one GPU: live read tools, one voice-confirmed action, and a measured price for keeping speech local

Overview

Context, approach, and outcome.

Problem

I wanted to ask my homelab questions out loud ("is anything wrong right now?", "how much video memory is free?") and get answers grounded in live state, with my voice staying on my own hardware unless I chose otherwise. That meant a realtime speech pipeline, a model that reports a failed check as a failure, and a real number for what self-hosting each speech stage costs.

My role

Solo project: design, implementation, deployment and measurement. First commit in late August 2026, then 102 merged pull requests through early November. Most commits (201 of 222) were co-authored with an AI coding agent.

Constraints

  • One RTX 3090, shared with image generation and other local models, so the LLM is warmed when a session opens instead of pinned in VRAM.
  • Speech must be able to stay entirely local. Hosted speech is a config switch, never a dependency.
  • Reachable only from my LAN or VPN, behind the reverse proxy's allowlist and single sign-on.
  • No shell and no SSH, ever. Every capability is a narrow, named, typed function.

Architecture

Pipecat over WebRTC in the browser, with Silero VAD and Smart Turn v3 deciding when a turn ends, and qwen3:14b on Ollama with reasoning switched off. One provider seam picks the vendor for each speech stage: faster-whisper and Kokoro served locally by speaches, or Deepgram and Cartesia hosted. Swapping is a config change, which is what made a clean per-stage cost measurement possible.

Answers come from read tools: container health, GPU memory, disk, host memory and CPU, a redacted log tail, and my homelab second brain's search and dependency graph. Retrieved text is fenced so it cannot impersonate the prompt around it, and arguments outside a tool's schema are dropped before they reach an adapter.

It is no longer purely read-only. Actions live in a registry where each entry names one verb and one target from an allowlist an operator wrote. Today that is a container restart with a single container on the allowlist, plus a few low-risk Home Assistant actions behind the same gate:

"restart comfyui"
  -> Aegis proposes it: say "confirm restart comfyui"
  -> the phrase must be in what the microphone heard from the operator
  -> at dispatch: switch, allowlist, STOP file and daily cap re-checked
  -> restart, then verify: newer start time, running, healthy,
     and still the same container after a 15-second stability window

Only an authenticated operator is offered the action. The daily cap (three by default) lives in a file, because a counter in memory is reset by exactly the event that makes a cap matter. Every outcome, refusals included, goes to the ops ledger, where "unknown" is a legal answer to whether anything changed.

Outcome

Deployed on the GPU workstation and running fully self-hosted. Feature work stopped at the end of September 2026; the latest change was a small graph-correctness fix in November.

Headline latency from a headless harness on 2026-08-28 (synthesized speech into the real pipeline, warm models, no browser or network), with the same local LLM in both rows:

Speech stackp50, no toolp50, one tool call
fully self-hosted0.853s (n=10)1.434s (n=12)
hosted (Deepgram + Cartesia)0.597s (n=9)1.072s (n=12)

Self-hosting costs 256ms on a turn without a tool, 233ms of it in speech recognition. Live use is much slower: over 87 browser turns from 14 sessions in early September, voice-to-voice was 2.695s at p50 and 7.180s at p95.

Its own validation failed it. A blind-scored validation on 2026-09-13 failed "the accessible conversational experience": naturalness 3/10, memory 2/10, visual design 8/10, and 7 to 8 seconds to first audio on the simple voice checks it sampled. A release-candidate audit two days later failed all eight milestone gates and named three fixes; those were made and re-verified live on 2026-09-16, and the further gaps that re-verification found were patched the same day. There is no full product audit on record after that. Both audits used synthesized audio and typed input, not a human microphone or a month of use.

One real restart was verified live on 2026-09-18. The hardened path (dispatch recheck, cap, STOP file, stability window) is covered by tests against mocks, and had not yet run a live action when it was written up.

What I'd do differently

  • Measure in the browser from week one. The headless numbers became the headline while live turns were over three times slower.
  • Mutate every instrument before trusting it. One differential came back byte-identical against a router I had broken on purpose.
  • Make conversation trustworthy before adding capability. The 13 September validation said not to expand actions yet. The first live restart came five days later, and two later reviews each found its receipt claiming more than the reading showed.

Lessons

What I'd carry forward.

Changing one provider at a time settled what two plausible arguments from architecture could not: keeping speech local cost 233ms in recognition and almost nothing in synthesis. And an instrument earns trust only after I have watched it fail on input I broke on purpose.

Stack

Tools and platforms.

PythonPipecatWebRTCSilero VADSmart Turn v3faster-whisperKokoroOllamaDeepgramCartesiaFastAPIReactPrometheusLangfuseDocker

Related writing

Notes from this project.

Talk shop

Want to discuss this kind of work?

If you're hiring for similar backend, AWS, voice, or integration work — or just want to compare notes on architecture — reach out directly.