2. Divine by gazing into crystals.
tl;dr - I’ve built scry! - a tool that helps you save tokens and time by writing your commit messages using a cheaper and faster model. It’s something I’ve built because it represents the change I want to see in agentic coding, and the use of GenAI in general.
01 expensive
I want to take a step back and make sure we are at square one together. Here goes. We collectively understand that agentic systems (here, let’s use the example of agentic coding systems, for simplicity) are somewhat expensive to run. When GenAI started being a thing for the public, I talked to many startups about their potential LLM use cases, and it was all embarrassingly low in token consumption. You could do A LOT with a few bucks here and there.
02 lazy
So, what changed? Well, the main thing is - we got lazy. Instead of building proper systems and plugging LLMs where we need some kind of natural language processing or unstructured data processing (things LLMs are pretty good at), we got to a point where people will run a token furnace on a schedule to write them a summary of what’s on their calendar and in their inbox every morning. It’s always easier to bootstrap an agent, tell it what the goal is, and watch it succeed some of the time. And the reason agentic (and chat) systems burn through tokens is that every turn of the conversation (or reasoning, or tool use), the harness will send the entire history of the conversation into the LLM again. Sure, prompt caching, smart, but still..
03 furnace
One of the issues with this, as I mentioned before, is cost and another is sustainability. We don’t need to burn tens of thousands of tokens to prepare a daily report every morning. It is wasteful. LLMs might be a good tool for the job of summarizing the input into your day (emails, events, texts), but they are not a good tool for predictable control flow.
04 commits
That brings me to the thing I built. I noticed in my work with Kiro CLI that I, being lazy like a lot of other people, call on the agent to write my commit messages. And it usually goes something like this: “Look at the changes in all of the staged files and commit them with a nice modern message”. I even have it saved as a prompt. So, every time I ask it, Kiro will call some combination of git status and git diff to get what was staged, and then figure out from that what to write in the message. It works well, but this takes 5ish turns, depending on Kiro’s horoscope for the day. So, if I accidentally do this after filling up 20k tokens of conversation prior to this instruction, that’s around 5 x 20k = 100k tokens burnt. That’s a very expensive commit. Also, if you look at what Kiro does, it’s always - status, diff, reason, write the message, and finally commit. And yes, you are absolutely right, four out of five of those actions have nothing to do with LLMs. Because this is a thing I do multiple times a day, I decided to save some credits, and some power in a datacenter somewhere by writing a small tool to replace this workflow.
05 divination
The tool is called scry and it looks at all the staged files’ diffs and writes (divines) an appropriate commit message using potentially a much much smaller and cheaper model than what you would use in a coding assistant. It was written by Kiro, under my supervision, in Go (which I don’t really speak beyond having done a 101 tutorial 10 years ago). It currently supports Amazon Bedrock and Ollama, two inference backends that are of interest to me today, but I will accept contributions to expanding this roster.
Get the tool here on github!