agent-micro is a zero-dependency, open-source replacement for the Claude Code runner inside jsclaw containers — the Anthropic API over fetch, six tools, and nothing else. No node_modules. No black boxes.
jsclaw's default container runs the proprietary Claude Code harness — 238 MB you can't read. agent-micro speaks the same container contract with code you can audit before your coffee cools.
| agent-micro | default runner | |
|---|---|---|
| Agent harness | ~50 kB of plain JS, AGPL | Claude Code — proprietary, 238 MB |
| npm dependencies | 0 | claude-code, MCP SDK, cron-parser |
| Container image | ~150 MB | ~1.5 GB |
| Auditable | ✓ every line | partially |
| Container contract | ✓ identical | ✓ |
| MCP passthrough · subscription auth | not yet · API key only | ✓ |
Built entirely on the Node standard library. The container is the sandbox; the loop is just a REPL with hands.
runner.js reads ContainerInput on stdin and writes sentinel-delimited output on stdout. Identity files, memory/*.md, IPC polling — identical to the default runner. Swap with one config line.
api.js speaks the Anthropic Messages API in ~80 lines: retries with backoff, prompt caching via cache_control, and ANTHROPIC_BASE_URL for proxies and alternative providers.
loop.js: send, execute tool calls, append results, repeat until the model stops. Context trimming keeps long sessions under the window.
bash, read_file, write_file, edit_file, glob, grep — unrestricted inside the container, because the container is the boundary.
send_message, schedule_task and friends as plain in-process functions writing atomic JSON files the host watcher picks up. No transport, no SDK.
A session is the raw messages array on disk. Resume is a file read. No daemon, no database, nothing to migrate.
Build the image and point jsclaw at it — or run the runner bare on your machine for development. No npm install in sight.
$ git clone https://github.com/jsclaw/agent-micro && cd agent-micro $ docker build -t jsclaw-agent-micro:latest -f container/Dockerfile . $ npx jsclaw config set containerImage jsclaw-agent-micro:latest # or standalone, no container: $ export ANTHROPIC_API_KEY=sk-ant-… $ echo '{"prompt": "list the files here"}' | node runner.js ---JSCLAW_OUTPUT_START--- {"status":"success","result":"…","newSessionId":"…"} ---JSCLAW_OUTPUT_END---
Status: experimental. The loop, tools, sessions, and jsclaw IPC integration work and are tested; external MCP servers and web tools are on the roadmap. Bring an API key — subscription auth needs Claude Code.
Every file works standalone. The whole runner is ~1,000 lines.
From the jsclaw gateway to the API wire — every line open, every line yours.