Case studies
The decisions behind the systems, written out in full.
Four production problems, explained the way I would in a design review: what broke, the options I rejected, what changed, and the result.
Agent infrastructure
When an agent boundary stopped paying for itself
A production agent runtime sent its execution state to a second LLM just to write the final answer. I wrote the RFC to fold synthesis into the primary runtime and replace agent-level debugging with step-level tracing.
- Agent runtimes
- LLM orchestration
- Latency optimization
- Observability
- Migration design
- RFC ownership
~35s → ~13stotal response time in some casesDistributed systems
Making long-running workflows survive process failure
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.
- Durable execution
- Workflow engines
- Idempotency
- Distributed systems
- Failure semantics
- PostgreSQL
Deploy-safedurable waits, approvals, and duplicate-safe resume claimsMulti-tenant security
Moving tenant isolation from agent prompts into PostgreSQL RLS
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.
- PostgreSQL RLS
- Multi-tenancy
- AI security
- Authorization
- Row-level security
- Agent design
Prompt → RLSauthorization enforced by PostgreSQL, not by generated SQLCloud infrastructure
Right-sizing an overprovisioned production PostgreSQL workload
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.
- AWS RDS
- PostgreSQL
- Capacity planning
- Cloud cost optimization
- Production risk
- Graviton
$988 → $320/moobserved RDS spend, ~68% lower
Currently open to the right problem
Want to talk through the details?
I'm happy to walk through the architecture, the tradeoffs, and the parts that did not work.
shreyaans20@gmail.com