kidwit

kidwit by Sabbir Amin

A coding agent
in one file.

kidwit reads your code, edits files and runs commands. It is plain Python with no dependencies, it works inside one directory, and it asks before it changes anything. I built it to see how little a coding agent needs.

How it works

Small on purpose

Most coding agents are big. kidwit is a loop, six tools and two API adapters.

1

file

The whole engine is kidwit.py, about 600 lines of code. You can read it in an evening.

0

dependencies

Standard-library Python only. Nothing to install except Python 3.9 or newer.

6

tools

list_files, search, read_file, write_file, edit_file and run.

Models

Use the model you already have

kidwit uses native tool calling. Pick a provider with one environment variable.

Anthropic

The Messages API, with prompt caching. Set ANTHROPIC_API_KEY.

OpenAI-compatible

DeepSeek, Kimi, OpenRouter, vLLM, or a local server such as Ollama or LM Studio. Set AGENT_BASE_URL.

Scriptable

Give it a task and it runs once and exits with 0 or 1. --json streams events for your own UI.

Safety

It asks first

Every write, edit and command shows a diff or the exact command, and waits for your answer.

Three modes

Ask (default), --yes to skip prompts, and --read-only to remove the write tools completely.

Danger guard

rm -rf, sudo, curl | sh, git push and similar commands ask every time, even with --yes.

Undo and audit

/undo restores the last file change byte for byte. Every action is logged to .agent/audit.jsonl.

Path jail

File tools refuse paths outside the project, including ../ and symlinks that lead out.

The limit: the jail covers file tools only. run executes real shell commands as you, and there is no OS sandbox. Read each command before you approve it.

Install

Install

kidwit needs Python 3.9 or newer. Use whichever of these suits you.

From PyPI release candidate

$ pipx install kidwit==0.1.0rc1
$ export ANTHROPIC_API_KEY=sk-ant-...
$ kidwit "what does this project do?"

pip works too: pip install kidwit==0.1.0rc1. Or run it once with uvx kidwit@0.1.0rc1 "fix the failing test".

From source

$ git clone https://github.com/sabbiramin113008/kidwit.git
$ cd kidwit
$ python3 src/kidwit.py "what does this project do?"

One line coming soon

$ curl -fsSL https://kidwit.sabbiramin.dev/install | sh

The installer never uses sudo and checks a SHA-256 checksum before it installs.

Status

What has been tested

This is early software, so here is the plain status.

AreaStatus
DeepSeek (OpenAI-compatible) on macOS, Python 3.14Tested live. 8 of 8 small eval tasks pass.
Anthropic APICovered by offline tests. Not yet run live.
Linux, Python 3.9 to 3.13Untested. CI will cover it.
WindowsUntested.

The 8 tasks are small, so a pass rate says little yet. I plan a harder benchmark against other small agents.