Agent infrastructure
From a sequential RAG API to a production agent harness
I rebuilt a fixed LLM backend as an agent harness in two phases while keeping the API stable for the products already using it.

0→1 agent infrastructure · 1→100 production hardening
Shreyaan Seth · Engineering Lead
Most of my work sits around the model call: execution state, tools, memory, and retrieval. I also work on evals, migrations, observability, and recovery when a provider fails.
Case studies
I wrote down how I approached each one and what changed in production.
Agent infrastructure
I rebuilt a fixed LLM backend as an agent harness in two phases while keeping the API stable for the products already using it.
Distributed systems
A deploy could delete a workflow in the middle of a two-day wait. I traced the problem to in-memory continuations and moved the runtime to persisted waits and duplicate-safe resume claims.
Multi-tenant security
An AI SQL agent queried shared multi-tenant tables. I designed and implemented tenant isolation with PostgreSQL Row-Level Security, from authenticated context through connection-pool safety.
Cloud infrastructure
A production database cost about $988 a month while averaging 0.8% CPU and barely using its 30,000 provisioned IOPS. I right-sized compute and storage performance, bringing the RDS bill down to about $320.
Runtime thinking
The model call is one part of the system. The rest is state, retries, cost, tool side effects, and enough history to debug a run after the user closes the tab.
agent_runtime / run_01J7
LIVEDurable run state
The job has an identity, an owner, and a recoverable starting point before execution begins.
Also built
These are the parts I owned in each one.
Built the reusable evaluation system
I built datasets for normal and adversarial cases, plus deterministic tool mocks and retrieval fixtures. The framework supports structured assertions and model judgments for the places where agent regressions usually hide.
Implemented the integration and scope layer
I added durable memory across tenants, users, external subjects, agents, and knowledge bases. Long conversations are compacted when they outgrow the model window.
Delivered the feature end to end
The business metrics stay deterministic. Provenance checks and critic loops catch weak model output, while confidence signals and evidence inspection help users judge each recommendation. The enterprise interface turns the result into something they can act on.
Designed the staged migration
I separated raw provider data from application transforms, then added incremental cursors, backfills, and reconciliation tests. Token and callback boundaries stay explicit across Python and TypeScript.
Implemented and hardened critical paths
I built browser recording with local session state, chunked upload queues, retries, and live transcription. I also hardened a telephony bridge to a realtime AI service using server-side speech detection.
Operating principles
I want logs, traces, costs, and run history before I start guessing why a production run failed.
A durable workflow is easier to reason about when I can see its progress, failures, and current owner.
Retries, cancellation, recovery, and isolation affect the user just as much as the successful path does.
I prefer small boundaries and direct control flow. A tired engineer should still be able to understand the system.
Experience
Engineering Lead · Backend & AI Infrastructure
I build backend platforms, agent runtimes, durable workflows, retrieval and realtime voice systems, with React and Next.js across the product layer.
Software Engineer
I cut a critical API path from roughly seven seconds to 400 milliseconds, improved the performance of the Next.js application, and moved delivery to self-hosted infrastructure.
Software Developer
I built a browser extension that identifies suspicious websites and explains the warning instead of silently blocking the user.
Quick answers
If you want to understand what I do without reading every case study, start here.
Get in touch
I'm interested in backend, AI infrastructure, platform, full-stack product, and early engineering roles where I can own what I build and be responsible for its reliability.
shreyaans20@gmail.com