AI4AI — Let AI manage itself more easily.
AI4AI is an extension kit for AI harnesses: it abstracts extension capabilities into a unified interface — the same tool calls work across harnesses, and skills stay portable.
- Know Itself — understand its own runtime state, including but not limited to context usage, model, reasoning effort and window.
- Renew Itself — renew itself on demand, refreshing the context, shedding the burden and traveling light.
- Duplicate Itself — create its own copies, making task scheduling and coordination more flexible.
| Harness | Linux | macOS | Windows |
|---|---|---|---|
| Claude Code | ✅ | ✅ | WSL |
| Codex | ✅ | ✅ | WSL |
| OpenCode | ✅ | ✅ | WSL |
| DeepSeek Harness | ✅ | ✅ | ✅ |
On Windows, all harnesses except DeepSeek Harness run via WSL; details and limits are in the contract docs.
Requires Node.js 22+. Choose one — do not run all three:
Recommended
npm install -g ai4ai && ai4ai initCustom install
npx ai4ai initProject-scope install
npm i -D ai4ai && npx ai4ai init --scope projectFor DeepSeek Harness, ai4ai init installs both the web and headless profiles.
init detects and registers local harnesses (idempotent); --yes skips the prompt.
ai4ai status # show state
ai4ai upgrade # re-register
ai4ai uninstall # remove registrationsThe same commands across harnesses (in-harness session tool and ai4ai CLI):
status— know its own context, model, reasoning effort, window, auto-compaction.handoff— renew its context in place while keeping the task.spawn— start a detached executor that works in parallel (not a sub-agent).message/finish/stop/list— manage executors.watch/events/sweep— observe and clean up session processes (CLI helpers).
Claude Code / OpenCode / DSH expose the tools after registration; Codex uses the CLI:
ai4ai session --operation status --harness codexMIT.