fylgia up
Hardware-aware local LLM detection (Ollama, LM Studio, llama-server) + cloud provider env scan, generating 0600 config & proxy token.
Your AI agent's sovereign companion — one Rust binary between every coding agent and your machine.
Stops coding agents from burning $100 in a runaway loop or leaking .env secrets — 60-second setup, zero infra. Drop-in loopback proxy for Anthropic /v1/messages, OpenAI /v1/chat/completions, and /v1/responses.
No Docker, no Node, no Python daemon required.
fylgia up
Hardware-aware local LLM detection (Ollama, LM Studio, llama-server) + cloud provider env scan, generating 0600 config & proxy token.
fylgia wire
Surveys installed coding agents and auto-wires up to 26 harnesses + local fylgia mcp-server with automatic .fylgia.bak backups.
fylgia report
Live spend ledger, tier downshifts, DLP redaction hits, and token savings across local, peer-local, cheap, and frontier models.
Real proxy headers, fail-closed 402 breakers, and local DLP/BM25 memory.
# 1. Coding agent sends `fylgia/auto` to loopback proxy (127.0.0.1:11435) $ curl -i http://127.0.0.1:11435/v1/chat/completions \ -H "Authorization: Bearer $FYLGIA_PROXY_API_KEY" \ -H "X-Fylgia-Session-Id: sess-edit-42" \ -d '{"model":"fylgia/auto","messages":[{"role":"user","content":"rename foo to bar in src/lib.rs"}]}' HTTP/1.1 200 OK X-Mycel-Tier: local X-Mycel-Model: qwen3:8b X-Mycel-Budget-State: healthy X-Fylgia-Phase: small_edit X-Fylgia-Continuity-Lock: none X-Fylgia-Escalated: false # 2. Verification-driven escalation on failed tool output (exit code != 0 / panic / test failure) # Tier ladder: Local -> PeerLocal -> Cheap -> Frontier (respecting warm-cache hysteresis) HTTP/1.1 200 OK X-Mycel-Tier: cheap X-Fylgia-Phase: debug X-Fylgia-Continuity-Lock: active_tool_loop X-Fylgia-Escalated: true
# Agent enters an identical-failure retry storm or hits 5-minute burn velocity limit. # Fylgia fails fast with HTTP 402 (never 429, so agents don't exponentially retry): HTTP/1.1 402 Payment Required { "error": "runaway_paused", "approval_id": "apr_01j9f8k2", "client": "claude-code", "reason": "runaway_velocity_usd_5m exceeded ($2.50)", "choices": ["approve_bump", "deny"] } # Resolve from any terminal (pending approvals reserve $0): $ fylgia approve-spend apr_01j9f8k2 bump --usd 5.0 $ fylgia approve-spend apr_01j9f8k2 cheap $ fylgia approve-spend apr_01j9f8k2 local $ fylgia approve-spend apr_01j9f8k2 deny
# Regex + Shannon entropy DLP scans outbound prompts before any upstream provider sees them: $ curl -i http://127.0.0.1:11435/v1/messages \ -d '{"model":"fylgia/frontier","messages":[{"role":"user","content":"STRIPE_SECRET_KEY=sk_live_51N..."}]}' HTTP/1.1 200 OK X-Mycel-Dlp-Hits: 1 # Upstream received reversible placeholder; raw secret never left loopback. # Local-first MCP memory (0600 JSONL + Okapi BM25, auto-redacted on write): $ fylgia memory search "bwrap sandbox" [global] Use bwrap on Linux (--unshare-net by default) score=4.82 $ fylgia mcp-server # local stdio MCP gateway (`fylgia-mcp`) wired by `fylgia wire`
Detected and configured by fylgia wire (proxy + MCP).
Your prompts, keys, and memory belong to your machines.
0600 local files: config, proxy.token, redacted JSONL audit ledger, and BM25 memory stay owner-only.x25519 + ChaCha20-Poly1305.enabled = false and relays = [] by default — zero network calls or metadata leaks unless configured.fylgia mesh revoke <device_id> removes a compromised device from trusted peers.fylgia export backup.enc packages memory, config, and keys under ChaCha20-Poly1305.fylgia nuke --confirm (with --dry-run preview) wipes local state cleanly.bwrap (fail-closed default), macOS Seatbelt, or opt-in rootless Podman/Docker.Something is already walking beside your agents in the dark.
In Old Norse folklore, every person walks with an unseen double — a fylgja. It slips into rooms moments before you arrive, stands watch at the threshold while you sleep, and carries the memory of where you have been. You almost never see it in daylight.
The sagas say a fylgja only reveals itself at the exact moment something is about to go terribly wrong — a warning in a dream, a shadow blocking the doorway, a cold hand pulling you back from the dark. Once bound to its host, it cannot be bought, rented, or turned against you.
That is what sits on 127.0.0.1:11435 at 3:00 a.m. Silent on every healthy turn. Watching every outbound payload before it crosses the wire. Stepping into the doorway with an HTTP 402 the instant an unattended loop starts bleeding your wallet, or swallowing a leaked .env secret before it ever leaves your machine.
◆ If you see your fylgia, it means something on the wire was about to cost you.