One-shot a CLI coding agent on top of a Python LLM library
Simon Willison had the Fable model more or less one-shot a CLI coding agent built on his LLM Python library.
Done with a custom-built or unnamed agent
- What they did
- Willison started a repo from his Python library template and gave Claude Code for web two prompts. The first wrote a spec.md for a Claude Code-style agent on the LLM alpha. The second told it to build the agent with red/green TDD in sensible commits, with docs, and to test manually using the OpenAI key in its environment.
- How it went
- It shipped as an alpha to PyPI and he called it pretty good for a first attempt. It added file and command tools and an unrequested Python API. A demo with GPT-5.5 built an ASCII-art clock app.
- Worth knowing
- The demo used the --yolo flag, which skips approvals. The README also shows --allow patterns, such as pytest*, as a narrower option.
Try it yourself with Claude Code
Using [Python LLM library, e.g. Simon Willison's llm] as a base, build a CLI coding agent that can read files, edit files and run shell commands in the current directory. Keep it to a single script with a clear README and a confirmation prompt before any command that writes or deletes. Finish by running it on a small demo task in [scratch folder] and showing me the transcript.
Discussion on Bluesky · Jul 2, 2026
Five of these in your inbox every morning
The best things people got an AI agent to do, each with the prompt to try it.
More like this
- Claude
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
- Custom agent
Add agentic forgetting to an agent's memory
Someone implemented a rudimentary version of Tim Kellogg's agentic forgetting approach and reports it works impressively even in its simplest form.
Hand narrow code changes to Devin for pull requests
A team used Devin for a month on small fixes like chart formatting and API edge cases, with tests and PRs; a complex full-stack task went poorly.
Migrate toolchain, architecture and site design with Claude Code
A developer had Claude Code switch a monorepo to oxlint/oxfmt, restructure the architecture and redesign a site, validating in a loop; the redesign took days instead of weeks.
Build and deploy a Game of Life simulation site
In a vendor launch demo, Devin built an interactive Game of Life website, added requested features step by step, and deployed it to Netlify.
Resolve a Slack-reported issue with a coding agent
A Codex agent resolved an issue passed to it in about 40 minutes, and an ops agent verified the fix back in Slack.