Hey, I'm Mahendra.
Thirteen years building software, most of it around live video. Now I build agents, and the walls that keep them safe.
Where I work
Xsolla
Senior software engineer
I work on Lightstream Studio, a live broadcasting studio. Four years ago I was hired to build the product. Now I've ended up in the infrastructure too, and I'm not complaining.
- Kubernetes at scale: managing clusters across multiple regions and the infrastructure around them
- Resilience for a platform that's always live: capacity, failover and recovery
- Observability, and the automation built on top of it
- Agents that work alongside our operations, from investigation to response
- Product, end to end, from the feature down to the platform it runs on
What I'm building
Bayley
In development
My own agent, on WhatsApp and the web, working inside your Gmail, Drive, Docs and Sheets. Every conversation runs in its own gVisor sandbox, your keys never enter it, every tool call is checked at each hop, and its character is versioned and tested like code.
How I think about engineering
- 01
Provision for scale. Don't build for it.
Check the indexes and the vacuum settings before you add a second region.
Navigating the Scaling Myth → - 02
AI solves the node, not the network
Generated code works and still doesn't belong. The job is knowing what to write, what not to, and why.
No Silver Bullet → - 03
Model the data around its questions
Dynamo is for everyone, but not everyone is for Dynamo. Know how the data will be read before deciding how it's stored.
Data Modeling in DynamoDB → - 04
Every log line has a price
An unhandled exception doesn't just hide a bug. It turns one error into twenty billed lines. Handle it, and log on purpose.
The World of Effective Logging → - 05
A hard test is a design review
If a test needs a private member or a special condition to get in, the dependency isn't isolated enough.
Unit Testing for Redis Service → - 06
Assume the agent will be tricked
Keep the keys out of it and fence its tools from the outside, at every hop. Nothing that matters lives in the prompt.
The Agent Will Be Tricked →
Writing
All posts →- Building an Agent People Trust: Character, Voice, Tone and Memory
An agent whose tools all work can still be one nobody trusts. A written character, a voice of its own and a memory that knows who said what are what earn that trust.
- The Agent Will Be Tricked. Plan for It.
How I keep a prompt-injected agent from stealing anything, and from doing much harm with what it can still reach
- Support investigations with AI agents
AI agents need a way to see the systems behind a support ticket. Read-only CLIs give them that view without giving them a way to change those systems.
Previously
All projects →- CovidTweet Verified covid help, filtered from Twitter 2021
- AudioViz Audio into video with Node.js and ffmpeg 2021
- Sock-stream WebSocket ingest to RTMP, in Go 2021
- Transcode Video into HLS and DASH streams 2021
- NotionEdge The Notion API, served from Lambda@Edge 2020
- Superauth React hooks for Firebase authentication 2020
- Zoop Static site hosting from the command line 2020