AI4XE/ai4ai
AI EngineeringA cross-harness kit that exposes runtime status, context renewal and self-duplication as a unified interface for AI agents.
Overview
AI4AI targets a practical problem: agent capabilities differ from harness to harness, so the same task has to be reimplemented for Claude Code, Codex, OpenCode and DeepSeek Harness. This project abstracts those capabilities behind one interface so identical tool calls work across supported harnesses and skills stay portable. It groups the interface into three functions: reading the agent's own runtime state (context usage, model, reasoning effort and window), renewing context on demand, and creating copies of the agent for task scheduling and coordination.
Supported harnesses are Claude Code, Codex, OpenCode and DeepSeek Harness on Linux and macOS. On Windows, everything except DeepSeek Harness is expected to run through WSL; the contract documentation covers details and limits.
Quick start
Node.js 22 or newer is required. The recommended path avoids a global install:
npx ai4ai init
npx ai4ai status
init detects and registers local harnesses and is idempotent; --yes skips the confirmation prompt. A global install (npm install -g ai4ai && ai4ai init) keeps the command available, and a project-scope install (npm i -D ai4ai && npx ai4ai init --scope project) ties it to the project. Re-register with ai4ai upgrade and remove registrations with ai4ai uninstall.
After registration, Claude Code, OpenCode and DeepSeek Harness expose the tools directly. Codex does not, so the CLI is used instead:
npx ai4ai session --operation status --harness codex
Constraints
- Node.js 22+ is mandatory.
- Windows support for Claude Code, Codex and OpenCode goes through WSL; DeepSeek Harness runs natively. Platform-specific limits live in the contract document rather than the README.
- Harness integration is two-mode: in-harness tools for most harnesses, CLI calls for Codex. Plan workflows accordingly.
- The project is MIT licensed.
- Context renewal and self-duplication depend on the harness's own context and process model, so behavior is not necessarily identical across implementations.
HotRepo's take
AI4AI appeared on HotRepo's new-project board on 2026-11-21, adding 7 stars within a roughly one-hour observation window and reaching 108 stars in all, with no forks. That is a narrow sample: it shows early interest among people working with coding harnesses, not adoption or stability. The more substantive signal is the design itself — a contract across four harnesses, with the Codex path deliberately falling back to the CLI. For readers already running more than one harness, the contract document is the piece worth reading before committing.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- deepseek-ai/deepseek-harnessAn open-source agent harness from DeepSeek AI built on an everything-is-a-plugin architecture for running configurable AI agents.
- wshobson/agentsA cross-harness catalog of coding agents, skills and commands so one set of prompts works across Claude Code, Codex, Cursor and others.
- csyangwen/dsh-memory-evolveA DSH plugin that gives AI sessions long-term memory, todos, skills, review, canvas and multi-session orchestration.
- ruvnet/rufloA harness that wraps Claude Code and Codex with swarms, persistent memory, and cross-machine federation for multi-agent work.
- QCYTSN/dsh-dafeiyuA desktop pet for DeepSeek Harness that shows real agent status in an always-on-top transparent window.