Maybe the best way to understand AI agents is to build a simple one yourself.
Ask the model → run a tool → feed the result back → repeat.
I built mini-agent to explore that loop, session recovery, and context compression—using only Python’s standard library.
Here’s a visual walkthrough of how it works.
Code: mini-agent
Tutorial (EN / 中文): Illustrated tutorial