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
All parts
Surfaces
- 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.
- Console
Private web console for chat and run traces: every step, tool call and cost of a run. Reachable only inside my private network.
- Telegram adapter
Core
- 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.
- 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.
- 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.
- Agent core
Models and tools
- 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 %.
- MCP servers
My own read-only servers for docs, notes, files and homelab state, reached only through the gateway with per-key tool lists.
- Knowledge core
Search over my docs and notes behind the knowledge server. Its retrieval is measured as hit@5 in the eval harness.
- 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.
- LiteLLM gateway
Build side
- Guardrails
Hooks that check every command Claude Code runs while it builds Vision, backed by a pre-push hook and a secret scan.
- Guardrails