Skip to content
/

HarnessOS

harness-os · giulio-leone/harness-os · ★ 3 · last commit 2026-05-17

SQLite-backed execution harness that gives AI agents task lifecycle management, lease-based concurrency control, workload-profile skill specialization, and Symphony-style four-agent fan-out with deterministic evidence gates.

Best whenAI agents need a typed, ACID-compliant execution substrate (not just markdown files) and domain-specific skill specialization via workload profiles to reliab…
Skip ifStateless agent sessions (SQLite persistence instead), Single-domain skill sets (workload profile selection instead)
vs seeds
claude-flow(Archetype 3, SQLite + multi-agent) but adds workload profile specialization (coding/research/ops/sales/support), Zod ty…
Primitive shape 5 total
Subagents 4 MCP tools 1
00

Summary

harness-os — HarnessOS (giulio-leone/harness-os)

HarnessOS is a TypeScript/npm-based execution framework described as "The operating system for autonomous AI agents." It provides a canonical SQLite state layer with strict ACID guarantees for task lifecycle management (pending → ready → in_progress → done/failed), lease-based concurrent access control, and Symphony-style orchestration for parallel agent fan-out. The framework ships as an npm package (harness-os), an installable CLI (harness-setup + harness-sync), and a set of bundled skills in .github/skills/. Key engineering choices: Zod plan contracts for typed schema validation, mem0 optional semantic memory integration, workload profile selection (coding/research/ops/sales/support/assistant), and WORKFLOW.md-based agentic orchestration with physical git worktrees per run. The harness_symphony orchestration mode supports four-agent fan-out with gpt-5-high subagent routing.

Compared to the seeds, HarnessOS is closest to claude-flow (Archetype 3 — MCP-anchored toolserver) in its SQLite state layer and multi-agent orchestration. The key delta is the workload profile selection system, Zod contract validation, and Symphony-style WORKFLOW.md orchestration rather than claude-flow's hive-mind consensus protocols.

01

Overview

Overview — HarnessOS (giulio-leone/harness-os)

Origin

HarnessOS (BUSL-1.1 license) is maintained by Giulio Leone. Published on npm as harness-os. Tagline: "Harness is all you need."

Philosophy

From README:

"Without a harness, every AI agent is a stateless function call. It forgets everything between sessions. It can't coordinate with other agents. It can't recover from crashes. It can't prove what it did or why."

"HarnessOS turns disposable AI into a persistent, self-healing, auditable system."

"Think of it this way: An LLM is a CPU. Tools are peripherals. HarnessOS is the operating system that makes them work together reliably."

Core Tenets

  1. Persistence: Every task, checkpoint, event written to canonical SQLite. Agent death doesn't lose work.
  2. Lifecycle: Tasks follow strict state machine (pending → ready → in_progress → done/failed). Leases prevent concurrent claim of same work.
  3. Memory: Optional semantic memory via mem0 for cross-session context.
  4. Coordination: Dependency chains between tasks resolved automatically.
  5. Portability: Agent-agnostic and IDE-agnostic (Copilot, Gemini, Cursor, Windsurf).

Workload Profiles

The framework specializes behavior per domain via workload profile selection:

  • coding — software engineering workflows
  • research — research and analysis
  • ops — operations and infrastructure
  • sales — sales and outreach
  • support — customer support
  • assistant — full-surface multi-domain (default)
02

Architecture

Architecture — HarnessOS (giulio-leone/harness-os)

Distribution

  • Type: npm package
  • Install: npm install harness-os (or harness-setup CLI)
  • CLI:
    • harness-setup — configures workload profile, registers host, creates ~/.agent-harness/config.json
    • harness-sync — installs skills for selected workload profile, prunes irrelevant skills

Directory Structure

harness-os/
├── src/
│   ├── bin/
│   │   └── scheduler-inject.ts    # Cron-aware idempotent scheduler
│   └── (core framework source)
├── harness-rs/                    # Rust components
├── apps/                          # Application packages
├── .github/
│   └── skills/                    # Bundled skill index
├── docs/
│   ├── mcp-tools.md               # MCP tools reference
│   ├── cli-reference.md           # CLI reference
│   ├── workload-profiles.md       # Workload selection guide
│   └── ...
├── examples/                      # Workspaces for assistant/research/ops/support
└── package.json

SQLite Schema (v5 — enforced)

  • Schema v5 is the ONLY supported runtime store contract
  • v2 databases fail fast with explicit recreate instruction
  • Stores: leases, checkpoints, events, task states, queue metadata

Required Runtime

  • Node.js
  • SQLite (canonical state)
  • mem0-mcp (optional semantic memory)
  • Any AI agent runtime (Copilot, Cursor, Windsurf, Gemini, etc.)

Target AI Tools

Explicitly agent-agnostic: Copilot, Gemini, Cursor, Windsurf, and any custom runtime. Cross-tool portability is a design goal.

03

Components

Components — HarnessOS (giulio-leone/harness-os)

MCP Tools

harness_orchestrator

  • plan_issues — canonical milestones batch import; milestone hierarchy with depends_on_milestone_keys
  • create_campaign — create campaign with typed policy (owner, serviceLevel, escalationRules, dispatch)
  • promote_queue — advance work when both issue-level and milestone-level dependencies are done

harness_inspector

  • next_action — returns structured context block pointing to exact issue/milestone/blocker/lease behind recommendation
  • capabilities — exposes runtime tool surface, bundled skills, Symphony metadata, mem0 state

harness_symphony

  • loadSymphonyWorkflow() — resolves WORKFLOW.md contracts with YAML front matter, $VAR resolution, strict prompt interpolation
  • createSymphonyPhysicalWorktree() / cleanupSymphonyPhysicalWorktree() — worktree lifecycle with safe refs, root containment, repo-owned hooks, evidence manifests
  • launchCodexAppServerRunner() — Codex app-server runner with startup/turn error categories, telemetry, stall detection, retry/backoff evidence

CLI Tools

  • harness-setup — workload profile selection, host registration, ~/.agent-harness/config.json
  • harness-sync — workload-aware skill installation and pruning
  • scheduler-inject.ts — cron-aware idempotent scheduled work injector (full 5-field cron expressions)

Skills (.github/skills/)

Bundled skills per workload profile. Exact names not enumerated in public README but skill manifest publishes workload profiles: coding, research, ops, sales, support, assistant.

State / Memory

  • Canonical SQLite store: leases, checkpoints, events, task states
  • Optional mem0-mcp: semantic memory with lazy loading; failsafe degradation if unavailable
  • Config file: ~/.agent-harness/config.json — selected workload profile per host
05

Prompts

Prompts — HarnessOS (giulio-leone/harness-os)

Note

HarnessOS is primarily a TypeScript/SQLite runtime framework rather than a prompt framework. Its skills (.github/skills/) are bundled per workload profile but exact skill content is not enumerated in the public README. The framework's "prompts" are WORKFLOW.md contracts with YAML front matter, Zod-validated plan schemas, and harness_inspector structured context blocks.

Excerpt 1: README — Core Value Proposition

Source: README.md Technique: Analogy-based positioning to establish conceptual model

## What is a Harness?

In AI, an LLM can *think*. A tool can *act*. But neither can **persist, recover, coordinate, 
or remember** on its own.

A **Harness** is the missing execution layer. It is the infrastructure that wraps around AI 
agents to give them:

- **Persistence** — Every task, every checkpoint, every event is written to a canonical SQLite 
  store. If the agent dies, the work survives.
- **Lifecycle** — Tasks follow a strict state machine (`pending → ready → in_progress → done/failed`). 
  Leases prevent two agents from claiming the same work. Stale leases are automatically recovered.

Excerpt 2: README — Symphony Orchestration Design

Source: README.md Technique: Engineering spec describing the evidence-gate vs human-checkpoint tradeoff

### Agentic Symphony-Style Orchestration

- `loadSymphonyWorkflow()` resolves repo-owned `WORKFLOW.md` contracts with YAML front matter, 
  typed defaults, `$VAR` path/secret resolution, strict prompt interpolation, and reload semantics 
  that preserve the last known good workflow on invalid edits.
- Fully agentic fan-out over ready issues, isolated worktree metadata/physical worktree adapters, 
  `gpt-5-high` subagent routing, and **deterministic evidence gates instead of human runtime 
  checkpoints**.
09

Uniqueness

Uniqueness — HarnessOS (giulio-leone/harness-os)

Differs From Seeds

HarnessOS is closest to claude-flow (Archetype 3 — MCP-anchored toolserver) in its SQLite state layer, multi-agent orchestration, and npm distribution. The key deltas: (1) workload profile system — codified domain specialization (coding/research/ops/sales/support/assistant) with workload-aware skill sync is unique in the corpus; (2) Zod contract validation — strongly-typed schema validation for all plans, not just prompt-level instructions; (3) Symphony WORKFLOW.md contracts — YAML-front-matter workflow definitions loaded by the orchestrator, with $VAR resolution and reload-on-edit semantics; (4) harness_inspector auditable contextnext_action returns a structured context block pointing to the exact SQLite record driving the queue decision, making queue behavior inspectable; (5) BUSL-1.1 license (not MIT/Apache) — indicates commercial intent.

Positioning

HarnessOS occupies a "persistence + orchestration infrastructure" niche — it is not a behavioral framework (no Iron Laws, no governance) but rather the execution substrate that makes agent work durable, recoverable, and auditable. The workload profile system is its most distinctive contribution: the idea that an "agent OS" should specialize differently for engineering vs operations vs sales workflows.

Observable Failure Modes

  1. BUSL-1.1 license: Not fully open-source — Business Source License restricts commercial use; adoption in production systems requires legal review
  2. Low stars (3): Despite sophisticated architecture, minimal community adoption
  3. gpt-5-high routing: Symphony mode is documented with gpt-5-high profile — ties multi-agent orchestration to a specific OpenAI model naming convention
  4. Schema v5 hard cut: v2 databases fail fast; no migration path means upgrading breaks existing deployments
04

Workflow

Workflow — HarnessOS (giulio-leone/harness-os)

Setup Workflow

  1. harness-setup — configure provider, select workload profile, register host
  2. harness-sync — installs only skills required by selected workload profile

Task Lifecycle

Tasks follow a strict state machine:

pending → ready → in_progress → done | failed
  • Leases prevent two agents from claiming the same work
  • Stale leases automatically recovered
  • Dependency chains: When task A completes, dependents automatically promoted to ready

Symphony Orchestration Workflow

  1. Load WORKFLOW.md contract (loadSymphonyWorkflow())
  2. Create physical worktree per run (createSymphonyPhysicalWorktree())
  3. Four-agent fan-out over ready issues
  4. Each subagent uses gpt-5-high profile
  5. Evidence gates instead of human runtime checkpoints
  6. Worktree cleanup + evidence manifest/log after run

Scheduled Work

scheduler-inject.ts — cron-aware injector:

  • Accepts full 5-field cron expressions
  • Idempotent: won't duplicate work
  • Safely triggers scheduled items

Phase-to-Artifact Map

Phase Artifact
plan_issues SQLite milestone + issue records
queue promotion SQLite task state transitions
Symphony fan-out Evidence manifests per worktree
Scheduled injection New items in SQLite queue

Approval Gates

  • harness_inspector next_action context block — points to exact blocker/lease/policy escalation (auditable queue decisions)
  • Campaign policy: serviceLevel, escalationRules — policy-driven escalation
  • Human escalation: available but not mandatory by default
06

Memory Context

Memory & Context — HarnessOS (giulio-leone/harness-os)

Canonical SQLite Store (Primary)

  • ACID-compliant state layer
  • Stores: leases, checkpoints, events, task states, queue metadata, milestone hierarchy
  • Schema v5 enforced (fail-fast on v2)
  • blocked_reason on issues and milestones — dependency blockers are explicit, inspectable, recomputed deterministically

Optional Semantic Memory (mem0-mcp)

  • Lazy loading — derived memory loaded only when needed
  • Failsafe — if mem0-mcp unavailable, harness degrades gracefully without corrupting canonical SQLite tasks
  • Provides cross-session semantic recall

Config File

  • ~/.agent-harness/config.json — per-host workload profile selection
  • Persistent across sessions; harness-setup writes, harness-sync reads

Evidence Manifests

  • Per-run evidence manifests written outside the removable worktree checkout
  • Logs survive worktree cleanup
  • Per-run logs stored with evidence

Context Persistence

  • Tasks survive agent crashes via SQLite persistence
  • Lease recovery for stale locks
  • Dependency chains automatically advance on task completion
07

Orchestration

Orchestration — HarnessOS (giulio-leone/harness-os)

Multi-Agent Support

Yes — Symphony mode provides four-agent fan-out:

  • harness_symphony actions orchestrate parallel agents
  • gpt-5-high default profile for subagents
  • Physical worktree per run for isolation
  • Evidence-gate based completion (no human checkpoints)

Orchestration Pattern

Parallel fan-out (Symphony mode). Task-decomposition-tree for milestone → issue → task hierarchy.

Isolation Mechanism

Git worktree per run (Symphony mode creates/cleans up physical worktrees).

Multi-Model Support

Yes:

  • gpt-5-high is the stated subagent routing profile
  • Supports Copilot, Gemini, Cursor, Windsurf, and custom runtimes
  • Workload profiles provide per-domain model specialization

Execution Mode

Scheduled + continuous. scheduler-inject.ts handles cron-based work injection. Daemon-style operation via harness runtime.

Crash Recovery

Yes — SQLite persistence survives agent crashes; stale lease recovery; harness_inspector next_action provides deterministic queue restart.

Consensus Mechanism

None (lease-based concurrency control, not consensus).

Cross-Tool Portability

High — explicitly agent-agnostic (Copilot, Gemini, Cursor, Windsurf, custom runtimes).

08

Ui Cli Surface

UI & CLI Surface — HarnessOS (giulio-leone/harness-os)

CLI Tools

  • harness-setup — interactive workload profile selection and host registration
  • harness-sync — workload-aware skill sync (installs required, prunes extra)
  • scheduler-inject.ts — cron schedule management

Local Web Dashboard

None documented.

Observability

  • harness_inspector(action: "capabilities") — runtime tool surface, skill manifest, Symphony metadata, mem0 state in agent-readable format
  • harness_inspector(action: "next_action") — structured context block pointing to exact issue/milestone/blocker/lease — auditable queue decisions
  • Evidence manifests per Symphony run (stored outside worktree, survive cleanup)
  • SQLite event log for all task state transitions

Documentation

  • docs/mcp-tools.md — MCP tools reference
  • docs/cli-reference.md — CLI reference
  • docs/workload-profiles.md — workload selection guide
  • .github/skills/README.md — bundled skill index

Related frameworks

same archetype · same primary tool · same memory type

claude-mem (thedotmack) ★ 78k

Background worker service captures every tool call as an observation, AI-compresses sessions, and auto-injects relevant past…

pi (badlogic/earendil) ★ 55k

A minimal, hackable, multi-provider terminal coding agent that adapts to your workflows via npm-installable TypeScript Extensions…

Agent Skills (Addy Osmani) ★ 46k

Encodes senior-engineer software development lifecycle as 23 auto-routed skills and 7 slash commands for any AI coding agent.

wshobson/agents Plugin Marketplace ★ 36k

Single Markdown source for 83 domain-specialized plugins that auto-generates idiomatic artifacts for five AI coding harnesses.

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…

Compound Engineering ★ 17k

Make each unit of engineering work compound into easier future work via brainstorm→plan→execute→review→learn cycles.