The coding agent
中文版:README_zh.md
coder is an interactive coding agent: it reads the code, writes the code, runs
the commands and tells you what it changed. It runs in the terminal and in
the browser, and it is a library too.
pip install coder-agent
cd my-project
coder # the terminal interface
coder web # the same agent in the browser
coder eval path/to/suite # run a task suite against the agent
The package is on PyPI. To follow the repository instead:
pip install "coder-agent @ git+https://github.com/sds819/coder-agent".
What it does
Tools. Fourteen built-ins: read, write, edit, multi_edit and apply_patch to change
files; glob, grep and ls to find code; bash, bash_output and bash_kill to run commands
(also in the background); todo_write to keep a task list; task to spawn a sub agent; skill
to load a skill.
Permissions. Five modes: default (everything that changes something asks), acceptEdits
(writes pass, the rest still asks), plan and readonly (nothing is changed) and bypass
(nothing asks). Rules live in ~/.coderagent/rules.yaml (yours) and .coderagent/rules.yaml
(the project's); a deny always wins over an allow.
Sessions. Every session has an event log, so it can be resumed (coder --resume), forked
(/fork), rewound (/rewind) and exported (coder export). The trace of a session can be sent to
an OpenTelemetry collector. A session started in the browser can be continued in the terminal, and
the other way round.
Context. The conversation is compacted when it reaches 80% of the budget; the summary keeps
the goal, the findings, the decisions, the files that were touched and the open questions. Before
a round ends, three gates are checked in order: a Stop hook, the verify.commands of the
project, and the output schema.
Memory. The project writes .coderagent/memory/*.md, your own preferences live in
~/.coderagent/CLAUDE.md, and /init writes an AGENTS.md for the repository.
Subagents and routing. task spawns a sub agent (code-explorer, verifier, refactorer
and your own). Different jobs can use different models: main, cheap, strong, summarize,
reflect and review.
Extensions. Hooks on nine events (PreToolUse, PostToolUse, UserPromptSubmit, Stop,
SessionStart, SessionEnd, SubagentStop, PreCompact, PostCompact), MCP servers, plugins,
skills and custom slash commands.
Sandboxes. The commands can run in local, docker, singularity, bubblewrap, contree
or SWE-ReX (swerex_docker, swerex_modal).
35 slash commands in the terminal (/model, /mode, /plan, /review, /diff, /cost,
/context, /compact, /resume, /fork, /agents, /permissions, /hooks, /sandbox, …)
— the same set in the browser.
The web interface. coder web serves a chat page, a settings page (model and permissions as
forms), a file tree and the diffs of the session. Every action is a plain HTTP call, so the
browser can be driven by a script too; the API docs are at /api/docs.
Evaluation. coder eval <suite> runs a task suite against the agent and reports what the
agent did with every task; coder eval-compare diffs two reports and names the regressions.
The model
The models go through litellm, so every model that litellm
supports works — with the name of the provider in front of it (anthropic/…, deepseek/…). The
key of the provider is read from the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY, …) or
from ~/.coderagent/.env.
coder -m deepseek/deepseek-flash --task "fix the failing test"
The model is configured in the terminal, in the terminal interface and in the browser. All three
write the same file, ~/.coderagent/config.yaml:
coder model # show the settings in effect
coder model --name deepseek/deepseek-flash --max-retries 3 # write them down
coder model --test # try the model out
The try-out and the writing are two steps: --test never writes anything, and the writing never
waits for the try-out — a configuration that does not work yet is worth writing down, to be fixed
later. The terminal interface has the same three steps (/model name=… base=… key=… retries=…,
/model --test, /model --save), and the settings page of the browser has a Test button next
to Save.
Pictures. When a picture is sent to a model nobody knows anything about, the agent asks it once — with a picture of one color and the question what color it is — and writes the answer to your own configuration file. The next time the configuration says it, and the model is never asked again. A model that cannot take pictures is refused the turn, instead of making up an answer.
Read more
In docs/usage:
- Quick start — install it, set the model, run the first round (中文)
- Everything
codercan do — one page, every feature, with the errors you may hit - The web interface — the chat page, the settings page, the HTTP API, the security model
- The commands — every slash command
- Sub agents — sub agents and their own models
- Hooks — hooks on nine events
- The sandbox — where the commands run
- The eval harness — task suites, reports, comparisons
- Model routing — which model does which job
- Memory — project memory and your preferences
- Skills — the skills the agent may load
- Plugins — the plugins that extend it
- MCP servers — the tools other servers bring
- The trace of a session — export the trace, send it to a collector
And if you want to know how it was designed, see docs/design:
- The architecture — the layers, the modules, the interfaces, the key decisions
- The design logic — why it grew this way: the load-bearing decisions, the invariants, the trade-offs
- The questions and their answers — 41 questions about the agent, answered
Questions
- Something is broken. Open a bug report — the
template asks for the error message and how to reproduce it. The log of the last session is in
~/.coderagent/sessions(coder exportwrites it out). - An error you do not understand. Everything
codercan do has a "When something goes wrong" section for every part of the agent. - A question. Open a question or ask on Discord.
中文
这份 README 有中文版,文档也有中文的:
- 中文版 README——整篇中文的这份介绍
- 快速开始——装上、配置模型、跑第一轮
- 功能——一页看完所有功能,外加你可能撞到的报错
- 网页版——聊天页、设置页、HTTP API、安全模型
- 命令——全部 slash 命令
- 子 agent——子 agent 和模型路由
- Hooks——九个事件上的 hook
- 沙箱——命令跑在哪里
- 评测——任务集、报告和对比
Where it comes from
This agent is built on the ideas of mini-swe-agent,
the minimal AI software engineering agent: the linear history of the messages, the commands run
through one bash tool, the model layer of litellm, and the sandbox environments (Docker,
Singularity, bubblewrap, contree, SWE-ReX) that came with it. Everything else — the agent loop,
the tool system and the permission layer, the sessions and the event log, the context engine and
its compaction, the memory, the sub agents and the model routing, the extensions (hooks, MCP,
plugins, skills), the terminal interface, the web interface and the evaluation harness — is new.
mini-swe-agent itself is a research project of the SWE-agent team. If you found that work helpful, please consider citing the SWE-agent paper in your work:
@inproceedings{yang2024sweagent,
title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://arxiv.org/abs/2405.15793}
}
Metadata
Release files for coder-agent 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coder_agent-0.2.0.tar.gz | 249.3 kB | With provenance | Details for coder_agent-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coder_agent-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for coder_agent-0.2.0-py3-none-any.whl |
Total release size: 562.9 kB
Release files / coder_agent-0.2.0.tar.gz
| Download URL | coder_agent-0.2.0.tar.gz |
|---|---|
| Size | 249.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63dfbc70c23bf0754388ced4447d47204c8ca06d21c5e0478b3dcc93857a458a
|
|
BLAKE2b-256 checksum How to use checksums |
c9aaec433aef5fa48022aa1f6a1d990e375f14ee97c862a10676af367e057f57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / coder_agent-0.2.0-py3-none-any.whl
| Download URL | coder_agent-0.2.0-py3-none-any.whl |
|---|---|
| Size | 313.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a440bb2d5d93e32f8592db5be8c2c664dc7d813c1210c8e8680b52e9c3537bb
|
|
BLAKE2b-256 checksum How to use checksums |
23dfdf0dea8252da2a0d24271e37155573bf119f51127577f212d204dee13c53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for coder-agent 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for coder_agent-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.