Developers often build agents that function in environments like Claude Code or Codex, only to find the logic breaks when they rebuild the loop. The Strands Agents team at AWS has released Strands Harness to address this gap. It is a general-purpose agent harness that runs locally or deploys to a cloud provider. The software ships for Python and TypeScript under Apache 2.0 and starts with a single line of code. The team reports 28% lower cost than other harnesses running the same Claude or GPT models across six benchmarks, with near-equal accuracy.
In this article
The software runs locally, and a bundled skills file helps your coding agent generate deployment config for AWS, GCP, Azure, Cloudflare, and Modal.
What is Strands Harness
A harness is the system around the model: the loop, tools, context handling, memory, and recovery. Strands already exposed those building blocks through the Strands Harness SDK. Strands Harness packages them into working defaults. It is built as a general-purpose agent, not a coding agent.
Out of the box, create_harness() returns an agent that:
- Runs on a current reasoning model through Amazon Bedrock, Anthropic, OpenAI, Google, Ollama, or LiteLLM.
- Ships shell, file (read, write, edit), and web tools, instead of a bespoke tool per task.
- Offloads bulky tool results to files and caches reused parts of each request.
- Keeps long-term memory across runs and resumes a conversation from a session ID.
- Delegates open-ended subtasks to a built-in helper agent and tracks multi-step work with a checklist.
- Loads Agent Skills when it finds them.
Benchmark setup and the 28% figure
The Strands Agents team ran distributed benchmarking on Amazon EC2 with Harbor, the evaluation framework from the Terminal-Bench creators. The score is the average across six benchmarks: ALFWorld, ContextBench, GAIA, WebShop, τ²-bench, and Terminal-Bench 2.1. Cost is the average dollars per task. Rivals on the chart are Claude Code, Codex, oh-my-pi, OpenCode, and DeepSeek Harness.
DeepSeek Harness was the most token-efficient harness overall, running about 14% cheaper than Strands Harness. It also scored lower on every benchmark. The chart footnote states that including it brought the overall savings figure down to 28%. The highest-scoring point on the chart is Claude Opus 5 on Strands Harness, near 85%.
Terminal-Bench 2.1: Same model, five harnesses
The clearest head-to-head uses Claude Fable 5 on Terminal-Bench 2.1, with 89 trials per harness.
| Harness | Run cost | Accuracy |
|---|---|---|
| Strands Harness | $56.29 | 69.7 |
| Oh-my-pi | $86.83 | 69.7 |
| OpenCode | $73.42 | 66.3 |
| Claude Code | $248.05 | 61.8 |
| DeepSeek Harness | $40.30 | 59.5 |
Against Claude Code, Strands Harness cost 77% less and scored 7.9 points higher. Oh-my-pi matched its 69.7 accuracy at 54% higher cost. DeepSeek Harness was cheaper still, but trailed by 10.2 points. The team also noted that two other open-source harnesses performed well on cost and accuracy against Claude Code.
What drives the efficiency
Strands Harness ships defaults for prompt caching and context management. The team says context management largely drove both token efficiency and accuracy. Three rules do the work:
- Tool results over about 1,500 tokens get truncated.
- Summarization (compaction) triggers when context usage passes 85%.
- Context recovery runs inside the loop if the window overflows.
This matches recent independent research. The HarnessTax study compared Claude Code, Codex CLI, and Pi across seven models. It found harness choice barely moved success rates, while the same model reached similar success at up to 5x the cost. The Strands researchers say a follow-up paper on their benchmarks is coming.
Getting started
Install with pip install strands-harness or npm install @strands-agents/harness. Pick a model by name, or point the harness at a local Ollama model:
from strands_harness import create_harness
agent = create_harness(model="litellm/openai/gpt-5.6-sol")
agent("Research the top three vector databases and compare their pricing")The Strands CLI (npm install @strands-agents/strands-cli) lets you prototype an agent in plain English. In the team’s demo, the agent was asked to add the Playwright MCP server and measure video load latency on a blog post. Running /export then produced the Harness code, with the Playwright MCP included, as a Python or TypeScript zip.
The CLI itself is built on Strands Harness. Strands engineer Gautam Sirdeshmukh also used it to build a desktop app that starts Strands Harness runs remotely.
Customisation goes deep. You can override any default, swap models, add tools, or replace components down to the Strands Harness SDK. Because the Harness is a library dependency, the agent prototyped on a laptop is the same one embedded in production.
What it means
Developers can now move from local prototyping to production without rewriting the agent loop. The software handles memory, tool execution, and context limits automatically, which reduces token spend while maintaining performance.




