{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "smol-env-smol--compare-agent-loops-across-languages",
 "repo": "smol-env/smol",
 "repo_url": "https://github.com/smol-env/smol",
 "repo_slug": "smol-env-smol",
 "title": "Compare a minimal agent loop in four languages",
 "page_title": "How to compare a minimal agent loop in four languages with Smol",
 "summary": "Run the golfed Smol in Go and read the Python, Clojure and PHP versions to see the essential agent loop with nothing extra.",
 "who": "A developer porting an agent to another language, or teaching how agents work, who wants the smallest possible reference.",
 "problem": "Agent frameworks hide the loop behind abstractions, so it is hard to tell what is essential and what is convenience.",
 "outcome": "A side by side understanding of the core loop in four languages, and a list of what the full Smol.py adds on top.",
 "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"
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Beginner",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The golfed versions skip retries, compaction and output truncation.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3 or Go",
  "An OpenAI Responses API compatible endpoint, such as a local proxy that adds your key"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/smol-env-smol/compare-agent-loops-across-languages/",
 "md": "https://dedupedai.com/use-cases/smol-env-smol/compare-agent-loops-across-languages/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/smol-env-smol--compare-agent-loops-across-languages.json",
 "api_version": "v1"
}
