DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to compare a minimal agent loop in four languages with Smol

Run the golfed Smol in Go and read the Python, Clojure and PHP versions to see the essential agent loop with nothing extra.

Short answer: Start a Responses API compatible endpoint, for example a small local proxy; then 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. All steps.

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

  1. Start a Responses API compatible endpoint, for example a small local proxy
  2. Run the Go version: go run golf/smol.go http://127.0.0.1:8787/v1/responses
  3. Read golf/smol.py, golf/smol.clj and golf/smol.php next to each other
  4. Note what each keeps: the agent loop, user input and context window usage
  5. Compare with Smol.py, which adds retries, compaction and truncation
  6. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer