I've been using AI coding tools like Amp Code and Claude Code more frequently, but I never really understood how they worked under the hood.

When I came across Thorsten Ball's tutorial "How to Build an Agent", I decided to work through it myself and port his Go implementation to Python.

This is just me sharing what I learned along the way.

The Rabbit That Never Came

Going into this, I had the same expectation Thorsten mentions in his post, I was waiting for the moment when the complex architecture would be revealed, when he'd show the secret sauce that makes AI agents work.

That moment never came.

The entire implementation really was just what he claimed: an LLM, a conversation loop, and some basic tools.

What Actually Surprised Me

The thing that caught me off guard wasn't the simplicity of the code, it was watching the model reason through tasks I never explicitly taught it.

When I asked my agent to "tell me about the Python files in this directory," it:

  • Listed the directory contents first

  • Identified which files were Python files

  • Read each one individually

  • Gave me a coherent summary

I didn't program this sequence.

The agent just figured out that this was the logical way to approach the task.

This made me realize how good these models are at tool use.

They're not just following scripts, they're actually planning and adapting their approach based on what they find.

How This Changed My Perspective

Before building this agent, I used tools like Amp Code and Claude Code as helpful but somewhat mysterious assistants.

Now I understand they're fundamentally LLMs with carefully designed interfaces to development environments.

This shift in understanding has already changed how I work with these tools:

I'm more deliberate about context: Knowing that agents maintain conversation history makes me think more carefully about how I frame requests and build up context over multiple interactions.

I trust the reasoning more: Seeing how well the model chains operations together makes me more comfortable giving it higher-level tasks rather than breaking everything down into tiny steps.

I think about custom workflows: Understanding the basic pattern makes me want to experiment with building agents for specific repetitive tasks in my work.

The Learning Experience

Thorsten's tutorial is structured really well, you start with a basic chat interface and gradually add capabilities.

Each tool (read files, list directories, edit files) builds naturally on what came before.

The Python port was educational too.

What I'm Thinking About Now

This experience has me looking at agentic workflows differently.

If you can build something this capable in 300 lines of code, what becomes possible when you add more sophisticated tools or integrate multiple agents?

Three Key Takeaways

  1. The models are getting scary good at tool use: They can chain operations together without explicit instruction, planning multi-step approaches to problems.

  2. Understanding the basics changes how you use existing tools: Once you know how agents work, you can be more strategic about context and task framing.

  3. The barrier to building custom agents is lower than expected: 300 lines of code can get you something genuinely useful for specific workflows.

Moving Forward

I'm planning to experiment more with building small agents for specific workflows. Nothing grand, just automating some repetitive parts of my development process.

If you're curious about how these tools work, I'd recommend working through Thorsten's tutorial. Sometimes the best way to understand something is to build a simple version of it yourself.

Keep Reading

No posts found