Key points
1. What is an Agent Harness?
Citing Addy Osmani's framing — *Agent = Model + Harness* — the harness is everything outside the model: the agent loop (gather context → act → verify → repeat), tool schemas and execution, context management (history trimming, compaction, sub-agents), permission/sandbox layers, extension mechanisms (MCP, hooks, skills), and recoverability (session persistence, deterministic replay). Layering: Model → Harness (runs one agent) → Framework (composes agents) → Platform.
2. Ecosystem landscape
- The TS/Claude Code camp (Claude Code, OpenCode, Pi, Goose) sells finished terminal products; the Python camp (OpenHands, mini-swe-agent, smolagents, Pydantic AI, AgentScope) sells a programmable execution layer plus reproducible evaluation.
- The 2023 generation of "code generator" agents collapsed: gpt-engineer archived, GPT Pilot unmaintained (and hit by a supply-chain worm in 2025-08), Open Interpreter's Python version dead, aider near-dormant. The lesson: without a tool loop, permission system, context engineering, and sub-agents, a project is out.
- Current Python leaders (as of 2026-09): OpenHands (86k stars), AgentScope 2.0 (30.6k, most active), smolagents (29.1k), OpenAI Agents SDK (29.2k), Pydantic AI (19.7k), mini-swe-agent (6.9k), SWE-agent (20.2k, maintenance mode). Letta has left Python for TypeScript.
- OpenHands (software-agent-sdk): The most production-engineered harness. Event sourcing with immutable events, stateless serializable agents, deterministic replay and checkpoint recovery, SecurityAnalyzer + confirmation policies, Condenser for context compression (~2x cost reduction), MCP as first-class citizen (with OAuth), Docker/K8s sandboxing. SWE-bench Verified 72.8–77.6%. Weakness: repo fragmentation and positioning drift.
- mini-swe-agent: Princeton's minimalist rebellion (~100-line core). Radical choices: no tools except bash, no stateful shell sessions (each step is a fresh
subprocess.run), no compression — context grows linearly. Message history exactly matches LM input, making it ideal for fine-tuning/RL data. SWE-bench Verified 76.8% with Claude Opus 4.5 — matching or beating far more complex harnesses. - SWE-agent: Founded the ACI (Agent-Computer Interface) methodology — interface design is prompt design (100-line file viewers, linter-rejecting edits, minimal search output). Officially superseded by mini-swe-agent.
- AgentScope 2.0 (Alibaba): The closest thing to "open-source Claude Code" — built-in Bash/Grep/Glob/Read/Write/Edit tools, interruption/resume, fine-grained permissions + HITL, six-layer middleware, eight sandbox backends, MCP Skill Hub, terminal console.
- Pydantic AI 2 + pydantic-ai-harness: Type-safe agents plus a novel capability primitive (bundled instructions/tools/hooks, deferred loading like Skills). Official harness ships a
Coder()with path-traversal-protected filesystem, command-whitelisted shell, and context controls. Unique durability: officially maintained Temporal/DBOS/Prefect integrations. - smolagents (HuggingFace): CodeAct pioneer — the LLM writes Python as its action instead of JSON tool calls (up to ~20% accuracy gain per arXiv:2402.01030). No persistence or memory; slow to iterate lately.
- OpenAI Agents SDK: Platform-bound SDK that began harness-izing in 2026-04 with Sandbox agents for long-horizon coding tasks.
- Tool systems are converging on code-as-action: JSON tool calling (mainstream), CodeAct/code-as-action (smolagents, OpenHands, Pydantic AI Code Mode — even Anthropic endorses the approach), and bash-only minimalism (mini-swe-agent).
- Four context-management schools: compressors (OpenHands Condenser), automatic compaction (AgentScope), explicit user-controlled history processors (Pydantic AI), and no compression at all (mini-swe-agent). "Harness-as-plugin" patterns like planning-with-files show context engineering decoupling into portable modules.
- Sandboxing ranges from most complete (AgentScope's eight backends, OpenHands security policies) to minimal-but-sufficient (mini-swe-agent's docker exec swap).
- OpenHands: https://github.com/OpenHands/software-agent-sdk · arXiv:2511.03690
- mini-swe-agent: https://github.com/swe-agent/mini-swe-agent · SWE-agent ACI paper: arXiv:2405.15793
- AgentScope: https://github.com/agentscope-ai/agentscope · Pydantic AI v2: https://pydantic.dev/articles/pydantic-ai-v2
- smolagents CodeAct paper: arXiv:2402.01030 · OpenAI Agents SDK: https://github.com/openai/openai-agents-python
- HAL: https://hal.cs.princeton.edu/ · Scaffold Effect paper: https://arxiv.org/html/2607.22585v1
3. Core project profiles
4. Architecture comparison
5. The harness itself is the biggest performance variable
The same model scores 5–30 percentage points differently across harnesses (e.g., OpenHands-SDK 69% vs Goose/OpenCode 38% on identical models; Terminal-Bench 2.0 rankings shift by 25 places). SWE-bench Verified scores are 99/100 self-reported. Princeton's HAL (Holistic Agent Leaderboard) addresses this. Implication: always ask which harness produced a benchmark number; harness engineering may yield more than model swaps.
6. Selection guidance
Six dimensions: form factor, model coupling, context-engineering control, durability, security model, evaluability. Scenario picks: learn/extend → mini-swe-agent; production product → OpenHands SDK or AgentScope 2.0; enterprise durability → Pydantic AI 2; prototyping → smolagents; RL/fine-tuning loops → mini-swe-agent; GUI automation → Agent-S. Rules of thumb: compare assumptions, not feature lists; plan in 18-month horizons; sandbox/permissions/audit rules outlive model-specific logic like compaction.
7. Three trend predictions
1. Convergence on code-as-action, eroding JSON tool calling's dominance. 2. Harness thinning (stronger models need thinner loops) coexisting with on-demand capability loading (skills/deferred capabilities). 3. Python's niche is evaluation, training, and SDK infrastructure — contested, but OpenHands SDK, AgentScope 2.0, and Pydantic AI suggest the real Python harness war is just beginning.