01

Case studies

Here are a few problems I've fixed which I find interesting.

  1. 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.

    • Agent runtimes
    • RAG migration
    • LLM orchestration
    • Tool execution
    • Observability
    • Architecture evolution
    RAG → Agent harnessa complete runtime rebuild behind the same product API
  2. Distributed 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 claims
  3. Multi-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 SQL
  4. Cloud 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