A small, local-first AI coding agent harness. You point it at a project, give it a task in plain English, and it reads, searches, and edits files — then runs the project's own verification commands to prove the work.
Built on the Vercel AI SDK (ToolLoopAgent) and run with Bun.
- Read and search files, run shell commands, and write/edit code
- Spawn subagents (read-only explorer, trusted executor) for bigger tasks
- Discover and load project
skills/SKILL.mdfiles - Derive verification gates (
typecheck,lint,test,build) frompackage.jsonand require the agent to run them - Gate risky shell commands behind an approval allowlist
- Pick your sandbox: run on the host (
local) or insidejust-bash's in-memory filesystem
- Bun >= 1.x
- An OpenRouter API key for model access (set
OPENROUTER_API_KEY)
bun install
bun run index.ts -- /path/to/project "Add OAuth login. Check the auth-patterns skill first."| Flag | Default | Description |
|---|---|---|
--sandbox |
local |
local or just-bash |
--model |
openrouter/free |
Model ID to use |
Agent text prints to stdout; tool calls, step traces, and errors print to stderr.
index.ts # entrypoint: CLI, wiring, agent loop
src/
sandbox.ts # Sandbox interface (read/write/exec)
sandbox-local.ts # host-backed implementation
sandbox-just-bash.ts # in-memory just-bash implementation
tools.ts # tool factories (read, grep, bash, write, edit, ...)
registry.ts # named tool registry + wrapTool hooks
approval.ts # command allowlist / trust gating
system.ts # system prompt builder
skills.ts # skill discovery
verification.ts # derive gates from package.json
cache.ts # prompt-cache markers
skills/ # project skills (SKILL.md files)
bun run typecheck # npx tsc --noEmit
bun run verify # typecheck + lint + test- Port the harness core to Rust