← back
Lets Build An Agent from Scratch
Takeaway
An agent emerges once an LLM can read/write its own todo list and decide when to stop — frameworks just wrap these primitives.
Summary
- Cam builds an agent stepwise: bare LLM call → LLM-as-judge condition → tool calls (SerpAPI Google search) → parallel tools → planning via a to-do list tool.
- Defines agent as LLM + memory + planning + tools wrapped in a while-loop with read/write/condition operators.
- Shows how the LLM internally loops on tool-call responses (using OpenAI tool-call IDs) until the judge model returns done=true.
- Demonstrates the inflection point: adding a to-do list tool that the LLM manages turns deterministic tool-using code into a true agent capable of self-directed planning.
agentsfrom-scratchtool-use
Original description
Everyone is talking about agents and how powerful they are or will be. But what is an agent anyways? Down with corporate buzzword marketing speak, we are engineers, let’s build! In this talk we will build the minimal components needed to call an agent an agent. We will do this in a stepwise manner to see the effect of each additional element. By the end of the talk we will have the simplest system that can be called an agent. It will include: planning, memory, tool calling all in a while loop. The goal is for you to leave realizing how simple agents can be. Maybe you have already built one. Post with code/slides: https://kamlasater.com/talks/agents-2025