---
title: Agent Harnesses
category: concepts
created: 2025-01-05
updated: 2025-01-05
tags: [agent-harnesses, agent-memory, scaffolding, tool-use, claude-code, codex, deep-agents, letta-code, context-engineering, vendor-lock-in]
sources: [raw/articles/Your harness, your memory 1.md]
confidence: high
---
# Agent Harnesses
An **agent harness** is the system (scaffolding) that surrounds an LLM to orchestrate its interaction with tools and data sources. Since an agent is by definition an LLM interacting with tools, there is always a harness — the open question is who owns it and how transparent it is. Harnesses are the dominant way to build agents and are intimately tied to [agent-memory](/concepts/agent-memory).
## Evolution of scaffolding (per harrison-chase)
1. **2023 — RAG chains**: simple retrieval pipelines (e.g. early [langchain](/cheatsheets/langchain)).
2. **More capable models — graph flows**: more complex orchestration (e.g. LangGraph).
3. **Today — agent harnesses**: full scaffolding around strong models.
The claim that "models will absorb the scaffolding" is a misread. The *2023* scaffolding became unnecessary, but it was replaced by new scaffolding. Evidence: the leaked **Claude Code** source was ~512k lines of code — that code *is* the harness. Even frontier-model makers invest heavily in harnesses. Built-in capabilities like web search in OpenAI/Anthropic APIs are not "part of the model" — they are a lightweight harness behind the API orchestrating tool calls.
## Examples of agent harnesses
- [claude-code](/concepts/claude-code) (Anthropic; not open source)
- [deep-agents](/concepts/deep-agents) ([langchain](/cheatsheets/langchain), open source)
- **Pi** — powers **OpenClaw**
- **OpenCode**
- **Codex** (OpenAI; open source, but emits an encrypted compaction summary unusable outside OpenAI)
- Letta Code (letta)
## Harness ↔ memory coupling
The harness manages both short-term memory (conversation, tool results) and long-term/cross-session memory. Therefore **owning your harness is a prerequisite to owning your memory**. Closed harnesses create [vendor-lock-in](/concepts/vendor-lock-in):
- **Mildly bad**: stateful APIs (OpenAI Responses API, Anthropic server-side compaction) store state on the provider's servers — can't swap models and resume threads.
- **Bad**: closed harnesses (e.g. Claude Agent SDK, built on Claude Code) interact with memory opaquely — artifacts are non-transferable.
- **Worst**: full harness *including long-term memory* behind an API (e.g. Anthropic's **Claude Managed Agents**) — zero ownership or visibility into memory.
## See also
- [agent-memory](/concepts/agent-memory)
- [memory-ownership](/concepts/memory-ownership)
- [vendor-lock-in](/concepts/vendor-lock-in)
- [deep-agents](/concepts/deep-agents)
- [tool-use](/concepts/tool-use)
- harrison-chase