Even Realities Agent OS
An agent-agnostic OS for Even Realities G2 smart glasses: push-to-talk voice in, paginated HUD frames out, four processes across three trust levels. The brain is pluggable behind one provider interface — a ~900-line self-built agent that holds the only copy of the LLM key, or an adapter to an uncontrolled third-party OpenClaw gateway — and the same display is exposed as a hardware MCP surface, so any vendor model (Claude Code included) can render to the glasses you are wearing.

A real run on the 576×288 4-bit canvas, not a mockup: mid-turn, the status line shows the weather tool running while the user’s own transcript sits underneath. A clean badge — no "?" — means the peer on the other end is the production agent.
Details
Voice Loop & Hardware Bridge
Engineered the full wearable loop: the plugin runs as a dumb terminal with watchdogs inside the official Even App WebView; one WSS carries JSON render frames down and 16kHz s16le PCM up, push-to-talk only, under revocable short-lived device JWTs — credentials never leave the server. Dual-model ASR (faster-whisper tiny for live partials, base for the final that routing trusts) with domain hotwords, held to CER 0.0085 against a self-built ten-clip ground-truth set. A lock-contention hunt took release-to-transcript from 7.6s to 0.4s by decomposing wait from compute (9.5s lock wait vs 0.35s actual decode); measured whole turns now run 6.1s with no tool and 11.5s with one, because the budget is counted in model round-trips, not in tool latency.
Pixel-Exact HUD Typography
Rebuilt the typography engine against ground truth instead of character counts: layout in real pixels on the 576×288 4-bit green canvas (576×216 body, a fixed 27px line, 8 lines × 3 pages — an earlier five-line assumption wasted 37% of every page). Glyph advances are checked against the official pretext metrics library used as an external oracle — 17,025 code points and 820 wrap cases, break position by break position, zero divergence — and the real ceiling turned out to be 999 UTF-8 bytes rather than the 1,000 characters the vendor doc implies. A measured glyph table covers the rest: 10 of the 13 glyphs the HUD originally used do not exist on G2 and would have been dropped silently, so dropped glyphs are now reported instead of vanishing on-device.
Hardware MCP Surface & Frame Lease
Exposed the glasses as a standard MCP server in its own process (8 tools, 3 resources, 1 prompt) so any vendor model can write the HUD — one "claude mcp add" away. That process is the one that holds nothing: no mic, no ASR, no device credentials, and it can do exactly what nine control-plane routes allow. textkit_paginate needs no device at all — the layout engine as a pure function, which is the cheapest way to prove a foreign model really reached your code. The screen has one owner at a time: writes go through a frame lease, a losing client gets a structured LEASE_HELD with the current holder and a TTL instead of last-write-wins, and a human pressing push-to-talk preempts unconditionally. The four-process end-to-end suite (real MCP client → real MCP process → real gateway → real device WebSocket) asserts frames actually leave the device socket — 27/27.
Self-Built Agent, Permissions by Architecture
A ~900-line handwritten agent loop (direct DeepSeek, loopback-only, sole holder of the LLM key) carrying 12 tools and 7 skills behind four gates: the capability enum is READ|WRITE with no exec tier at all, a regex router fixes the skill and its tool whitelist before the model ever sees the prompt, WRITE tools are bound to a concrete file at import time so no argument the model supplies can reach another path, and every call and every refusal appends one JSON line to an audit log. That ordering is why prompt injection is structurally uninteresting here — the injected sentence arrives inside the user turn, after routing has already frozen the toolset. One rule earned the hard way: routing judges intent, the skill judges feasibility. While routing tried to judge feasibility, the agent answered "I can't set reminders yet" to requests it could in fact serve — claiming you cannot do something you can do is the same class of failure as making something up. The provider interface exists because two implementations exist now, not as future-proofing, and the split is visible in who owns the small-screen contract: the third-party backend is uncontrolled, so the gateway has to inject the style header on its behalf, while the self-built agent carries that contract in its own system prompt — with markdown stripped at the layout layer either way, as a second line of defense. Its protocol also adds three things the third-party v3 lacks that glasses actually need: a tool-state event (without it the HUD sits on "thinking 12s" with no idea a tool is running), a per-turn latency budget (on a HUD, slow is broken — over budget it degrades to a wrap-up instead of waiting), and provenance returned at handshake. Real-agent end-to-end: 23/23 against live DeepSeek, asserting the tool actually ran and the audit trail actually landed.
Verification & Honest Screens
590 gateway pytest + 82 plugin vitest + 32/32 voice end-to-end + 27/27 MCP four-process + 23/23 real-agent end-to-end, wired into CI with a deliberate tripwire: if the typography oracle is skipped, the build fails instead of passing green without its key claim. Two conventions make those numbers mean something — every new test is mutation-checked (break the code on purpose; if it still passes, it was decoration), and a test that measures the fixture instead of the code is treated as worse than no test, after one regression suite passed only because it cancelled its tasks before they ever started. Nothing in the demo is mocked: real microphone, real faster-whisper, real DeepSeek, real Open-Meteo and Frankfurter calls — the only substituted input in the repository is the demo audio. And the screen is not allowed to lie: a non-production peer wears a "?" badge, an answer cut short by its budget ends in "… (cut off)" rather than a done mark, and telemetry that never arrived returns null instead of a plausible battery number.


















