Claude Code • Codex • Opencode • Cursor • Kiro CLI • Kiro • Cline • Aider
Your agents should remember things.
Skills, instincts, memory, security and research-first — one layer that works the same in every harness, including Kiro. Less re-reading, fewer wasted tokens, no guessing at APIs.
$ curl -fsSL https://theelephantcoder.github.io/agent-harness/install.sh | bash
curl install · MIT · works on existing projects with harness init --migrate
Skills
Reusable SKILL.md that follows the agent skills spec. Write once, use in every harness.
harness skill list
Instincts
Hooks that fire on their own. Pre-tool guard, post-edit format + typecheck, session hydration. Muscle memory for agents.
instincts/research-first blocks edits until plan exists
Memory
Tiered MEMORY.md under 8k tokens. Hot always, warm on keyword, cold on demand. Overflow archives with harness optimize, no 3 minute re-explanation.
memory/MEMORY.md + SOUL.md + USER.md
Security
Default deny. Prompt injection check, secret scan before commit, bash allowlist, file boundaries. Catches the dumb mistakes.
harness doctor
Research-first
Agent checks research/findings/ first, then codebase, then web. Writes research/plans/ and waits for an ok.
research → plan → approve → build
One source, every harness
You write skills and memory once. harness init installs to each tool's config.
Quick start
npm install -g https://codeload.github.com/TheElephantCoder/agent-harness/tar.gz/refs/heads/main
harness doctor
harness bench --quickbrew tap theelephantcoder/agent-harness https://github.com/TheElephantCoder/agent-harness
brew trust theelephantcoder/agent-harness
brew install agent-harness
harness doctorpip install agent-harness-cli
pipx install agent-harness-cli
harness doctorecho "deb [trusted=yes] https://theelephantcoder.github.io/agent-harness/apt stable main" | sudo tee /etc/apt/sources.list.d/agent-harness.list
sudo apt update
sudo apt install agent-harness
harness doctorgit clone https://github.com/TheElephantCoder/agent-harness.git
cd agent-harness
npm install
npm linkIn your project
cd your-project
harness init --auto
# or
harness init --migrate
# day to day
harness optimize
harness skill list
harness doctor
harness bench --compare
See docs/cli.md and docs/brew.md.
One setup, measured
My own project, my own runs: 250k LOC TypeScript monorepo, M2 Max. Independent A/B results on other stacks live on the Benchmark tab. Run it yourself.
harness bench --quick
harness bench --compare
Verified regardless of model: optimize shrinks overgrown memory 3–11x to budget, the repo index compresses orientation 13.5x vs reading everything, policy hooks run in milliseconds. Methods and numbers.
Research-first flow
- research — check
research/findings/, grep codebase, web search if needed - plan — write
research/plans/<task>.md - approve — quick ok (tiny edits auto-approve)
- build — implement
- verify — tests +
harness bench+harness doctor - remember —
harness optimizeprunes MEMORY.md, archive keeps history
Works on your existing repo
npx -y https://codeload.github.com/TheElephantCoder/agent-harness/tar.gz/refs/heads/main init --migrate
git status # see what it added
harness doctor --fix
Remove the harness and your project still works — adapters are just file mappings.
Get started on GitHub