%{
  title: "Coding agent from scratch - a loop with tools, not that complicated",
  author: "Willem van den Ende",
  published: true,
  tags: ~w(llm coding-agent python exercise),
  description: "Coding agents are not that complicated. A loop with some tools. I found an interactive tutorial that lets you experience it"
}
---

I had started on a "Write your own coding agent" exercise. Four iterations in, actually. And then I found [Tiny Agents]( https://tinyagents.dev/lesson/agent-loop), a set of interactive exercises that let you experience how agents work, from a simple chat request, through a tool, more tools etc. It has a live graph, that visualises of the flow of data and actions.

It is good fun to play with, it starts simple and builds up. It lets you inspect the messages between the 'agent' loop code and the large language model server (which is just HTTP and som![](app/priv/static/images/blog/2026/agent-nearby_20260701_220759.png)e JSON).
![]/images/blog/2026/Screen![](app/priv/static/images/blog/2026/agent-nearby_20260701_220849.png)shot 2026-06-30 at 22.42.49.png)

![agent nearby](/images/blog/2026/agent-nearby.png)
![](app/priv/static/images/blog/2026/agent-nearby_20260701_220606.png)


