Who it is forA developer porting an agent to another language, or teaching how agents work, who wants the smallest possible reference.
The problemAgent frameworks hide the loop behind abstractions, so it is hard to tell what is essential and what is convenience.
The outcomeA side by side understanding of the core loop in four languages, and a list of what the full Smol.py adds on top.
What you need first
- Python 3 or Go
- An OpenAI Responses API compatible endpoint, such as a local proxy that adds your key
Steps
- Start a Responses API compatible endpoint, for example a small local proxy
- Run the Go version:
go run golf/smol.go http://127.0.0.1:8787/v1/responses - Read golf/smol.py, golf/smol.clj and golf/smol.php next to each other
- Note what each keeps: the agent loop, user input and context window usage
- Compare with Smol.py, which adds retries, compaction and truncation
- Try the README's build prompt: port Smol to another language while keeping it Smol
Prompt for your agent
Compare golf/smol.py, golf/smol.go, golf/smol.clj and golf/smol.php from smol-env/smol in a table: lines of code, dependencies, how each handles the tool call and context. Then port it to <language> using only the standard library.
Caveat. The golfed versions skip retries, compaction and output truncation.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for smol-env/smol and "Compare a minimal agent loop in four languages"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer