Sharpen README: when to use Harness, and for what

Removes the standalone comparison.md (analysis kept locally only) and
folds its key positioning insights into the README without naming
specific competitors.

Why-Harness section:
- Reframes the substrate-vs-DSL distinction more directly: the
  runtime is treated as strategic infrastructure you own, not as
  plumbing hidden behind a graph builder.
- Capitalises 'Harness' in prose to match the project name.

New 'What Harness is for' section enumerates the use cases the
runtime is shaped around:
  - coding agents
  - infrastructure-automation agents
  - long-running autonomous loops
  - local-first agents
  - tool-heavy agents
  - developer-tooling agents
Plus a one-paragraph note on why Go's operational profile (static
binary, low memory, native concurrency, embeddability) matters
for these.

New 'When Harness is the wrong fit' section names the workflow
shapes the package isn't optimised for — visual / declarative
workflows, role-based crews, RAG-first products, notebook research,
heavily-regulated enterprise orchestration — without naming any
competing framework.

The existing 'Non-goals' section still covers what the library
doesn't ship (CLI, UI, channel adapters, etc.); the two sections
serve adjacent purposes.
This commit is contained in:
sausheong committed 2026-05-08 15:06:24 +08:00
1 parent 4df84b76d0
commit cc0406d30c
3 files changed
+69 -415

No files matched your search

+1 -2
View File
@@ -1,8 +1,7 @@
# Documentation: only root README.md, developer.md, comparison.md, and example KB packs are tracked
# Documentation: only root README.md, developer.md, and example KB packs are tracked
*.md
!/README.md
!/developer.md
!/comparison.md
!/examples/*/kb/
!/examples/*/kb/*.md
+68 -13
View File
@@ -8,20 +8,78 @@ concrete tools, BYO provider clients, BYO memory/knowledge-graph plugins.
> **Status: v0.1.0.** First tagged release. The `runtime` API
> surface may still shift in the v0.x line — pin your version.
## Why harness
## Why Harness
If you're building an LLM agent in Go and you find yourself writing
the same things over and over — a streaming think-act loop, parallel
tool dispatch, prompt-cache-stable request building, summarize-and-
splice context compaction, JSONL session storage, MCP-server glue —
that's what harness is. It's the substrate. You bring the tools, the
prompts, and the binary; it brings the loop.
If you're building an LLM agent in Go, you'll find yourself rewriting
the same substrate over and over: a streaming think-act loop,
parallel tool dispatch, prompt-cache-stable request building,
summarize-and-splice context compaction, JSONL session storage,
MCP-server glue. **That substrate is what Harness is.**
It is **not** a CLI, a UI, an agent product, or a framework with
It treats the runtime — the orchestration / context / execution
layer — as the strategic infrastructure, not as plumbing to be
hidden behind a DSL or a graph builder. You own the loop you ship.
You can read every line.
It is **not** a CLI, a UI, a hosted runtime, or a framework with
opinions about how your agents should be deployed. There is no
`harness` binary. You import packages, compose a `Runtime`, and call
`rt.Run(ctx, msg, nil)`.
## What Harness is for
Harness is well-suited to:
- **Coding agents** — terminal-integrated, IDE-adjacent, or
repo-rooted assistants that read and write files, run shells, and
call tools across many turns.
- **Infrastructure-automation agents** — agents that drive cloud
APIs, internal tooling, or operational workflows where Go's
deployment story (static binary, low memory, embeddable in
existing services) is a real win.
- **Long-running autonomous loops** — daemons, cron-driven runners,
multi-day tasks. The streaming loop, compaction, and JSONL
session resume cover the substrate.
- **Local-first agents** — anything that needs to ship as a single
binary, run without a Python interpreter, or embed inside another
Go service.
- **Tool-heavy agents** — agents whose value comes from many tools
(custom + MCP servers + skills), not from elaborate workflow
logic.
- **Developer-tooling agents** — internal CLIs, build assistants,
code-review bots, log-triage agents — where a small dependency
tree and predictable runtime matter.
The operational profile of Go matters here: static binaries,
low memory footprint, native concurrency primitives, and the
ability to embed the agent inside a service you already own. Harness
leans into all of these.
## When Harness is the wrong fit
Harness deliberately doesn't try to be a graph orchestrator, a
multi-role agent crew, a RAG-first knowledge platform, or a
notebook-style experimentation toolkit. If your problem is one of
these, you'll be fighting the grain:
- **Visual or declarative workflows** — agents whose value comes
from inspectable graphs of explicit steps with branching, joins,
checkpointing, and human-in-the-loop pauses.
- **Role-based multi-agent crews** — "researcher / writer /
reviewer" decompositions where the framework's main value is
coordinating personas.
- **RAG-first products** — anything where the bulk of the work is
document ingest, chunking, embedding, indexing, and retrieval.
Harness has no opinion about your knowledge layer.
- **Notebook / research workflows** — fast iteration in a Python
notebook with the latest open-source ML libraries arriving daily.
- **Heavily regulated enterprise orchestration** — workflows that
need replayability, RBAC, governance dashboards, and visual
compliance views as first-class.
You can build any of these on top of Harness, but you'd be writing
a lot. The package is optimized for the use cases above, not these.
## Requirements
- **Go 1.25.1 or newer.** The module declares `go 1.25.1` and uses
@@ -252,11 +310,8 @@ Deliberately not in scope (numbers from the same conceptual list):
Adding a fifth is implementing `llm.Provider` (~300 LOC).
See [`developer.md`](./developer.md) for a step-by-step guide to
building agents on top of harness, including diagrams of the
composition surface and the per-Run loop. See
[`comparison.md`](./comparison.md) for how Harness compares with
LangGraph, CrewAI, AutoGen, Semantic Kernel, OpenAI / Claude Agent
SDKs, eino, and the rest of the agent-framework landscape.
building agents on top of Harness, including diagrams of the
composition surface and the per-Run loop.
## Non-goals
-400
View File
@@ -1,400 +0,0 @@
# How Harness compares with other agent frameworks
This document compares Harness's architectural approach against the
major agent frameworks and runtimes currently shaping the ecosystem:
LangGraph, CrewAI, AutoGen/AG2, Semantic Kernel, OpenAI Agents SDK,
Claude Agent SDK, LlamaIndex agents, Mastra, and related orchestration
systems.
## The short version
Harness occupies a somewhat unusual position in the ecosystem. It is
not primarily a "workflow DSL framework" like LangGraph, nor a
"role-play orchestration framework" like CrewAI, nor a
"conversation-as-computation framework" like AutoGen. It is closer to
a lightweight, programmable agent runtime and harness layer written
in Go, with strong emphasis on composability, execution control,
portability, and developer ownership of the orchestration substrate
itself.
That distinction matters.
Most popular agent frameworks today are Python-first and increasingly
converge toward graph-based orchestration abstractions. Harness
instead feels closer philosophically to:
- an application runtime,
- a systems programming toolkit,
- and an execution harness for agent loops.
This makes it more comparable to the underlying architectural layer
beneath systems like Claude Code or OpenClaw than to higher-level
"business workflow" agent frameworks.
## The landscape today
| Framework / Platform | Core abstraction | Primary language | Design center |
|---|---|---|---|
| LangGraph | Stateful graph / workflow | Python | Explicit orchestration and durable execution |
| CrewAI | Teams and roles | Python | Multi-agent collaboration |
| AutoGen / AG2 | Conversational agents | Python | Agent-to-agent dialogue |
| Semantic Kernel | Plugins + planners | C# / Python | Enterprise integration |
| OpenAI Agents SDK | Thin agent runtime | Python / TS | Simplicity around the OpenAI ecosystem |
| LlamaIndex Agents | Retrieval-centric agents | Python | RAG and knowledge workflows |
| Claude Agent SDK | Tool-using coding / runtime agents | TS / Python | Anthropic-native agent execution |
| **Harness** | **Agent execution harness / runtime** | **Go** | **Systems-level control and ownership** |
### Current GitHub stats (as of 2026-05-08)
| Project | Stars | Last push | Description |
|---|---:|---|---|
| `microsoft/autogen` | 57.8k | 2026-04-15 | Programming framework for agentic AI |
| `crewAIInc/crewAI` | 50.9k | 2026-05-07 | Role-playing autonomous AI agents |
| `run-llama/llama_index` | 49.2k | 2026-05-07 | Document agent + OCR platform |
| `langchain-ai/langgraph` | 31.5k | 2026-05-08 | Resilient language agents as graphs |
| `openai/openai-agents-python` | 26.0k | 2026-05-08 | Lightweight multi-agent workflows |
| `mastra-ai/mastra` | 23.7k | 2026-05-08 | TS framework for AI-powered apps |
| `letta-ai/letta` | 22.5k | 2026-04-12 | Stateful agents with advanced memory |
| `google/adk-python` | 19.5k | 2026-05-08 | Google's Agent Development Kit |
| `pydantic/pydantic-ai` | 16.9k | 2026-05-08 | Type-safe agents the Pydantic way |
| `cloudwego/eino` | 11.1k | 2026-05-08 | Go LLM/AI app development framework |
| `tmc/langchaingo` | 9.2k | 2026-01-11 | LangChain port to Go |
| `mark3labs/mcp-go` | 8.7k | 2026-05-07 | Go MCP implementation |
| `anthropics/claude-agent-sdk-python` | 6.7k | 2026-05-08 | Anthropic's official agent SDK |
| `modelcontextprotocol/go-sdk` | 4.5k | 2026-05-07 | Official Go MCP SDK (used by Harness) |
| **`sausheong/harness`** | new | 2026-05-08 | Go agent harness — this project |
## The core differentiator
The biggest differentiator is probably this:
> **Harness is built around the idea that the "harness" itself is the
> product.**
That aligns with the broader trend now emerging in agent engineering
where sophisticated teams increasingly see:
- prompts as replaceable,
- models as interchangeable,
- but the orchestration / runtime / context layer as strategic
infrastructure.
Several industry analyses now explicitly discuss "agent harnesses" as
the core production layer. Harness is unusually aligned with that
direction compared to many mainstream frameworks.
## Harness vs LangGraph
LangGraph's worldview is graph-centric:
- nodes,
- edges,
- state transitions,
- checkpointing,
- explicit flow control.
It is essentially a deterministic workflow engine augmented with LLM
calls.
Harness is more runtime-centric:
- agent loop,
- tools,
- execution context,
- memory,
- orchestration primitives,
- iterative control,
- direct programming model.
That makes Harness less visually declarative but more operationally
flexible.
In practice:
- **LangGraph** excels when you want inspectable workflows,
compliance-friendly orchestration, branching logic, resumability,
and deterministic execution.
- **Harness** excels when you want deeply programmable autonomous
loops and tight control over execution behavior.
This is similar to the difference between a Kubernetes workflow
engine vs. writing a custom distributed runtime.
## Harness vs CrewAI
CrewAI models agents as organizational roles:
- researcher,
- writer,
- reviewer,
- planner,
- coordinator.
It is intentionally high-level and optimized for rapid assembly of
collaborative multi-agent systems.
Harness is substantially lower-level and more infrastructural.
CrewAI gives:
- fast prototyping,
- approachable abstractions,
- less boilerplate,
- stronger business-process metaphors.
Harness gives:
- deeper runtime control,
- stronger composability,
- less abstraction leakage,
- potentially better operational transparency.
This means Harness likely scales better for:
- coding agents,
- system agents,
- long-running execution loops,
- terminal-integrated agents,
- infrastructure automation,
- embedded agent runtimes,
- and highly customized execution environments.
## Harness vs AutoGen / AG2
AutoGen's core abstraction is **conversation**. Agents communicate
through messages, often recursively.
Harness is more **action-loop-oriented**:
- perceive,
- reason,
- act,
- observe,
- repeat.
This matters operationally because conversational architectures
often become:
- verbose,
- token-heavy,
- difficult to constrain,
- and harder to debug at scale.
Harness's approach is likely more efficient for coding agents and
tool-heavy agents because the orchestration is procedural rather
than socially simulated.
This is an important distinction in 2026: many teams are moving
away from "agent societies" toward:
- compact execution loops,
- deterministic tool invocation,
- tighter context management,
- bounded autonomy.
Harness fits that newer pattern more closely.
## Harness vs Semantic Kernel
Semantic Kernel is the closest comparison in one specific dimension:
both think somewhat like systems frameworks rather than research
frameworks.
Semantic Kernel emphasizes:
- plugins,
- planners,
- enterprise interoperability,
- structured execution,
- dependency injection,
- typed interfaces.
Harness similarly appears designed by someone thinking about:
- runtime architecture,
- execution semantics,
- composable components,
- operational ownership.
But Semantic Kernel is fundamentally **enterprise platform
infrastructure inside the Microsoft ecosystem**.
Harness is closer to:
- hacker-native,
- runtime-native,
- local-first,
- agent-loop-native infrastructure.
## The language choice
Most modern frameworks are Python-first because:
- Python dominates AI tooling,
- libraries arrive there first,
- experimentation is faster.
Harness being in Go changes the operational profile substantially.
**Advantages:**
- simpler deployment,
- static binaries,
- lower memory footprint,
- stronger concurrency primitives,
- better operational predictability,
- easier embedding,
- easier cross-platform shipping,
- less dependency chaos,
- better long-running reliability.
**Disadvantages:**
- smaller ecosystem,
- fewer AI-native libraries,
- less community momentum,
- slower access to cutting-edge research tooling,
- fewer pretrained integrations.
This means Harness is likely stronger for:
- production runtimes,
- infrastructure agents,
- terminal agents,
- local agents,
- developer tooling,
- embedded systems,
- enterprise deployment.
But weaker for:
- rapid experimentation,
- academic workflows,
- notebook-centric research,
- and bleeding-edge ML integration.
## Abstraction philosophy
Most frameworks today add increasingly elaborate abstractions:
- planners,
- crews,
- graphs,
- role systems,
- memory hierarchies,
- declarative orchestration,
- event buses.
Harness is comparatively minimal and explicit.
That matters because the ecosystem is currently experiencing
**abstraction fatigue**.
Many teams are discovering:
- frameworks become constraining,
- hidden orchestration becomes difficult to debug,
- "magic" abstractions create production instability.
The industry trend is gradually shifting toward:
- thinner frameworks,
- explicit orchestration,
- agent runtimes instead of agent DSLs,
- ownership of execution semantics.
Harness aligns unusually well with that direction.
## The closer cousins: coding-agent runtimes
There is a notable resemblance between Harness and the emerging
"coding agent runtime" category:
- Claude Code internals,
- OpenClaw,
- OpenHands / OpenDevin runtime layers,
- terminal-native agent harnesses,
- execution-loop shells.
In that sense, Harness may actually be competing less with
LangGraph and more with:
- the substrate beneath coding agents,
- local execution runtimes,
- and autonomous execution environments.
That is strategically interesting because coding agents increasingly
need:
- filesystem control,
- shell orchestration,
- tool multiplexing,
- checkpointing,
- context engineering,
- long-lived execution,
- and recoverability.
Traditional "workflow agent frameworks" are often poor fits for
those needs.
## Where Harness is the right pick
- Coding agents
- Terminal-native agents
- Local-first agents
- Infrastructure automation
- Long-running autonomous loops
- Tool-heavy agent systems
- Systems-level orchestration
- Multi-agent runtimes where coordination is procedural rather than
conversational
- Embedded agent execution
- Developer-centric agent platforms
Conceptually, Harness sits closest to:
- OpenClaw's runtime philosophy,
- Claude Code-style harnesses,
- lightweight autonomous execution runtimes,
- and programmable agent substrates.
Not to:
- BPMN-style orchestration systems,
- low-code agent builders,
- or research-oriented multi-agent simulators.
## Where Harness is the wrong pick
These are not bugs in Harness — they're the cost of staying minimal
and Go-native:
1. **Ecosystem gravity.** Python dominates AI orchestration today.
That affects integrations, examples, tutorials, community
tooling, observability vendors, and hosted platforms.
2. **Missing enterprise layers.** Compared to LangGraph or Semantic
Kernel, things like observability, governance, HITL tooling,
policy enforcement, deployment tooling, evaluation harnesses,
tracing, RBAC, and managed execution may require more custom
implementation.
3. **Smaller conceptual ecosystem.** CrewAI and LangGraph now have
large mental-model ecosystems with tutorials, design patterns,
and community recipes. Harness is currently more
expert-oriented.
4. **Less declarative orchestration.** For highly regulated
enterprise workflows, explicit graphs, deterministic execution,
visual flows, and replayability are increasingly important.
Harness may need additional layers for this.
## The strategic observation
Most current frameworks optimize for building **agents**.
Harness appears to optimize for **owning the runtime in which agents
execute**.
That distinction is becoming increasingly important as the ecosystem
matures.