The following article originally appeared on Hugo Bowne-Anderson’s newsletter, Vanishing Gradients, and is being republished here with the author’s permission.
In this post, we’ll build two AI agents from scratch in Python. One will be a coding agent, the other a search agent.
Why have I called this post “How to Build a General-Purpose AI Agent in 131 Lines of Python” then? Well, as it turns out now, coding agents are actually general-purpose agents in some quite surprising ways.
What I mean by this is once you have an agent that can write code, it can:
- Do a huge number of things you don’t often think of as involving code, and
- Extend itself to do even more things.
It’s more appropriate to think of coding agents as “computer-using agents” that happen to be…