# OpenHarness

> A lightweight agent harness — tools, skills, memory and swarms — plus ohmo

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Python
- Licence: MIT
- Repository: https://github.com/HKUDS/OpenHarness
- Canonical page: https://ai-tldr.dev/tools/openharness/
- Updated: 2026-04-08

## In short

OpenHarness is the infrastructure layer under an agent rather than a finished assistant: the streaming tool-call loop, a toolkit, on-demand skill loading, context and memory handling, a permission system and multi-agent coordination. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python and licensed MIT.

## Overview

OpenHarness is the infrastructure layer under an agent rather than a finished assistant: the streaming tool-call loop, a toolkit, on-demand skill loading, context and memory handling, a permission system and multi-agent coordination. One command — `oh` — launches it, and it integrates with CLI agents including OpenClaw, nanobot and Cursor. It is written in Python (3.10+) with a React + Ink terminal UI, and is MIT licensed.

The harness bundles 43 tools spanning file, shell, search, web and MCP access, loads skills on demand from markdown files, and is compatible with the anthropics/skills and plugin formats. Context handling covers CLAUDE.md discovery and injection, auto-compaction, MEMORY.md persistence, and session resume. Governance is first-class: multi-level permission modes, path- and command-level rules, PreToolUse / PostToolUse hooks and interactive approval dialogs. For multi-agent work it spawns and delegates to subagents with a team registry and background task lifecycle.

Shipping alongside it is **ohmo**, a personal agent built on OpenHarness that lives in Feishu, Slack, Telegram or Discord: you chat with it and it forks branches, writes code, runs tests and opens PRs. ohmo runs on an existing Claude Code or Codex subscription with no extra API key. The provider layer treats backends as named workflow profiles, covering Anthropic-compatible and OpenAI-compatible APIs, the Claude and Codex subscription bridges, and GitHub Copilot OAuth.

## What it does

- Agent loop with a streaming tool-call cycle, parallel tool execution, exponential-backoff retries, and token/cost tracking
- 43 built-in tools (file, shell, search, web, MCP) plus on-demand markdown skill loading, compatible with anthropics/skills and plugins
- Context and memory: CLAUDE.md discovery and injection, auto-compaction, MEMORY.md persistence, session resume and history
- Governance layer — multi-level permission modes, path and command rules, PreToolUse/PostToolUse hooks, approval dialogs
- Swarm coordination: subagent spawning and delegation, a team registry, and background task lifecycle management
- ohmo, a chat-native personal agent that runs on an existing Claude Code or Codex subscription from Feishu, Slack, Telegram or Discord
- Non-interactive mode with `text` / `json` / `stream-json` output, and a `--dry-run` preview that resolves settings, auth, skills and MCP config without calling the model

## Getting started

Python 3.10 or higher. Windows is natively supported, but in PowerShell you must use `openh` rather than `oh`, because `oh` resolves to the built-in Out-Host alias.

1. Install

   Either the install script or the PyPI package.

```bash
curl -fsSL https://raw.githubusercontent.com/HKUDS/OpenHarness/main/scripts/install.sh | bash
# or:
pip install openharness-ai
```

2. Configure a provider

   The interactive wizard covers Claude, OpenAI, Copilot, Codex, Moonshot (Kimi), GLM, MiniMax, NVIDIA NIM and any compatible endpoint.

```bash
oh setup
```

3. Run it

   Launch the interactive terminal UI.

```bash
oh
```

4. Preview before executing

   Dry-run resolves settings, auth status, prompt assembly, skills, commands, tools and MCP config, and reports a readiness level of ready / warning / blocked — without calling the model or running any tool.

```bash
oh --dry-run -p "Review this bug fix and grep for failing tests"
```

5. Script it

   Non-interactive mode writes to stdout, or emits JSON / streaming JSON events for programmatic use.

```bash
oh -p "Explain this codebase"
oh -p "List all functions in main.py" --output-format json
oh -p "Fix the bug" --output-format stream-json
```

6. Bring up ohmo

   Initialise the workspace, configure your chat channels and provider, then start the gateway — ohmo is then live in your chat app.

```bash
ohmo init
ohmo config
ohmo gateway start
```

## When to use it

- Build your own agent on a ready-made loop, toolkit and permission model instead of writing the harness yourself
- Run a personal agent from Slack or Telegram that opens PRs against your repos, on a subscription you already pay for
- Drive an agent from CI or a script with structured JSON or streaming-JSON output
- Coordinate subagents on a larger task with a team registry and background task lifecycle

## Version history

- 2026-04-08: Covered on AI/TLDR as open-source agent infrastructure providing tool-use, skills, memory and multi-agent coordination, shipping with ohmo — a personal agent with 43 tools and persistent cross-session memory.
