Overview
llm-coding-agent is a plugin for Simon Willison's LLM command-line tool. Installing it adds an llm code command that starts an interactive coding-agent session in the current directory, backed by any tool-capable model LLM already knows about — so the same agent loop runs against a hosted frontier model or a local one, depending on what you have configured.
The agent can read, search and edit files under the session directory and run shell commands there. Read-only tools run freely; file writes, edits and shell commands are shown to you and wait for approval, where y approves once and a approves similar actions for the rest of the session. Declining is handled gracefully: the model is told and can try a different approach. In-session commands cover quitting, toggling auto-approval, switching models mid-conversation and reporting token usage.
Because it is built on LLM, sessions are logged to LLM's SQLite database exactly like llm chat, so llm logs shows full transcripts including every tool call and conversations can be resumed later. The package also exposes a Python API: CodingAgent runs the full loop against any LLM model that supports tools, with an approve parameter that can auto-approve, delegate to a callback, or pause the run and hand you the pending tool calls to approve from an application with no terminal attached.
What it does
- Adds an llm code command for interactive terminal coding sessions in the current directory
- Works with any tool-capable model LLM supports, and lets you switch models mid-conversation
- Approval flow for mutating actions: read-only tools run freely, writes and shell commands ask first, with per-command pre-approval and a --yolo escape hatch
- Sessions are logged to LLM's SQLite database, so llm logs shows every tool call and conversations can be resumed
- CodingAgent Python API with approve=True, an approval callback, or a pause-and-resume mode for non-terminal applications
- Registers its toolbox with LLM itself, so the same tools work from llm chat and llm prompt
Getting started
Install the plugin into the same environment as the LLM CLI, then start a session. The --pre flag is needed while the package depends on an LLM alpha release.
Install the plugin
Installs llm-coding-agent and registers the llm code command.
pip install --pre llm-coding-agentStart a session
Run it bare for an interactive session, or pass an initial task. -m picks a model, -d picks a directory, and --allow pre-approves specific commands.
llm code
llm code "add type hints to utils.py"
llm code -m gpt-4.1 -d ~/dev/myproject
llm code --allow "pytest*" --allow "git diff*"Review or resume the work
Transcripts live in LLM's own logs, so you can read back what the agent did and continue the conversation later.
llm logs --short
llm code -c
llm code --cid 01ab...Drive it from Python
CodingAgent runs the same loop programmatically against any tool-capable LLM model; result.tool_calls records everything it did.
from llm_coding_agent import CodingAgent
agent = CodingAgent(
model="gpt-4.1-mini", # any llm model ID, or a model instance
root="/path/to/project",
approve=True, # approve every tool call
)
result = agent.run("Fix the failing test in tests/test_parser.py")
print(result.text)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Get a terminal coding agent that reuses the model configuration and API keys you already set up for the LLM CLI
- Compare how different models handle the same coding task by switching models inside one session
- Keep an auditable record of an agent's file edits and shell commands in LLM's SQLite logs
- Embed an approval-gated coding loop in your own Python application using CodingAgent's pause-and-resume mode
How llm-coding-agent compares
llm-coding-agent alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| opencode | ★ 211k | OpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app. |
| Claude Code | ★ 149k | Anthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands. |
| OpenAI Codex | ★ 128k | OpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel. |
| Pi | ★ 112k | Minimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks. |
| Gemini CLI | ★ 107k | An open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web. |
| autoresearch | ★ 97.1k | Karpathy's minimal harness that hands a coding agent a single-GPU LLM training script and lets it run fixed five-minute experiments, keeping or discarding each change on its own. |
| OpenHands | ★ 89.8k | An open-source AI software-development agent that plans tasks, edits files, runs commands, and tests code, usable from a terminal CLI, a local web GUI, or a Python SDK. |
| llm-coding-agent | ★ 37 | An llm code command that turns any tool-capable model into a coding agent |