Agent Harnesses Decoded: Pi, OpenCode, Hermes, and OpenClaw Compared
Choosing an agent harness can change an LLM's behavior more than choosing the model itself, and this comparison gives developers a concrete map of the trade-offs: from lightweight terminal tools to always-on personal assistants, the architecture around the model determines what the agent can actually do.
Putting the same LLM into different agent harnesses produces wildly different agents, and a new illustrated guide by Maarten Grootendorst maps out exactly why. The guide walks through five frameworks: TinyAgent, a 600-line teaching harness; Pi, a minimal terminal-first harness with compaction and steering; OpenCode, a client-server harness with SQLite persistence and subagents; Hermes, a personal-assistant layer with self-learning skills; and OpenClaw, the largest, with 30+ chat channels, a heartbeat, and nightly dreaming.
Key design decisions differ sharply. Pi compacts context at 184k tokens and stores sessions in branchable JSONL. OpenCode adds an HTTP server and a Code Mode for scripted tool calls. Hermes separates MEMORY.md and USER.md, keeps a skill index, and runs a review agent to distill reusable skills after sessions. OpenClaw flushes memory to disk before compaction, uses hybrid retrieval with BM25 and embeddings, and runs a three-stage nightly dream to promote daily notes into long-term memory.
The guide argues that the harness matters as much as the model choice: the same LLM behaves completely differently depending on memory, tooling, and session handling. It also highlights a common thread: every framework still runs the same ReAct reasoning loop underneath.
Every production harness, no matter how complex, still uses the ReAct loop at its core; the differences are all in memory, tooling, and persistence.
OpenCode's Plan Mode shows that a simple permission restriction can replace a dedicated planning system as models get stronger.
Hermes's skill learning blends Voyager's growing skill library with Reflexion's self-reflection, making the agent better over time.
OpenClaw's heartbeat and dreaming mimic human sleep and proactive checking, turning an agent from a reactive tool into an always-on assistant.
The token consumption at session start reveals design philosophy: Hermes spends on tool schemas, while OpenClaw spends on workspace files and rules.