Senior Engineer · AI Systems & Backend Platform
Onkesh Bansal
I build the infrastructure that makes coding agents reliable on real codebases. That means memory layers you can audit, review gates the agent cannot skip, and a 70% cut in token cost. Ten years of production backend engineering sits underneath it.
Projects
Search Campaign Builder: Performance Engineering
A Java and Spring Boot service that handles Google Ads campaign data on a production ad-tech platform. I found and fixed four root causes: missing indexes, N+1 queries, lock contention, and a concurrency bug. The service then absorbed 4× workload growth at flat p99 latency.
Media Activation: Delivery & Changelog
A changelog system I built from scratch for delivery publishing on a production ad-tech platform. It diffs before and after snapshots, calculates changes field by field, and categorizes them on the server. It now records 500 events a day across more than 5 million rows for over 100 internal users.
Agent Development Harness
A six-phase development pipeline for AI coding agents, with a gate between every phase. Each gate answers a failure that kept recurring in my own PR reviews. It carries a three-tier audited memory layer and a custom Bitbucket MCP server. Search runs on ast-grep and LSP, which cuts tokens by 70%. A reviewer returns its own go or no-go verdict. I use it on my own engineering work.
CanvestAI
ETF research for Canadian retail investors, rebuilt as two systems over one SQLite database. A nightly pipeline scores 16 equity sectors through eight weighted lenses, then deliberates over the result. A LangGraph advisor answers questions by fanning out to four discipline agents per turn. Every recommendation is graded again once its horizon elapses, and each lens is graded on its own, so the weights have to earn themselves.
Writing
The three-tier memory layer I built for my coding agent
Most agent memory designs either forget everything between sessions or fill with noise until they are useless. This one runs three tiers: a Karpathy-pattern LLM wiki, an Obsidian second brain, and a JSONL session knowledge graph. Each tier has its own auditor and its own cleanup cycle.
Code search tool benchmark: rg, ast-grep, MCP, and what the data actually says
A benchmark across four production codebases. rg wins on hit rate everywhere. ast-grep wins on one narrow class of query, structural patterns, where rg returns nothing and reports no error. The answer is to route by query class instead of switching tools.
Iron-Law Gates: How I Turned My PR Review History Into an AI Pipeline
I read more than 100 PR review comments across two production codebases over three months. Sixteen failure categories kept recurring. Each one became a gate in an AI-assisted development pipeline that the agent cannot skip. The gates exist because specific reviewers kept catching specific failures.
Every agent behind one seam: what A2A orchestration actually bought me
A conversational advisor that fans out to four agents per turn, deliberates, and composes a reply. The decision that mattered was not the model or the prompt. It was refusing to let any node import an agent directly. Here are two production bugs, one cost ceiling, and what that seam paid back.
Open Source
more-itertools: numeric_range and float steps
Merged into more-itertools. numeric_range builds each item by multiplying the step, but it derived len(), the in operator, and index() by dividing by the step. With float steps the two methods disagree, so a range reported a length that did not match what it yielded, and it denied membership to its own items. I reported the issue and sent the fix.
pytest: approx() and nested containers
Merged into pytest. approx() refused to descend into a nested container and said so clearly, but only when that container matched the type of the one holding it. A dict inside a list slipped past and was compared exactly, so the tolerance was ignored without warning. Reported in 2022 and still reproducing on main.
FortyMM: transactional email templates
Merged into FortyMM, an open-source table tennis league platform. I rewrote the Devise mailer templates, adding a plain-text alternative to every HTML mail, email-safe responsive CSS, and wording that sounds like the sport the product is about.