Open to AI Systems & Agent Infrastructure Roles · Independent R&D Lab · Los Angeles, CA
Kevin Ruschman

Kevin Ruschman

AI Infrastructure Engineer | Agent Systems | Reliability & Verification

I build the infrastructure that makes AI coding agents reliable. My open-source work focuses on persistent agent memory, deterministic code verification, and crash-recoverable sandboxed execution environments: maintaining architectural context across sessions, catching recurring defect classes in under 1ms, and controlling AI-generated file changes. Deterministic gates do not guarantee that a model's plan is semantically right; they bound blast radius and make failures recoverable.

Lab Provenance & External Validation: Independent engineering research and open-source development (8/8 Official MCP Registry dev.krusch/* servers · 8/8 AddonAudit Gold 100/100 · 9 npm packages / 4,890/mo). Projects and benchmarks are developed and tested in my own lab unless otherwise indicated, paired with maintainer-reviewed PRs merged into external Rust, TypeScript, and Python codebases (33 merged PRs) →.

Target Engineering Roles: AI Infrastructure Engineer · Agent Systems Engineer · AI Reliability & Evaluation Engineer · Developer Infrastructure Engineer (AI Agents). Open to individual-contributor engineering roles, including senior scope depending on team needs and responsibilities (Los Angeles, CA · Hybrid · Remote).

Three flagship projects, one headline result each (all self-run in my lab; benchmark evidence & status →):

  • krusch-context-mcp (agent memory): 90.26% accuracy and 95.77% evidence recall on the public ACL 2024 Snap LoCoMo benchmark (1,540 questions), with $0 LLM cost for memory ingestion.
  • @krusch/toolkit (code verification): 16 deterministic static/AST detectors that flag known security and boilerplate defects in AI-written code in under 1ms, without another LLM.
  • krusch-coding-harness (safe execution): a journaled, crash-recoverable multi-file apply protocol (PostgreSQL write-ahead intent + POSIX atomic per-file replacement); 118/118 tests pass, including a SIGKILL mid-apply recovery test.

Core Engineering Competencies: Software Architecture & Systems Engineering · Distributed & Crash-Recoverable State (PostgreSQL, SQLite WAL) · AI Agent Orchestration & MCP · Application & Sandbox Security (Bubblewrap, SSRF/HMAC/AST) · Automated Testing & Empirical Verification · Inference & Latency Optimization · Open-Source Collaboration (Rust, TypeScript, Python).

Core Open-Source Infrastructure: Agent Memory, Code Verification & Crash-Recoverable Execution

Three complementary open-source substrates addressing the primary reliability failure modes of autonomous coding agents: krusch-context-mcp governs the reliability of an agent's persistent memory and architectural invariants, while @krusch/toolkit and krusch-coding-harness govern the reliability and safety of the code and side effects it produces.

SUBSTRATE 01 · PERSISTENT WORKING MEMORY & INVARIANT LINEAGE v2.0.3 · 83★ GitHub · 6 Forks · 982/mo npm · 155/155 Tests

krusch-context-mcp: Persistent Agent Memory & SHA-256 Drift-Guarded Invariants

Problem:
Long-horizon coding agents lose architectural invariants across sessions, retrieve stale or contradictory context, or burn LLM tokens on lossy summarization.
Architecture:
Zero-LLM local indexing combining SQLite full-text search, local 1024d vector embeddings, Reciprocal Rank Fusion, explicit decision superseding, and SHA-256 line-span hashes that detect when referenced code lines drift.
Implementation:
Node.js 22 node:sqlite WAL (0o444 read-only benchmark stores, optional PostgreSQL 16 + pgvector backend) exposing 5 canonical MCP verbs (retrieve, remember, revise, nudge, health in ~950 o200k_base schema tokens).
Verification:
155/155 automated Node tests + SHA-256 zero-leakage verifiers (confirming zero ground-truth answers or QA pairs enter the read-only conversation store) + deterministic T=0 evaluation judges.
Results:
90.26% accuracy & 95.77% evidence recall across 1,540 ACL 2024 Snap LoCoMo probes at $0.00 ingest; 81.50% @ $1.35 on model-matched GPT 5.6 Luna across 600 DolphinBench tasks (71.1x cheaper than Mem0 on the same model; 91.17% uploaded submission UUID c047b063 queued; full status ledger →).
Limitations:
When simpler suffices: single-machine workflows run on zero-Docker built-in node:sqlite WAL (npx krusch-context-mcp init); the PostgreSQL 16 adapter is opt-in only for shared multi-worker state. Zero-LLM indexing misses 1.67% (10/600) of tasks requiring implicit multi-turn synthesis with zero lexical or vector overlap.
SUBSTRATE 02 · STATIC CODE VERIFICATION & RUNTIME MODULES v1.8.1 JS/TS · v1.6.0 Python · 40 Modules · 16 Static/AST Detectors

@krusch/toolkit & krusch_toolkit: Pre-Audited Runtime Modules & Sub-Millisecond Static/AST Security Checks

Problem:
Coding agents repeatedly generate subtly broken boilerplate: DNS-rebinding SSRF regexes, non-constant-time webhook checks, unclamped ORM pagination, hardcoded JWT fallbacks, and un-aborted fetches.
Architecture:
Pre-audited runtime "Lego bricks" (40 modules, 65+ .d.ts subpaths, 7 blueprints, Wayland/CDP @krusch/toolkit/easi browser client, & Continual RSI SIM memory) paired with an Ed25519-sealed multi-agent brick-exchange, 4-axis HydraDB ontology, 2-hop AST fan-out planner, and a deterministic <1ms static & structural auditBoilerplateText Slop-Breaker gate (16 rules), using zero-cost static analysis instead of slow, probabilistic LLM linting.
Implementation:
Node 22 ESM & Python 3.12 libraries providing connect-time DNS-pinned safeFetch, timingSafeEqual HMAC verification, 409/422 idempotency locks, SHA-256 hash-chained audit logs, RBAC/IDOR guards, and <15µs (<25µs ceiling) pure-CPU Stage-0 routing gates prior to model inference.
Verification:
204/204 Node tests + 201/201 pytest tests + 0/256 release-hygiene checks + live third-party OSS validation on OWASP/NodeGoat, node-express-realworld-example-app, and stripe-samples/accept-a-payment.
Results:
Catches real SSRF, auth-secret fallback, unclamped pagination, and unsafe YAML/webhook anti-patterns in <1ms at $0.00 compute cost; paired on-demand MCP tool loading (krusch-stack v1.3) cuts upfront tool-schema bytes -68.5% (+6.40 pp BFCL v3 accuracy).
Limitations:
Structural/AST rules target deterministic vulnerability and boilerplate classes (16 rules), not arbitrary domain-logic bugs; dynamic eval or cross-service taint requires sandboxed runtime tests and human or multi-model code review.
SUBSTRATE 03 · SANDBOXED STAGING & CRASH-RECOVERABLE EXECUTION v0.3 · 118/118 + 21/21 Tests · Crash-Recoverable Apply Journal

krusch-coding-harness & krusch-grounded-harness: Sandboxed Test Gates & Write-Ahead Apply Journals

Problem:
Unconstrained coding agents overwrite dirty working trees, spin in duplicate failing tool calls, execute prompt-injected shell commands, or leave partial file writes on mid-commit crash.
Architecture:
Import-frozen Object.freeze policy floors + network-disabled Bubblewrap (bwrap) sandboxes + <150ms Turn-0 workspace grounding + PostgreSQL 16 write-ahead apply journaling paired with pre-commit SHA-256 file-drift guards, POSIX atomic renameSync/fsync replacement, and startup crash reconciliation.
Implementation:
Explicit state machine (PENDING → VERIFYING → APPROVED → APPLYING → APPLIED / RECOVERED) with mid-apply crash-injection testing (SIGKILL after first rename followed by cold-process recoverInFlightApplies()), duplicate tool-call memoization, and verify-on-stop output gates.
Verification:
118/118 krusch-coding-harness tests (including interrupted-apply crash recovery & reconciliation) + 21/21 krusch-grounded-harness tests + 95/95 krusch-stack v1.3.1 tests + 1,046 ETH SpyLab AgentDojo security episodes + 225 Aider Polyglot exercises.
Results:
0/1,046 successful prompt-injection attacks on AgentDojo (a benchmark-specific finding under active sandbox and policy defenses, not prompt-injection immunity); 51.56% on Aider Polyglot up from 19.56% on the same open-weights model (driven by isolated test execution, compiler/test error feedback, and bounded repair retries fixing 72 failed tasks); <32ms local journal + swap overhead; and -95.2% (42 → 2) duplicate MCP calls.
Limitations:
When simpler suffices: for a single interactive developer session, an isolated git worktree, staged diff, and sandboxed test run (the zero-Docker SQLite default in krusch-stack) achieves practical safety with less operational surface; PostgreSQL write-ahead journaling targets unattended background daemons and multi-worker queues where crash recovery and durable audit state justify a database. Terminology: "2PC" is this project's name for a journaled, crash-recoverable multi-file apply protocol (PostgreSQL write-ahead intent + POSIX atomic per-file replacement), not classic distributed two-phase commit with transactional participants. Each file swap is atomic, but a multi-file batch is not atomically visible: another process can observe a partly-applied batch until it completes or recovery rolls it back. PostgreSQL ACID does not natively span POSIX filesystems; an uncoordinated external OS process mutating the same file in the sub-millisecond window between the SHA-256 pre-check and renameSync can still race without container/worktree isolation.
Recorded live execution (20 s): real krusch-coding-harness against PostgreSQL 16 + Bubblewrap (bwrap --unshare-net): (1) stages a flawed AI patch without touching disk, (2) fails isolated sandbox tests and rejects the diff (status=REJECTED), (3) stages and sandbox-verifies the repaired 2-file fix, (4) kills applyDiffBatch() mid-apply with SIGKILL and recovers the torn state via cold-process recoverInFlightApplies(), and (5) cleanly applies both files (status=APPLIED). Source: scripts/demo-full-harness-loop.mjs · raw output · 15 s SIGKILL-only clip.
Interactive 4-Step Architecture Trace & 4 Narrated 1080p Walkthroughs (Click to Expand)

Interactive Trace: Persistent Memory, Static Gates & Crash-Recoverable 2PC

Step through a multi-session task to inspect how krusch-context-mcp, @krusch/toolkit, and krusch-coding-harness block stale line drift, catch SSRF boilerplate in <1ms, and recover cleanly from a mid-commit crash. Illustrative replay: function, table, and outcome names match the source; the recording above is the real run.

krusch-context-mcp v2.0.3 · node:sqlite WAL VALID · SHA-256 PINNED

Session 1 records an architectural invariant anchored to exact file coordinates (src/public/assets/layman-mode.js#L21) with a SHA-256 line-span hash at $0.00 zero-LLM cost.

Agent Action / MCP Call
krusch_context_remember({
  category: "invariant",
  content: "Keep STORAGE_KEY pinned at line 21",
  provenance: { file: "src/public/assets/layman-mode.js", start_line: 21 }
})
Deterministic Gate Output
{
  "ok": true,
  "id": 152,
  "anchor": "layman-mode.js#L21",
  "sha256": "a4f9c2e8...81c2",
  "status": "VALID",
  "ingest_cost_usd": 0
}

Watch the Flagship Open-Source Walkthroughs

Frame-accurate 1080p walkthroughs covering persistent working memory, pre-audited runtime Golden Bricks, the unified 10-pillar coding-agent stack, and epistemic framing & counterfactual security (zero video bytes load until clicked).

01 · KRUSCH-CONTEXT-MCP01:31 · 1080P

5-Verb Agent Memory & SHA-256 Span Provenance

GitHub →  ·  Direct MP4
02 · @KRUSCH/TOOLKIT02:26 · 1080P

The Golden Bricks & 16 <1ms Static/AST Guards

GitHub →  ·  Direct MP4
03 · KRUSCH-STACK V1.301:40 · 1080P

Unified 10-Pillar, 39-Tool Stack & Harnesses

GitHub →  ·  Direct MP4
04 · HERMES PARALLAX V0.102:05 · 1080P

6-Pole Epistemic Triangulation & Blind AST Counterfactuals

GitHub →  ·  Direct MP4

Collaborating in External Codebases: Maintainer-Reviewed Merged PRs

Building a self-directed R&D lab is different from modifying someone else's codebase under external code review. While my own repositories are still early in community adoption (83★ on krusch-context-mcp), here are pull requests where I diagnosed bugs, followed upstream conventions, and passed maintainer review across independent Rust, TypeScript, and Python projects:

MERGED · 9 UPSTREAM PRS

hydra-db/selfgraph

Rust & TypeScript temporal graph engine: schema-lineage subtype expansion (#157), endpoint canonicalization (#215), entity-resolution case folding (#180), epochMicros contradiction ordering (#167), and 5 additional merged fixes (all 9 PRs →).

MERGED · MAIN @ 844E93B

RouteWorks/RouterArena

Multi-tier LLM routing benchmark: maintainer @yl231 audited all 8,400 live OpenRouter predictions and github-actions[bot] CI Run #780 (0.7263 score, 0 abnormal) before merging PR #169 into main.

MERGED · 8 UPSTREAM PRS

julianosig/easi.run

Sandboxed browser infrastructure in Rust: isolated Chromium contenteditable focus ordering (Issue #2) and merged 8 Wayland display, CDP, and session-cleanup fixes (#3, #4, #5, #7, #8, #9, #10, #11; all 8 PRs →).

MERGED · CATALOG & MCP SPECS

NousResearch/hermes-agent

Nous Research open-source agent runtime: passed 15/15 catalog validation and plugin_guard static checks to merge Hermes Parallax (PR #153023), plus 5 merged MCP trust-binding PRs in hol-guard and open HF Space harness-lens#21.

Time-Boxed External Engineering Sprints (Shipping Against Third-Party SDKs & Deadlines):
  • HydraDB Hackathon (Nov 2026) → HydraScope (Live App · Architecture Write-Up): Built a self-hosted hydradb:0.4.0 OpenCypher + @hydradb/selfgraph agent context layer (compressing 64 MCP tool schemas into 721 prompt tokens, -94.2%); dogfooding it against real ontologies surfaced and produced the 9 merged Rust & TypeScript PRs in hydra-db/selfgraph above.
  • EVOLVE: 8090 AI Hackathon (Redwood City, In-Person, Nov 2026) → DEADBOLT (Live Audit Desk · Architecture Paper): Shipped a 4-stage Software Factory governance & 2-hop WebAssembly Tree-sitter blast-radius gate under a 20-hour code freeze integrating 8090's Work Order APIs and HydraDB v0.4.0, now operating a live multi-GPU Public Audit Desk and quarantined Rule-of-3 Golden Brick Draft PR pipeline on Vercel Board.

From Physical Operations & Field Diagnostics to Deterministic Agent Infrastructure

Before focusing full-time on AI infrastructure in late 2025, I spent twelve years (2013–2025) working in physical environments where symptoms rarely match root causes and mistakes carry immediate operational cost: executing NEC-compliant residential electrical remodels (panel upgrades, kitchen/bath, recording studio) and festival generator/stage wiring across New England (Atomic Audio & Visual, North Beast, MASS MoCA) out of Jamaica, Vermont (2020–2025); mentoring youth mechanics on the Mobile Bike Repair team at the Wisconsin Bike Fed in Milwaukee (2019–2020); and owning and operating Local Coffee in downtown Aspen after helping open the Gorsuch Ski Café at the base of Ajax Mountain and Venue in downtown Fairbanks, Alaska (2013–2019, building on Troop 883 Eagle Scout leadership leading a 9-person, 100+ hour civic project in La Habra and cycling the length of Mexico from San Diego to Chiapas and overland to Panama at age 19).

That background directly shaped how I architect AI systems today. In electrical and field engineering, you never trust an ungrounded load or assume the happy path holds under load; you install circuit breakers, isolate fault domains, and verify state with instruments before energizing a line. I treat language models the exact same way: use deterministic software (PostgreSQL write-ahead state, <15µs pure-CPU gates, <1ms static AST checks, and POSIX atomic renameSync journals) wherever conventional engineering solves the problem cleanly, and reserve probabilistic models strictly for bounded reasoning inside verifiable sandboxes.

The Lab Behind the Three Projects

The flagship projects run on infrastructure I assembled and operate myself. This is the supporting layer, not the headline: expand below for the lab diagram, cloud-egress boundary, and 5-layer summary table, or view the full blueprint.

Lab Hardware Topology, Security Boundary & 5-Layer Stack Summary (Click to Expand)

What leaves the lab (scope: the lab workflows documented on this site, including benchmark runs, code-review audits, and publishing): external services receive only public benchmark data and my own open-source code. No private or third-party customer data is used in these workflows. Projects that support optional frontier-model escalation (for example the cascade router) send prompts to that provider when escalation is enabled; the offline-capable reference designs run with it turned off.

LayerRoleMain pieces
1 · RoutingPick the cheapest model that can do the job<15µs CPU pre-gate, cascade router, local GPU pool + optional cloud burst
2 · Memory & code knowledgeWhat the agent knows across sessionskrusch-context-mcp (decisions, invariants), krusch-git (code graphs), krusch-fs (OS files)
3 · Safe executionWhat the agent is allowed to changekrusch-coding-harness: sandbox, tests, write-ahead journal, crash recovery
4 · DataDurable state and searchPostgreSQL 16 + pgvector, SQLite for single-machine memory
5 · Feedback loopImprove from verified outcomes@krusch/toolkit bricks, maintenance daemon, fine-tuned open-weights adapters

Research Experiments prototypes, not products

  • KruschNexus: offline PDF reading with page-and-line citations
  • KruschLaw: statute lookup with point-in-time rule versions
  • KruschBiz: contract amendment and precedence tracking
View Full Reference Architecture → Read 2026 Tech Stack Paper →

Benchmark Evidence & Publication Status

Every result on this site comes from a public benchmark dataset that I ran myself, with the raw logs published. Running a public benchmark is not the same as an outside party reproducing it or a leaderboard accepting it, so each result is labeled with exactly how far it has gone.

STATUS · SELF-RUN ON PUBLIC BENCHMARKS

Self-Run Evaluations (Published Logs)

Most results. Public datasets, run in my lab, raw logs published: Snap LoCoMo 90.26% accuracy / 95.77% evidence recall (1,540 questions); DolphinBench 90.67% with Grounded v0.3 (544/600; 90.50% on the Riley slice); AgentDojo 0/1,046 successful prompt-injection attacks; Aider Polyglot 51.56%; DABstep 9/10 tasks (small sample).

STATUS · SUBMITTED, AWAITING ACCEPTANCE

Official Submissions Queued

DolphinBench 91.17% (547/600, Gemini 4 Argon Low, UUID c047b063) and 54.17% (325/600, stock Gemma 4 31B, UUID 288671ad) pass the official validator and are uploaded to dolphinbench.ai, but are not yet on the leaderboard. Until accepted, read them as self-run results.

STATUS · MERGED UPSTREAM (MAIN @ 844E93B)

RouterArena PR #169 (Merged)

0.7263 across 8,400/8,400 live queries (74.44% accuracy at $0.3802/1K, 91.43% robustness). Verified by github-actions[bot] CI Run #780 and maintainer audit (@yl231), merged into RouteWorks:main (844e93b); public leaderboard table row queued for the next batch ranking refresh.

STATUS · THIRD-PARTY REPRODUCTION

None Yet (Invitation Open)

No outside party has re-run these results yet. Scripts, frozen read-only memory stores, and 49 raw log sets (64 files) are public on Hugging Face so anyone can check them; reproduction attempts are welcome as GitHub issues.

How I Keep Self-Run Benchmarks Clean (5 Code-Enforced Anti-Leakage Controls):

  1. Runtime Answer-Key Traps (JS Proxy & Python BlindMappingGuard): During ingestion, every benchmark record is wrapped in a runtime guard that throws FATAL_ORACLE_LEAKAGE_VIOLATION and aborts immediately if ingestion code ever touches ground-truth fields (qa, ideal_response, probing_questions, source_chat_ids, .gold_sql, or session_summary).
  2. Read-Only 0o444 Frozen Databases: Conversations are indexed once at $0.00 (zero LLM calls), SHA-256 hashed (memory_manifest.json), and locked read-only (chmod 0444) on disk before the evaluation runner reads a single test question, preventing test-time index mutation.
  3. Zero Dataset-Specific Tuning: Static engine checks (npm run bench:beam:verify) verify that src/*.js contains zero benchmark proper nouns, rubric tags, or test-set word lists; Snap LoCoMo ran the byte-identical SHA-256 engine built before locomo10.json was downloaded.
  4. Model-matched baselines & Retrieval vs. generation separated: LoCoMo runs Mem0's verbatim ANSWER_PROMPT_ZEP and ACCURACY_PROMPT (mem0ai/mem0@aae5989e, gpt-4o-mini at T=0) across both disclosed token budgets (4,465 mean tokens = 89.68% and 9,983 mean tokens = 90.26% vs. Mem0's ~1.8K–4K tokens) while scoring retrieval recall (95.77% dia_id recall) separately from reader generation; DolphinBench holds GPT 5.6 Luna (T=0) and the official gpt-5.6-sol judge fixed (81.50% @ $1.35 vs. published Luna + Mem0 70.67% @ $96.21); AgentDojo (0/1,046 ASR) documents active policy floors, bwrap --unshare-net sandboxes, and taint guards.
  5. 3-Second Offline Re-Tally Verifiers (95/95 SHA-256 Gates): Clone krusch-context-mcp and run npm run bench:beam:verify (zero API keys, zero Docker) to verify source SHA-256 digests, upstream canary traps, and per-question turn-ID recall tallies directly from the raw JSON logs.
Read Return on Memory Paper → arXiv Preprint PDF → Cross-Stack Benchmark Report → 🤗 Raw Audit Logs (49) →

Core Architectural Invariants

The non-negotiable systems rules governing every layer in the KruschDev ecosystem.

01 / INVARIANTS OVER PROMPTS

Verifiable, Bounded Execution

Never trust language models to police their own file writes or follow conversational rules. Enforce constraints in write-ahead state tables, AST dependency parsers, SHA-256 drift guards, and sandboxed test runners. Deterministic gates do not make a flawed AI plan semantically correct; they bound blast radius, reject repeatable defect classes, and enforce journaled rollback when verification fails.

02 / ZERO ROUTING TAX

Multi-Tier Routing Cascades

Don't burn a 500ms LLM call just to choose an LLM. Intercept structured syntax in <15µs (<25µs ceiling) via an in-process pure-CPU Stage-0 syntactic/lexical gate prior to model inference for $0.00, escalate to sub-50ms neural centroids, and query frontier models only when necessary.

03 / LOCAL-FIRST SOVEREIGNTY

Offline-Capable Hardware Control

Run compute, vector indexes, and episodic memory on self-hosted bare-metal clusters. Offline-capable configurations keep privileged files and organizational memory within the self-hosted environment; cloud escalation, when enabled, sends the relevant prompts to the configured provider.

Selected Research & Benchmark Papers

Three representative papers mapping to the flagship projects above; all 31 technical deep dives and ablation studies live in the dedicated research catalog.

Browse All 31 Technical Papers →
Agent Memory · LoCoMo & DolphinBench 90.26% LoCoMo · $0.00 Ingest

Return on Memory: Zero-Distillation Agentic Retrieval on DolphinBench & LoCoMo

Controlled study holding 13,539 episodic sessions frozen inside 0o444 SQLite checkpoints ($0.00 zero-LLM Raw-RAG + 4-Way RRF), evaluating retrieval recall separately from reader reasoning across LoCoMo (90.26% accuracy, 95.77% recall) and DolphinBench (81.50% model-matched Luna @ $1.35; 91.17% queued submission UUID c047b063).

Read Return on Memory Paper →
Code Verification · @krusch/toolkit 40 Bricks · 16 <1ms AST Rules

Why Coding Agents Need Pre-Audited Lego Bricks, Not Prompted Boilerplate

Architecture and empirical audit of @krusch/toolkit (v1.8.1) and krusch_toolkit (v1.6.0): how 40 dual-runtime modules and 16 sub-millisecond static/AST Slop-Breaker detectors eliminate SSRF, webhook HMAC, and pagination defects across 104/104 repositories and third-party OSS targets.

Read Lego Substrate Paper →
Execution & Evaluation · 14 Suites 0/1,046 AgentDojo · Honest Cloud Gaps

How an Open-Weights Sovereign Stack Stacks Up Across 335,000+ Queries (Including Where Cloud Wins)

Cross-stack evaluation across 14 external suites (95/95 SHA-256 gates, 49 public Hugging Face log bundles): 0.00% ASR on 1,046 AgentDojo episodes, 0.7263 merged upstream on RouteWorks/RouterArena PR #169 (main @ 844e93b), 51.56% Aider Polyglot, and an explicit analysis of frontier-model reasoning gaps.

Read Cross-Stack Benchmark Report →