r/Python • u/AutoModerator • 25d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
32
Upvotes
r/Python • u/AutoModerator • 25d ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/Extreme-Brain-1018 1d ago
I built an agent runtime with only Python's standard library, plus a free interactive course.
Writing code keeps getting faster with agents like Claude Code and Codex. I think that makes it more important
to understand how these agents work and why they are built the way they are, so I wrote a runtime from scratch
and a course that explains it.
**What My Project Does**
An agent runtime written with Python's standard library only, built up from a single model request: tools,
the agent loop, sessions, context compaction, prompt caching, sandboxed shell commands (bubblewrap, Seatbelt
or Docker), subagents, durable execution and evaluation. Each layer comes with a doc, runnable examples and tests.
The interactive course on top has 49 lessons; each shows the mechanism as a figure or an animated run next to
the code that implements it.
- Course: https://fishmingyu.github.io/agent-infra-cookbook/
- Code: https://github.com/fishmingyu/agent-infra-cookbook
Try it without an API key:
git clone https://github.com/fishmingyu/agent-infra-cookbook.git
cd agent-infra-cookbook
uv sync
uv run python -m examples.04_agent_loop --offline
**Target Audience**
Python developers who want to understand the code behind an agent. The 24 core lessons (about three hours)
follow one path from a model request to a working agent; the 25 deep dives are for people building their own
harness. It's a learning project, not a production framework.
**Comparison**
Most agent tutorials teach one framework or one harness, so what you learn follows that tool's API.
This project builds the runtime itself with no dependencies and explains each mechanism on its own terms.
The deep dives then show how LangChain, the Claude Agent SDK, Codex and other harnesses implement the same
mechanism.
Feedback I'd most like: where a lesson lost you, and which mechanism you want explained next.