I build infrastructure for AI tooling, and fix the Linux and Python layers it runs on. My event store for MCP servers, mcp-persist, has 21,000+ downloads and runs in production inside mlrouter, the LLM gateway I'm shipping. My fixes are merged upstream in systemd, CPython and across the AI data stack.
Durable persistence for MCP servers · PyPI · v2.2.0 · MIT
The problem. The MCP Python SDK ships with an in-memory event store. It works until the first deploy. Restart the process and every client's Last-Event-ID points at history that no longer exists, so resumable SSE streams quietly stop being resumable. Add a second worker and it gets worse: each worker holds its own private history.
Interactive simulation of the SSE resume protocol. Kill the server with the in-memory store and events are lost; switch to mcp-persist and the missed events replay on reconnect.
The design. mcp-persist replaces that single point of loss with swappable, durable EventStore backends. Redis covers production fleets. SQLite covers single-node deployments. PostgreSQL slots into stacks that already run it. The Redis layout is built for replay. An INCR counter issues monotonic event IDs and the events themselves live in HASHes. A per-stream ZSET supports ranged reads so a reconnecting client can resume from any point. TTLs bound storage. A key_prefix namespace makes one Redis safe for many tenants.
Adoption. Shipped at v1.0.0 and versioned steadily forward through real usage: 21,000+ downloads on PyPI and confirmed production deployments. The test suite runs 300+ async tests against fakeredis and real backends, with CI across Python 3.10 through 3.13.
Positioning. mcp-persist plugs into the official SDK's EventStore interface, so it tracks upstream releases and existing servers adopt it unchanged. Where a server can't be modified at all, the PersistenceProxy adds durability from the outside.
Full adoption is two lines. For servers you can't modify, including servers that aren't written in Python, a standalone PersistenceProxy sits in front as an ASGI layer. It tracks the full SSE state machine and replays cold or hot history to any client that reconnects.
One OpenAI-compatible API across every model provider ·
mlrouter.comLive · entering production
mlrouter is a multi-model LLM gateway: a single OpenAI-compatible endpoint that routes requests across OpenAI, Anthropic, Google, Mistral, HuggingFace, XAI, OpenRouter, Deepseek, and many others. It picks a backend by cost or latency, scores each provider's health, and fails over through circuit breakers and fallback chains when one degrades. Virtual keys carry spend caps; every request is logged. It's live at mlrouter.com and going into production with its first customers. It's also the platform where my open-source packages run as first-class services.
Unified gateway
One /v1/chat/completions across every major provider. The model prefix selects the backend; auto routes on cost.
Cost & latency routing
Strategies score providers on price and p50/p95 latency, with automatic context-window escalation when a prompt outgrows a model.
Health & failover
Per-provider health scores, circuit breakers, and fallback chains keep the endpoint answering when an upstream goes bad.
Virtual keys
Hashed virtual keys resolve to real provider keys server-side, never exposed, with per-key spend caps enforced in Redis.
Durable sessions mcp-persist
Streaming sessions survive a restart and resume mid-stream, powered by my own mcp-persist.
Tokenizer safety TokenDrift
Token counts and migration-safety checks run before a model swap reaches production, powered by TokenDrift.
The parts and the whole. mlrouter ships my open source as production services: mcp-persist for durable sessions, TokenDrift for tokenizer safety, a prompt compressor, and a no-code MCP server builder. The packages are the parts; the platform is the whole.
Least-privilege sandboxing for AI coding agents, learned instead of hand-written. Run Claude Code, aider or any command under learn, and agentfence synthesizes the smallest Landlock policy that covers what it actually did, never granting credentials or persistence paths, then enforces it without root. Across 21 real agent workflows: 252/252 attack attempts blocked and the writable surface cut 68-457x.
Is this review suggestion actually necessary? A blind LLM writes a reproducer for the reviewer's claim through public entry points only, then patchproof runs it against the PR with and without the suggestion and returns a verdict: NECESSARY, NOT_SHOWN, HARMFUL. Born from a systemd fix that CI proved was a no-op; tested on real review threads from my own upstream PRs.
A symbol-aware, self-updating vector index and reference graph over a whole repo, served over MCP, so an agent answers "who calls this / what breaks if I change it" in one call instead of a pile of greps. Built on rag-timetravel; keeps itself fresh with a git pre-push hook.
Time-travel debugger for RAG retrieval pipelines. Pin any past query to the exact index version it ran against, replay retrieval, and diff what changed. Now the indexing core that codebase-rag builds on.
Every pull request I've had merged into projects other people depend on. States are checked against GitHub daily, and Debug replays what each fix changed.
110 merged across 23 repositories, in C, Rust, Zig and Python.
setpriv accepted any prefix of a Landlock filesystem right, so a typo like fs:remove quietly gave a weaker sandbox than the one asked for. Now rejected.
Three fixes on journalctl's per-entry read path, including a UTF-8 decoder that ran twice per byte. Output is byte-for-byte identical, 1.7x to 2.5x faster.
Fixed both overflow guards in the load-average parser: one was inverted and one ran after the shift, so values from 2^53 up wrapped to 0.00 instead of being rejected.
Stopped unbounded buffer growth on truncated compressed streams, and added fuzzers that feed hostile input to every decompressor and to importd's qcow2 path.
The line re-breaker dropped text before an embedded newline and returned entries spanning lines, which could emit uncommented lines in Varlink IDL output.
sysupdate's pending and reboot compared a component's version against the host OS version, an unrelated version space, so reboot decisions were arbitrary. --component= is now refused with them. My first PR merged into systemd.
Browser.setDownloadBehavior was a no-op, so attachment responses were rendered as pages and their bodies discarded. Downloads now stream to disk under downloadPath, with downloadWillBegin and downloadProgress events.
FTS search with a where() prefilter on a list column dropped any row whose match wasn't the last element, because a row resolved to just one of its doc_ids. The prefilter walk now checks all of them.
The Bedrock embedding path unwrapped serialization, API and JSON-parsing results and assumed a multi-threaded Tokio runtime, so bad input panicked. Each failure now returns a typed error.
A bare List or Tuple field crashed to_arrow_schema with an opaque AttributeError: __args__. It now raises a clear TypeError, like other unsupported types.
Claude Code's /model picker came up empty behind a litellm gateway, because it only parses Anthropic's Models API shape. /v1/models now returns that shape when the anthropic-version header is sent, and the OpenAI shape otherwise.
OpenAI-compatible custom endpoints silently lost cache_control in the SDK transform, so Anthropic prompt caching behind a litellm proxy never engaged. It is now preserved.
/v1/models gave clients no context limits, so they hardcoded them or scraped /model/info. It now includes max_input_tokens and max_output_tokens wherever the router knows them.
Phantom budget reservations on multi-replica Redis setups caused intermittent 429s for keys well under budget. Added a general setting, disable_budget_reservation, to turn the reservation off.
AsyncTable.search ran query embeddings on asyncio's shared default thread pool, so one slow embedding call starved unrelated async I/O. They now run on a dedicated executor that is reset after fork.
Real input type=file support: FileList, input.files and the fakepath value, plus CDP DOM.setFileInputFiles to load files from disk and fire input and change, the upload entry point for automation.
An exhausted budget returned 429 on GET /v1/models, hiding every model from clients such as Cursor and Open WebUI at startup. Model-discovery and info routes now skip the budget checks.
Three Cygwin fixes in configure.ac: the system name was set to Cygwin while every case matched CYGWIN*, static builds named their library as a DLL import library (.dll.a), and the shared link hardcoded gcc and g++ instead of the configured compiler.
Merge-insert's conditional-update predicate only took SQL strings, parsed at plan time. Added WhenMatched::UpdateIfExpr so callers can hand the planner a DataFusion Expr directly.
Implemented the File class in Zig, a Blob subclass with a constructor, name and lastModified. lastModified is kept as a double so JavaScript doesn't see a bigint.
Element and SVG tag names were lowercased into a fixed 1,024-byte buffer that release builds never bounds-checked, so one page with a long tag name overwrote the pointers after it and crashed the browser, every CDP session included. Fixed in 1.0.2.
RunixOS.
A capability-based microkernel. CS3013 Operating Systems independent study, advised by Prof. Craig Wills
RunixOS started as a from-scratch microkernel and is now my formal CS3013 Operating Systems independent study at WPI, advised by Prof. Craig Wills. It re-derives classic process, thread, and synchronization coursework on a kernel with no shared memory and no ambient authority, where every right is an explicit capability.
It's a capability-based, IPC-first microkernel written in Rust for x86_64, booting via UEFI on QEMU. The kernel implements capabilities with attenuation and revocation, a preemptible scheduler, synchronous and asynchronous IPC, and a capability-gated filesystem, all backing an interactive console with tracing and profiling tools. A companion research paper examines what preemption does to capability atomicity, tracing a real TOCTOU vulnerability from discovery through a working fix.
Completed the CS:APP attack and bomb labs end to end, including the hidden phase and a full ROP chain. Then went past the assignment and reverse engineered the lab harnesses themselves with objdump and GDB.
Memory systems
Wrote an N-way set-associative cache simulator in C with LRU eviction, then used it to drive a cache-conscious matrix transpose. Valgrind traces guided the access patterns.
Off the clock, sort of.
Back at WPI for the fall, teaching intro systems as a Peer Learning Assistant, serving as a Community Advisor in residence life, and building RunixOS as an independent study.
Upstream, most of my time now goes into systemd and the Linux userspace around it: a use-after-free in resolved's mDNS path, a password-redirect hole in ask-password, and a journalctl read path that runs 1.7x to 2.5x faster. Over the summer I led development of mlrouter, which runs mcp-persist in production.
The lab next to my desk is still a Fedora laptop running a 35B mixture-of-experts model through llama.cpp, wired to a filesystem MCP server, because the fastest way to find what breaks in MCP infrastructure is to live on it. Before any of this I spent a decade teaching Shotokan karate as a second-degree black belt, which is where I learned to explain hard things patiently. I'm open to Summer 2027 Software Engineering internships.
BS/MS Computer Science, WPI · 4.0 GPA · Worcester, MA · EST · asandhu@wpi.edu
The site, as a shell.
Everything on this page is a command away. Replay any fix from the ledger with debug, or start with help.
This terminal needs JavaScript. Everything it shows is also on the page above.
Built by hand: HTML, CSS and zero-dependency JavaScript, with no framework and no build step. The backdrop is a 3D graph of merges drawn on a canvas: main runs into the screen, branches fork off and merge back, and scrolling flies you down it. The terminal reads every answer off this page, and PR states refresh daily through a GitHub Action that commits static JSON, so nothing here calls a third-party API while you read. Type is IBM Plex. Hosted on GitHub Pages. Source