Skip to content
/

OpenHarness

openharness · HKUDS/OpenHarness · ★ 13k · last commit 2026-05-24

Primitive shape 45 total
Hooks 2 MCP tools 43
00

Summary

OpenHarness — Summary

OpenHarness (HKUDS) is a Python-based open-source implementation of an agent harness runtime — providing a complete infrastructure layer (agent loop, toolkit, memory, governance, swarm coordination) as a standalone Python application with CLI binaries (oh, openh, ohmo). Unlike the Claude Code plugins in this batch, OpenHarness IS the agent runtime, not a plugin for an existing one. It ships 43+ tools (file, shell, search, web, MCP), a React+Ink TUI, an autopilot dashboard (React/Vite), a messaging gateway (Feishu/Slack/Telegram/Discord), multi-provider model support (Claude/OpenAI/Codex/Moonshot/GLM/MiniMax/NVIDIA NIM), and a parallel swarm coordination system. The companion application ohmo is a personal agent built on OpenHarness that connects to messaging platforms and works autonomously. Stars: 13,115. Differs from seeds: closest to claude-flow (Archetype 3: MCP-anchored toolserver, hive-mind coordination) but OpenHarness is a standalone Python runtime rather than an npm package wrapping Claude Code. It also resembles kiro (Archetype 5: closed environment with proprietary primitives) but is fully open-source and model-agnostic.

01

Overview

OpenHarness — Overview

Origin

GitHub: https://github.com/HKUDS/OpenHarness
Stars: 13,115
License: MIT
Language: Python (primary), TypeScript (dashboard/TUI)
Version: 0.1.9
Last commit: 2026-05-24
Organization: HKUDS (Hong Kong University)

Philosophy

From README:

"OpenHarness delivers core lightweight agent infrastructure: tool-use, skills, memory, and multi-agent coordination."

"An Agent Harness is the complete infrastructure that wraps around an LLM to make it a functional agent. The model provides intelligence; the harness provides hands, eyes, memory, and safety boundaries."

The harness equation: LLM + Tools + Knowledge + Observation + Action + Permissions = Agent

What Makes This Different

OpenHarness is unique in this batch as an academic/research-originated standalone Python agent runtime. Unlike all other entries (which are Claude Code plugins or methodology docs), this IS the agent execution environment:

  • It manages the agent loop, tool execution, context compression
  • It ships its own TUI (React+Ink, Python/Textual)
  • It ships an autopilot dashboard (React/Vite)
  • It ships a messaging gateway (multi-platform)
  • It can run as a server on a VPS, separate from the user's machine

Key Design Decisions

  1. Provider-agnostic: API-compatible endpoint works with any provider.
  2. Auto-compaction: preserves task state across context compression without manual intervention.
  3. Swarm coordination: subagent spawning with team registry and background task lifecycle.
  4. ohmo as product: the OpenHarness runtime ships a bundled personal agent (ohmo) as a separate application.
  5. Dry-run capability: oh --dry-run previews settings, auth, skills, tools without executing.
02

Architecture

OpenHarness — Architecture

Distribution

# One-click install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/HKUDS/OpenHarness/main/scripts/install.sh | bash

# Or pip
pip install openharness-ai

# Then setup
oh setup   # interactive wizard
oh         # start chatting

CLI Binaries

  • oh (Linux/macOS) / openh (Windows PowerShell)
  • ohmo — personal agent app

Directory Tree

OpenHarness/
├── src/openharness/        # Core Python harness
├── ohmo/                   # Personal agent application
│   ├── cli.py
│   ├── runtime.py
│   ├── memory.py
│   └── gateway/            # Messaging platform gateway
├── autopilot-dashboard/    # React/Vite web dashboard
├── frontend/
│   └── terminal/           # React/Ink TUI
├── .agents/
│   └── skills/             # Agent skill definitions
├── .claude/
│   └── skills/             # Claude Code plugin surface
├── scripts/
│   ├── install.sh
│   └── install.ps1
├── pyproject.toml          # Python package (openharness-ai v0.1.9)
└── tests/                  # 114 passing tests

Required Runtime

  • Python 3.10+
  • Node.js (for dashboard/TUI)
  • Ollama or cloud provider API key

Provider Support

Claude, OpenAI, GitHub Copilot, Codex, Moonshot (Kimi), GLM (z.ai), MiniMax, NVIDIA NIM, and any compatible endpoint.

03

Components

OpenHarness — Components

Core Harness Features

Feature Description
Agent Loop Streaming tool-call cycle with retry + exponential backoff + parallel tool execution
Harness Toolkit 43+ tools: file, shell, search, web, MCP
Context Memory CLAUDE.md discovery, MEMORY.md persistent memory, session resume
Auto-Compaction Preserves task state across context compression
Governance Multi-level permission modes, path-level rules, PreToolUse/PostToolUse hooks
Swarm Coordination Subagent spawning, team registry, background task lifecycle

CLI (oh) Subcommands

Subcommand Purpose
oh Interactive TUI session
oh setup Interactive setup wizard
oh -p "<prompt>" Non-interactive single prompt
oh --dry-run Preview settings/auth without execution
oh --output-format json JSON output for scripts
oh --output-format stream-json Streaming JSON events

ohmo Subcommands

Subcommand Purpose
ohmo init Initialize ~/.ohmo workspace
ohmo config Configure channels and provider
ohmo gateway start Start messaging gateway

Skills (.agents/skills/)

Content not fully enumerated; the skill system is compatible with anthropic/skills format and Claude Code plugins.

MCP Support

Full MCP protocol with HTTP transport, auto-reconnect, tool-only server compatibility, and JSON Schema type inference.

Dashboard

  • Autopilot dashboard: React + Vite (frontend dashboard)
  • TUI: React + Ink (terminal UI with Shift+Enter support, streaming output)

Messaging Gateway

Supports: Feishu, Slack, Telegram, Discord, with file attachments and multimodal messages.

05

Prompts

OpenHarness — Prompts

Excerpt 1: Harness Architecture Equation (from README)

Technique: System identity declaration via equation

"An Agent Harness is the complete infrastructure that wraps around an LLM to make it a functional agent. The model provides intelligence; the harness provides hands, eyes, memory, and safety boundaries."

Visual: LLM + Tools + Knowledge + Observation + Action + Permissions = Agent

This is a manifesto-level statement about where the harness boundary sits, not a prompt file.

Excerpt 2: Dry-run readiness levels (from README)

Technique: Three-state verdict system

Readiness levels:
- ready: configuration looks usable; next action is to run the prompt directly
- warning: OpenHarness can resolve the session, but something important looks wrong  
  (broken MCP config, missing auth for later model work)
- blocked: the requested path will not run successfully as-is
  (unknown slash command, unresolvable runtime client)

Excerpt 3: Non-interactive mode (from README)

Technique: Multiple output modes for programmatic integration

# Single prompt → stdout
oh -p "Explain this codebase"

# JSON output for programmatic use  
oh -p "List all functions in main.py" --output-format json

# Stream JSON events in real-time
oh -p "Fix the bug" --output-format stream-json
09

Uniqueness

OpenHarness — Uniqueness

differs_from_seeds

Closest to claude-flow (Archetype 3: standalone runtime with swarm coordination and SQLite memory) but claude-flow is an npm package wrapping Claude Code while OpenHarness is a standalone Python runtime that optionally integrates with Claude Code. Also resembles kiro (Archetype 5: complete environment with proprietary primitives) but is fully open-source and model-agnostic. The ohmo personal agent sub-product (messaging gateway, cross-session user modeling) is closest in spirit to Hermes Agent (NousResearch) and may be an intentional port or parallel development of similar ideas.

Most Distinctive Features

  1. Standalone Python runtime: the only framework in the batch that is a complete agent execution environment, not a plugin for one.
  2. Multi-platform messaging gateway: Feishu/Slack/Telegram/Discord gateway with file attachments — unique in the catalog.
  3. Dry-run with three-verdict system: ready/warning/blocked is a novel UX for pre-flight inspection.
  4. Academic origin (HKUDS): university research group origin, combined with 13k stars, suggests strong research validation.

Observable Failure Modes

  1. Install complexity: Python 3.10+ + Node.js for TUI/dashboard + provider auth — more dependencies than any seed.
  2. Not a Claude Code plugin: users expecting a /plugin install path won't find it; must use pip/curl installer.
  3. Swarm stability: subprocess-based swarm with serialized permission modals may deadlock on concurrent agent permission requests.
  4. ClawTeam integration: listed as "Roadmap" — advanced swarm features are not yet available.
04

Workflow

OpenHarness — Workflow

Typical Usage

Mode Entry Flow
Interactive CLI oh TUI session with streaming tool output
Non-interactive oh -p "prompt" Single prompt → stdout (text/json/stream-json)
Messaging ohmo gateway start Event-driven from Telegram/Discord/Slack
Dry-run oh --dry-run Preview without execution (ready/warning/blocked verdict)

Agent Loop

User prompt
→ Context assembly (CLAUDE.md + MEMORY.md + session history)
→ LLM call (streaming)
→ Tool execution (parallel where possible)
→ Result integration
→ Auto-compaction check
→ Next iteration or completion

Auto-Compaction

When context fills, OpenHarness compresses preserving task state and channel logs — agents can run multi-day sessions without manual compact/clear.

Swarm Coordination

Subprocess teammates run in headless worker mode. Agents are pollable in real runs. Permission modals are serialized to prevent input swallowing.

Approval Gates

Interactive sessions support interrupt-and-redirect (Ctrl+C or new message). Permission modals require user confirmation for sensitive operations.

Session Management

  • /compress — manual compaction
  • /usage — token usage
  • Session resume available
  • FTS5 full-text search over session history (ohmo)
06

Memory Context

OpenHarness — Memory & Context

State Storage

  • CLAUDE.md — project context, discovered automatically
  • MEMORY.md — persistent memory, updated across sessions
  • ~/.ohmo/ — ohmo personal agent workspace
  • SQLite state store (session metadata, message history, FTS5 index)
  • Session history with full-text search

Memory Type

Hybrid: file-based (MEMORY.md, CLAUDE.md) + SQLite state store.

Context Compaction

Auto-compaction preserves task state and channel logs across context compression. Multi-day sessions are explicitly supported without manual compact/clear.

Cross-Session

Yes. Session resume, FTS5 search over session history, MEMORY.md persistence.

ohmo Memory

ohmo uses a Honcho dialectic user modeling system (via https://github.com/plastic-labs/honcho) for cross-session user profile building. FTS5 session search with LLM summarization for cross-session recall.

07

Orchestration

OpenHarness — Orchestration

Multi-Agent

Yes. Swarm coordination with subagent spawning, team registry, and background task lifecycle.

Orchestration Pattern

swarm: peer-to-peer subprocess teammates in headless worker mode, pollable, with serialized permission modals.

Isolation Mechanism

Process-level: subprocess teammates run as separate Python processes.

Multi-Model

Yes. Provider-switchable via oh --model or /model slash command at runtime. Different sessions can use different models; no role-based routing documented.

Execution Mode

Interactive-loop (primary), event-driven (messaging gateway via ohmo), one-shot (-p flag).

Crash Recovery

Auto-compaction preserves state across context compression. Session resume available.

Cross-Tool Portability

Medium: has a Claude Code plugin surface (.claude/skills/), Claude Code plugin compatibility, and MCP support — but primarily designed as a standalone runtime.

08

Ui Cli Surface

OpenHarness — UI & CLI Surface

Dedicated CLI Binary

Yes. Multiple binaries:

Binary Platform Purpose
oh Linux/macOS Primary interactive CLI
openh Windows (avoids Out-Host alias) Primary interactive CLI on Windows
openharness All Package entry point
ohmo All Personal agent app

Not a thin wrapper — oh IS the agent runtime.

CLI Subcommands (oh)

Command Purpose
oh Interactive TUI session
oh setup Setup wizard (provider + auth)
oh setup --portal Nous Portal OAuth setup
oh -p "<prompt>" Non-interactive single prompt
oh --dry-run Preview without execution
oh --output-format json/stream-json Programmatic output

Local UI

TUI (React + Ink)

  • Type: terminal-tui
  • Stack: React + Ink (Node.js)
  • Features: multiline editing (Shift+Enter), streaming tool output, Markdown rendering, completions menu, interrupt-and-redirect

Autopilot Dashboard

  • Type: web-dashboard
  • Stack: React + Vite (TypeScript)
  • Location: autopilot-dashboard/
  • Port: not specified in README

Messaging Gateway (ohmo)

  • Feishu, Slack, Telegram, Discord
  • File attachments, multimodal messages
  • Slash commands, cross-platform continuity

Observability

  • --dry-run with ready/warning/blocked verdict
  • /usage token tracking
  • /compress manual compaction
  • Streaming JSON output (--output-format stream-json)

Related frameworks

same archetype · same primary tool · same memory type

Trae Agent ★ 12k

Research-friendly open-source CLI coding agent by ByteDance, designed for academic ablation studies and modular LLM provider…

Sweep AI ★ 7.7k

Autonomous GitHub bot that converts issues to pull requests using a sequential multi-agent pipeline.

Agent Governance Toolkit (microsoft) ★ 2.3k

Enterprise-grade AI agent governance: YAML policy enforcement, 12-vector prompt injection defense, zero-trust identity,…

TDD Guard ★ 2.1k

Mechanically enforces the Red-Green-Refactor TDD cycle by blocking file writes that violate TDD principles via a PreToolUse hook…

Agentic Coding Flywheel Setup (ACFS) ★ 1.5k

Take a complete beginner from laptop to three AI coding agents running on a VPS in 30 minutes via an idempotent manifest-driven…

leash (strongdm) ★ 565

Wraps AI coding agents in containers with eBPF-enforced Cedar policies, making policy violations (unauthorized file access,…