A Tiny Agent, v2: Python and the Sarvam API

After the Go tiny coding agent, I rewrote the same thing in Python, this time pointed at the Sarvam API instead of Gemini. Sarvam is an Indian company which is trying to work Indian Sovereign. The models are strong on Indian languages, which made it interesting to target. The code lives in test-agent-v2, managed with uv. Functionally it is the same agent: a stdin-driven loop, the same three file tools (read_file, list_files, edit_file), the same Sudarshana ☸️ agent. I had typed out most of the v1 agent by hand with as little AI help as possible. I just wanted to get into the weeds of the mechanics, ser-deser, order of various operations, different data structures needed etc. This time I felt confident I could relate to the different parts of the agent. So I just asked Claude to rewrite it in python. ...

June 28, 2026 · 3 min · Bharath

Building a Tiny Coding Agent in Go

I built a small CLI coding agent in Go, following Thorsten Ball’s How to Build an Agent. It runs against the free tier of Gemini (gemini-2.5-flash-lite), so the whole thing costs nothing to play with. The code lives in test-agent. The Agent abstraction has a method to get user input, an api key to call the LLM and a list of tools. The Agentic loop gets textual user input, sends it to the LLM, and displays the output back to the user. ...

June 28, 2026 · 2 min · Bharath

AI Agents

This is the architecture of a typical AI Agent. There is a user operating the agent in order to get his/her task done. There is some local state which the agent can read and write. The agent itself has the following components: The control loop or the agentic loop allows the user to interact with agent. It also orchestrates the complete user interaction flow. Along with this it also handles compaction behaviour, hooks, etc. The system prompt, other prompts and skills comprise the instructions and code needed for the agent to work. Together the above two sets of components can be called the “harness”. Code sandbox allows execution of code generated by the LLM. Tools allow various kinds of processing. MCP server and client allow connecting to various sources of data.

June 24, 2026 · 1 min · Bharath

The Bitter Lesson

This post is a short summary of Rich Sutton’s Bitter Lesson essay. Context Cost of computation reduces exponentially with time. “Brute force” approaches which use compute win over human-aided or human-like problem solving over a medium/long time horizon. Search is one such computation technique. This helped in Deep Blue winning chess. Learning is another. Learning with self-play is yet another. This helped in AlphaGo winning in Go. A Hidden Markov model which models sequential processes is yet another computation technique. This helped in speech recognition. Deep learning for speech recognition is another step in this direction of using computation instead of human-modeled features. Convolutional Neural networks solved image recognition and other vision problems. Bitter Lesson The bitter lesson is that building systems based on our understanding of human knowledge and specifics of problem solving does not work in the long run. AI researchers build knowledge into their agents and this helps in the short term. In the long term, progress plateaus and even slows down. A breakthrough happens by using search/learning along with scaled compute. Learnings Learning 1: General methods like search and learning are very powerful and highly scalable with compute. Learning 2: The world is very complex. The content of our minds reflects this extreme complexity. But the mental processes and meta-methods that we use to capture and represent this arbitrary complexity should we built into AI systems. We want AI agents to use our discovering process and not need the knowledge we have discovered.

June 17, 2026 · 2 min · Bharath

Offline Reinforcement Learning

A really nice insight about offline RL algorithms is that off-policy (but online) algorithms can also be used for offline RL use cases. Structurally they have the same inputs and same kind of outputs. But there is a fatal flaw. For out-of-distribution (OOD) actions, the estimated Q value for off-policy algorithms can never be corrected. These actions are never present in the dataset and can never really be learnt from. So there is catastrophic overestimation for OOD actions.

June 13, 2026 · 1 min · Bharath

India's 63rd GM - Girish Koushik

Girish Koushik became Karnataka’s 3rd and India’s 63rd GM. He just finished his B.E. in E&C and gained 56 ELO points and the remaining 2 GM norms in a month. Amazing ! The graph below shows the enormous progress made by India in chess. Source: Chessbase India Increase in disposable income of the middle and lower middle classes seems to be correlated with India’s sports boom. This also showcases the aspirations of Indians after a millenium of foreign rule.

June 25, 2019 · 1 min · Bharath

fast.ai course

I have started working on the fast.ai course. This is the Practical Deep Learning for Coders, v3 course. Strangely the 7 lessons made this course more approachable than others on Coursera/Stanford. Jeremy Howard, the creator of the course, is a brilliant guy and it shows in the way the course is presented. Lots of intuition and tuning knowledge has been embedded in the fast.ai library with the various default hyperparameter values being carefully chosen after a lot of experimentation. ...

June 16, 2019 · 2 min · Bharath

Random stuff

A new paper Reinforcement Learning, Fast and Slow from DeepMind reviews recent techniques and improvements in deep Reinforcement Learning. This paper talks about eposodic-RL, meta-RL and its combination. A paper on technology that can translate neural activity into speech. Mind-blowing. Style transfer is such an interesting topic. The seminal paper on this is from the Bethge Lab and is titled A Neural Algorithm of Artistic Style. A summary article is here.

May 3, 2019 · 1 min · Bharath

Decision Trees

This is a short post on decision trees based on my reading of Chapter 6 of Hands–On Machine Learning with Scikit–Learn and TensorFlow . I am just listing out some interesting points. The book is really good; so please refer to it. Basics Decision trees do not require much data preparation (feature scaling, centering etc). Gini score indicates impurity of a decision tree node (do all training examples belong to a single class or not) CART algorithm to produce a decision tree produces binary trees. ID3 produces trees whose nodes can have more than 2 children. Decision trees are white box models because it is easy to see why the decisions were made. Neural networks / Random forests are black box because of the lack of interpretability. Decision trees are very easy to apply manually. ...

April 22, 2019 · 2 min · Bharath

Playing with LSTM

I was trying to learn the basics of LSTM and found this pytorch tutorial. Starting from there I tried out the parts-of-speech tagger with minor modifications. 1. Import the necessary libraries import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np torch.manual_seed(1) ...

April 20, 2019 · 3 min · Bharath