Patrick Diaz

Patrick Diaz · Piece 01

Vision

A self-hosted agent harness for my home intelligence center.

One chat in front, a supervisor that sends each message to the cheapest model that can handle it, read-only tools, one gateway for every key and budget, and evals before and after each change. Claude Code builds it, under guardrails I wrote.

As of 2026-11-12

  • 1.0Classifier accuracy, held-outn = 27 · as of 2026-11-04
  • 0 of 12Planted instructions followedas of 2026-11-04
  • −65 %Eval cost per case, prompt caching$0.040 → $0.014 · as of 2026-11-12

Schematic

commands: no model simple → cheap · complex → smart run + step id join the spend log TELEGRAM ADAPTER CONSOLE AGENT CORE CLAUDE WORKER TIER RUN RECORDS LITELLM GATEWAY MCP SERVERS EVAL HARNESS KNOWLEDGE CORE GUARDRAILS

All parts

  1. Surfaces

    1. Telegram adapter

      The chat I talk to Vision through. Each message goes to agent core; only the last 10 turns from the past 6 hours count as context.

    2. Console

      Private web console for chat and run traces: every step, tool call and cost of a run. Reachable only inside my private network.

  2. Core

    1. Agent core

      The supervisor behind the chat. Commands run with no model; a local classifier sends the rest to a cheap or a smart model.

    2. Claude worker tier

      A Claude Code worker on my subscription, only for my own messages. A filtering proxy lets it reach only the provider API and gateway tools.

    3. Run records

      Every piece of work is a run with steps, tokens and costs. Full traces stay 30 days for review, then are deleted unless I flag a run.

  3. Models and tools

    1. LiteLLM gateway

      One gateway for every model call: aliases, not model names; a key and 30-day budget per flow. Prompt caching cut eval cost per case by 65 %.

    2. MCP servers

      My own read-only servers for docs, notes, files and homelab state, reached only through the gateway with per-key tool lists.

    3. Knowledge core

      Search over my docs and notes behind the knowledge server. Its retrieval is measured as hit@5 in the eval harness.

    4. Eval harness

      Runs the production code on dev and held-out sets with its own key and budget. Code checks the metrics, not an LLM judge.

  4. Build side

    1. Guardrails

      Hooks that check every command Claude Code runs while it builds Vision, backed by a pre-push hook and a secret scan.