DEV Community

Cover image for Agent Harnesses, Unfolded: OpenClaw vs Hermes Agent vs Pi vs DeepSeek Harness
amananandrai
amananandrai

Posted on AI-assisted

Agent Harnesses, Unfolded: OpenClaw vs Hermes Agent vs Pi vs DeepSeek Harness

TL;DR Same model, different harness, very different agent. Pi keeps the core tiny and lets you add the rest. DeepSeek Harness makes every part a swappable plugin. Hermes Agent learns from its own sessions and turns them into skills. OpenClaw lives in your chat apps and wakes itself up on a schedule.

I wanted to compare different agent harnesses and see how they actually differ under the hood, so I picked four of them and went digging: Pi, Hermes Agent, OpenClaw, and the newest one on the block, DeepSeek Harness. For each, I went through its GitHub repo and poked around its DeepWiki map to figure out how it's really put together. Everything here comes from the main branch of each repo as of 1 December 2026. These projects move crazy fast, so please double-check the repo before you trust any number I mention.


1. What is a harness, anyway?

An LLM on its own is stateless: text goes in, text comes out. It can't run a command, remember yesterday, or notice that its context window is full.

The harness is all the software around the model. It builds the prompt, runs the tools, stores the session, trims the context, and enforces the guardrails. Maarten's argument, which I agree with, is that the harness shapes an agent's output about as much as the choice of model does.

Agent = Model + Harness: a paper robot (the LLM) surrounded by ten harness components

Under every harness sits the same small loop. The model reasons, calls a tool, reads the result, and repeats until it stops asking for tools:

Animated agent loop: Reason, Act, Observe, repeated twice, then final answer

Everything that follows comes down to the choices each project makes around that loop.


2. Meet the cast

Four papercraft robots: OpenClaw, Hermes Agent, Pi and DeepSeek Harness

Repo Who One-liner
🦞 OpenClaw openclaw/openclaw OpenClaw Foundation Personal assistant in your chat apps
☤ Hermes Agent NousResearch/hermes-agent Nous Research The agent that writes its own skills
π Pi earendil-works/pi Earendil Minimal harness you make your own
🐋 DeepSeek Harness deepseek-ai/deepseek-harness DeepSeek AI Everything is a plugin

All four are MIT-licensed and all four are model-agnostic. Even DeepSeek's harness isn't tied to DeepSeek models.

One fun bit of lineage: OpenClaw started on top of Pi. Its runtime docs say the built-in runtime is now @openclaw/agent-core, and that the legacy runtime id pi still maps to it. The README also thanks Pi's author, Mario Zechner. So two of our four robots are related.


3. Pi: the minimalist 🟢

GitHub logo earendil-works / pi

AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI

pi logo

Discord npm

New issues and PRs from new contributors are auto-closed by default. Maintainers review auto-closed issues daily. See CONTRIBUTING.md.

Pi

Pi is a minimal, extensible agent harness that you can make your own.

Adapt Pi to your workflows, not the other way around. Customize Pi with extensions, skills, prompt templates, and themes. Bundle them as Pi packages and share via npm or git.

Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way.

Use Pi interactively, automate it in print or JSON mode, control it over RPC, or build apps with the Pi TypeScript SDK. See OpenClaw for a real-world integration.

Getting started

Install the command-line interface:

curl -fsSL https://pi.dev/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

On Windows:

powershell -c "irm https://pi.dev/install.ps1 | iex"
Enter fullscreen mode Exit fullscreen mode

The…




Pi's README describes itself as a minimal, extensible harness that you adapt to your workflow. It deliberately ships without subagents and plan mode. If you want them, you ask Pi to build them or you install a package.

Pi architecture: pi-ai, pi-agent-core and pi-coding-agent stacked, four run modes, four default tools, a JSONL session tree

Code structure (npm workspaces monorepo):

packages/
  ai/            → @earendil-works/pi-ai          one API for many LLM providers
  agent/         → @earendil-works/pi-agent-core  agent loop, tool calling, state
  coding-agent/  → @earendil-works/pi-coding-agent  the `pi` CLI
  tui/           → terminal UI with differential rendering
  durable/ env/ mcp/ codemode/ schema/ telemetry/ chord/ …
apps/            → p2, p3 … experimental apps built on the same core
Enter fullscreen mode Exit fullscreen mode

What stands out:

  • Four default tools: read, write, edit and bash. The grep, find, ls and codemode tools exist in the source but only switch on through --tools or the defaultTools setting.
  • Sessions are a tree. Each turn goes into session.jsonl with id/parent pointers, so you can branch from any point. It's git for conversations.
  • Compaction is late and simple. In settings-defaults.ts, compaction reserves 16384 tokens and keeps the most recent 20000 verbatim. On a 200k model that triggers at about 184k, which matches Maarten's measurement.
  • Four ways to run it: interactive TUI, print/JSON mode for scripts, RPC, and a TypeScript SDK.
  • No built-in permission system. The README says plainly that Pi runs with your user's permissions. For isolation it suggests a Gondolin micro-VM extension, plain Docker, or OpenShell.

🧠 Mental model: Pi is a well-made kit of parts. It ships with good defaults and no opinions you can't remove.


4. DeepSeek Harness: the pegboard 🔵

GitHub logo deepseek-ai / deepseek-harness

DeepSeek Harness: Everything is a Plugin.

DeepSeek Harness

English | 中文

DeepSeek Harness (dsh) is an open-source agent harness developed by DeepSeek AI.

It is built on an everything-is-a-plugin architecture and powered by Cordis, whose design is described in A Programming Paradigm for Spatiotemporal Composability.

Documentation: https://deepseek-harness.github.io/deepseek-harness/

Developer preview

DeepSeek Harness is in developer preview and iterating rapidly. THERE WILL BE COMPATIBILITY-BREAKING CHANGES.

Review the safety notice before running the project.

Run

Run from npm

Install Node.js, then run:

npx @deepseek-ai/dsh web
Enter fullscreen mode Exit fullscreen mode

The command starts the Web UI at http://127.0.0.1:3080 by default and opens it in the default browser for a local launch. An SSH launch only prints the host URL because the SSH client or editor owns the local forwarded address. Pass --no-open to run the server without opening a browser. See Web UI guide.

Run from source

To run from a repository checkout:

git clone https://github.com/deepseek-ai/deepseek-harness.git
cd
…
Enter fullscreen mode Exit fullscreen mode

DeepSeek released dsh as a developer preview in August 2026, and the README warns in capitals that breaking changes are coming. Its big idea is in the citation title: Everything is a Plugin. It's built on Cordis, a JavaScript plugin framework where plugins contribute services, events and reversible effects to a shared context.

DeepSeek Harness: a pegboard of ctx.* plugin sockets, profile layers, shipped profiles and surfaces

From docs/architecture.md, every part of the product is a plugin: the model adapter, the tool registry, the session log, even the agent loop. There is no privileged core to patch. You extend dsh by mounting a plugin next to the others.

Package Owns ctx key
core/session append-only SessionEvent log ctx.sessions
core/system-prompt prompt sections + tool schemas ctx.systemPrompt
core/tools scoped registry + guarded execution ctx.tools
core/agent-loop the default turn driver ctx.agentLoop
llm/llm message/stream vocabulary + adapter seam ctx.llm

Profiles are stacked layers. A running dsh is a plugin tree built at boot. The profile's bundles come first, then cordis.patch.yml, then a home patch, then any --patch overlays. Each layer can replace a row from the layer below by its id. It ships with web, headless, sdk, sdk-minimal and acp profiles. Run dsh --profile web --dump-config to see exactly what your machine boots.

So swapping a model or an execution environment means writing a patch, not forking the repo:

Animated: a cordis.patch.yml swaps the LLM adapter and the sandbox plugin on the pegboard

# illustrative patch: replace two rows by id
- id: llm-adapter
  name: '@me/my-adapter'
- id: sandbox
  name: '@me/remote-box'
Enter fullscreen mode Exit fullscreen mode

Other things I found in packages/:

  • Subagent providers run in-process (fork or spawn), or hand work to Claude Code, Codex, ACP agents, or the dsh SDK.
  • Compaction is pluggable too: compaction-basic, a tool-result-pruner, and image-offload.
  • Sessions can persist to JSONL or SQLite. The rule is "model-visible means logged": every model request has to be reconstructable from the log.
  • Surfaces: a Web UI (npx @deepseek-ai/dsh web at 127.0.0.1:3080), an Electron desktop app, headless mode, a Python SDK, and ACP.

🧠 Mental model: dsh isn't really an agent. It's a set of sockets that an agent is assembled from.


5. Hermes Agent: the self-improver 🟡

GitHub logo NousResearch / hermes-agent

The agent that grows with you

Hermes Agent

Hermes Agent ☤

Hermes Agent | Hermes Desktop

Documentation Discord License: MIT Built by Nous Research 中文 اردو Español

The self-improving AI agent built by Nous Research. It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions. Run it on a $5 VPS, a GPU cluster, or serverless infrastructure that costs nearly nothing when idle. It's not tied to your laptop — talk to it from Telegram while it works on a cloud VM.

Use any model you want — Nous Portal, OpenRouter, OpenAI, your own endpoint, and many others. Switch with hermes model — no code changes, no lock-in.












A real terminal interface Full TUI with multiline editing, slash-command autocomplete, conversation history, interrupt-and-redirect, and streaming tool output.
Lives where you do Telegram, Discord, Slack, WhatsApp, Signal, and
…





Nous Research calls Hermes "the self-improving AI agent", and the README backs that up with a built-in learning loop. It's the only Python core of the four, with a TypeScript TUI and desktop app on top.

Hermes architecture: CLI, desktop, messaging gateway and cron feed a conversation loop with tools, skills, memory, subagents and six terminal backends

Code structure (per DeepWiki and the repo):

cli.py, hermes_cli/   → terminal entry points & config
gateway/              → Telegram, Discord, Slack, WhatsApp, Signal, Email…
agent/                → conversation loop, context compressor, background review
tools/                → file, terminal, browser, code execution, delegate_task…
skills/               → 44 bundled SKILL.md files
optional-skills/      → 141 more you can enable
cron/                 → natural-language scheduled jobs
Enter fullscreen mode Exit fullscreen mode

The learning loop. After a session with more than 10 tool calls, a background review agent creates or updates a skill. At turn 1 a skill costs only a tiny YAML header (about 30 tokens in Maarten's illustration), and the full body loads through skill_view when it's needed:

Animated: tool calls pass the 10-call line, a review agent writes SKILL.md and files it on the skills shelf

Memory is split in two: MEMORY.md holds environment and project facts, and USER.md holds your preferences. Past sessions sit in SQLite with FTS5 full-text search, so the agent can recall old conversations.

Hermes compacts earlier. In config_defaults.py the default compression threshold is 0.50 of the window. A newer guard in context_compressor.py raises that to 0.75 for models under 512k, because at 50% compaction kept firing every turn or two. So on a 200k model Hermes summarizes at about 150k and keeps a ~30k recent tail (target_ratio 0.20 × threshold). Pi waits until about 184k. Same idea, different timing:

Animated: Hermes compacts twice at 150k while Pi compacts once near 184k

Early compaction keeps each request cheaper and more focused. The cost is more summarization calls, and each one risks losing detail.

Runs anywhere: six built-in terminal backends (local, Docker, SSH, Modal, Daytona, Vercel Sandbox), plus parallel subagents through delegate_task.

🧠 Mental model: Hermes is a junior colleague who keeps notes and writes down how they solved things.


6. OpenClaw: the always-on assistant 🔴

GitHub logo openclaw / openclaw

The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

OpenClaw 🦞 — Your assistant, on your devices, in your chats

OpenClaw — EXFOLIATE! EXFOLIATE! Your AI assistant, running on your own devices.

CI status npm version Node.js version License: MIT Discord

OpenClaw is an open-source AI assistant that runs on your own computer and meets you in the channels you already use: Discord, iMessage, Slack, Teams, Telegram, WhatsApp, and 20+ more, plus native apps for macOS, iOS, Android, Windows, and Linux. One Gateway runs it as a personal claw on a laptop or as a shared multiplayer claw; configuration is the only difference.

Yours, with no catch. State, memory, and credentials live on your hardware. Models and agent harnesses (Claude, Codex, local models) are plugins you can swap without changing anything else. Your prompts go to the model provider and chat platforms you configure, plus any diagnostics export you enable yourself. OpenClaw is stewarded by the OpenClaw Foundation, an independent 501(c)(3), and has no paid tier, hosted service, or token. The architecture case — trusted gateway, untrusted execution…




OpenClaw is the biggest of the four by far. Its extensions/ folder alone has about 190 packages. The README pitches it as an assistant that runs on your own computer and meets you in the channels you already use.

OpenClaw architecture: channels on the left feed a central Gateway, clients and device nodes on the right, runtime, workspace files and plugins below

How it fits together (README + DeepWiki):

  • Gateway: a local control plane for sessions, tools, events and channel connections. Conversations are stored as SQLite transcripts.
  • Channels: WhatsApp, Telegram, Slack, Discord, Signal, iMessage, Teams and 20+ more. Maarten notes that personal DMs (Main session) are kept separate from group sessions for privacy.
  • Clients and nodes: a Control UI, CLI and TUI, plus native apps that add voice, canvas, camera and screen actions.
  • Workspace files: SOUL.md (personality), HEARTBEAT.md (what to check), MEMORY.md and daily logs.

It wakes itself up. The heartbeat runs the agent on a schedule. It reads HEARTBEAT.md and replies NO_REPLY unless something actually needs you. At night, "dreaming" runs Light, Deep and REM passes over the day's logs and promotes durable facts into MEMORY.md:

Animated: OpenClaw's clock ticks, the robot wakes, reads HEARTBEAT.md, stays silent twice, sends one reminder, then dreams at night

⚠️ Note on current main: the heartbeat is now a "Proactive check" automation that a fresh setup creates disabled. Once you enable it with openclaw automations enable <id>, it runs every 30 minutes by default (docs/gateway/heartbeat.md).

Memory retrieval is hybrid. Per Maarten's teardown, scores are 0.7 dense vector plus 0.3 BM25, with a 30-day recency decay and MMR re-ranking. Before compaction, OpenClaw runs a memory flush so important facts get saved before old turns are summarized away.

Security posture: the README says to treat inbound messages as untrusted. Unknown DM senders have to be paired first, and tools run on the host for the main session unless you configure sandboxing.

🧠 Mental model: OpenClaw is a butler who lives in your house, answers every phone, and checks the calendar every half hour.


7. Side by side

Comparison matrix of the four harnesses across ten design questions

A few patterns jump out:

  1. Opinion gradient. Pi ships the fewest opinions, dsh makes every opinion swappable, Hermes adds opinions about learning, and OpenClaw adds opinions about your whole digital life.
  2. Memory gets more autonomous as you go. Pi's AGENTS.md is edited by you. Hermes edits its own MEMORY.md/USER.md. OpenClaw edits its memory while you sleep.
  3. Compaction timing is a product decision. There's no single right threshold. Late (Pi) keeps more raw context, early (Hermes) keeps requests lean, and OpenClaw flushes memory first.
  4. Sessions as data structures: a JSONL tree (Pi), an append-only event log (dsh), SQLite with search (Hermes), SQLite transcripts (OpenClaw). Each choice explains a feature: branching, replay, recall, multi-channel.

8. So which robot should you hire?

Decision flowchart: coding vs not, own every part vs swap anything, learn from use vs always on

  • Pi if you want a sharp, hackable coding agent and you're happy to add features yourself.
  • DeepSeek Harness if you're building agents and want to replace any layer without forking. It's still a preview, so expect breaking changes.
  • Hermes Agent if you want one agent across terminal and chat that gets better at your recurring tasks.
  • OpenClaw if you want an always-on personal assistant across many channels and devices, and you're ready to think about its security.

Whichever you pick, read its system prompt, compaction threshold and memory files before you trust it with real work. Those three settings shape the agent more than the model name does.


Sources & further reading

Top comments (2)

Collapse
 
sameer_mohsin_7387d82b7bf profile image
Sameer mohsin •

Thanks sir

Collapse
 
princejain756 profile image
Prince Jain •

The compaction timing contrast between Hermes and Pi matches what I keep hitting in practice, especially once you count what sits in the prompt before turn 1. On paper a 30-token YAML skill header looks free, so I ignored mine for months until I finally measured my own workstation config and found 1,002 skill headers eating 51,940 tokens by themselves (127,415 tokens total once probed MCP tool schemas and AGENTS.md were included). With that much static overhead already occupying a 200k window, a 0.50 compression threshold starts compacting almost immediately, which explains why Hermes had to bump the guard to 0.75 under 512k and why Pi's 4-tool default feels much calmer on long coding sessions. When you dug through dsh's core/system-prompt package, did you notice any lazy schema loading for mounted plugins, or do active plugins inject their full tool definitions on turn 1?