# Strands Harness: AWS’s New General-Purpose Agent Framework Delivers Major Cost Savings Without Sacrificing Accuracy
## The Problem It Solves
Developers often build a working AI agent inside established environments like Claude Code or Codex, only to face significant challenges when they try to recreate that agent using their own custom loop. The gap between “it works in a hosted environment” and “it works reliably in production” has been a persistent friction point in the agent development world.
A team at AWS has set out to close that gap with a new offering called **Strands Harness** — a fully assembled, general-purpose agent framework that handles the complexity of building an agent loop so developers don’t have to. It runs locally or deploys to cloud infrastructure, supports both Python and TypeScript, is open source under the Apache 2.0 license, and can be up and running with a single line of code.
—
## What Is Strands Harness?
At its core, a harness is the infrastructure surrounding a language model: the execution loop, the tools the agent can call, how it manages context and memory, and how it recovers from failures. AWS’s Strands project had already exposed these components individually through the Strands Harness SDK. Strands Harness packages all of those building blocks into a ready-to-use default configuration.
Unlike tools built specifically for coding tasks, Strands Harness is designed as a general-purpose agent framework. Out of the box, calling `create_harness()` gives you an agent with the following capabilities:
– **Model flexibility**: It works with current reasoning models through Amazon Bedrock, Anthropic’s API, OpenAI, Google’s Gemini, Ollama for local models, or LiteLLM as a unified interface.
– **Built-in tools**: Shell execution, file operations (read, write, edit), and web browsing are included as standard tools — rather than requiring custom tooling for each specific task.
– **Context optimization**: Bulky tool outputs get offloaded to files, and reused portions of requests are cached to avoid redundant token usage.
– **Persistent memory**: Conversations carry over across runs using session IDs, enabling long-term continuity.
– **Subagent delegation**: Open-ended subtasks can be handed off to a built-in helper agent, with multi-step work tracked via a checklist mechanism.
– **Agent Skills support**: The framework can load Agent Skills files when they are present.
—
## How Does It Perform Against the Competition?
The Strands team ran distributed benchmarking on Amazon EC2 using Harbor, an evaluation framework originally developed by the creators of Terminal-Bench. They tested across six benchmarks: ALFWorld, ContextBench, GAIA, WebShop, τ²-bench, and Terminal-Bench 2.1. Cost was measured as average dollars per task.
The headline number: **Strands Harness achieved 28% lower cost** compared to rival frameworks running the same Claude or GPT models, while maintaining near-equal accuracy.
A closer look at the Terminal-Bench 2.1 results using Claude Fable 5 (89 trials per harness) paints an even more striking picture:
| Harness | Run Cost | Accuracy |
|—|—|—|
| Strands Harness | $56.29 | 69.7% |
| DeepSeek Harness | $40.30 | 59.5% |
| OpenCode | $73.42 | 66.3% |
| Oh-my-pi | $86.83 | 69.7% |
| Claude Code | $248.05 | 61.8% |
Against Claude Code specifically, Strands Harness cost **77% less** and scored **7.9 percentage points higher**. Oh-my-pi matched the same accuracy but at 54% higher cost. DeepSeek Harness was cheaper, but trailed by over 10 points. These results suggest that the harness itself — not just the model choice — plays a significant role in both cost and performance.
—
## What Drives the Cost Efficiency?
The Strands team identified three default rules that account for the bulk of the efficiency gains:
1. **Token truncation for tool results**: Any tool output exceeding roughly 1,500 tokens gets truncated, preventing bloated context windows from wasting tokens on verbose outputs.
2. **Compaction at 85% usage**: When context consumption crosses the 85% threshold, the system automatically summarizes and compresses earlier conversation history rather than letting it pile up.
3. **In-loop recovery on overflow**: If the context window does overflow despite proactive management, the agent recovers within the loop by compacting history and continuing — rather than crashing or requiring manual intervention.
These defaults align with broader findings in the agent tooling space. Independent research comparing Claude Code, Codex CLI, and Pi across seven models found that harness selection had a minimal impact on success rates, but the same model could reach similar outcomes at up to five times the cost depending on the harness.
—
## Getting Started
Installation is straightforward for both Python and TypeScript developers:
“`python
pip install strands-harness
“`
“`bash
npm install @strands-agents/harness
“`
A basic usage example in Python:
“`python
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 framework also includes a **CLI tool** (`npm install @strands-agents/strands-cli`) that lets you prototype agents in plain English. In a team demonstration, an agent was instructed to add the Playwright MCP server and measure video load latency on a blog post. Running an export command then generated the full harness code — with the MCP server included — as a downloadable Python or TypeScript package.
Because the harness functions as a library dependency, an agent prototyped on a laptop can be the exact same agent deployed in production. Customization goes deep: you can override any default, swap models, add tools, or replace components down to the underlying Strands Harness SDK.
Deployment is also streamlined. A bundled skills file helps your coding agent generate deployment configuration for AWS, Google Cloud Platform, Microsoft Azure, Cloudflare, and Modal — covering the major cloud providers and edge platforms in one step.
—
## Frequently Asked Questions
**Q: Is Strands Harness only for AWS users?**
A: No. While it is developed by the AWS Strands Agents team, it supports models from multiple providers including Anthropic, OpenAI, Google, Ollama, and LiteLLM. It runs locally or on any cloud provider.
**Q: What models work best with Strands Harness?**
A: It is designed to work with current reasoning models. In benchmarks, Claude Fable 5 and GPT-5.6 were used, but the framework supports any model accessible through its supported providers.
**Q: How does Strands Harness compare to Claude Code or Codex?**
A: In the Terminal-Bench 2.1 benchmark with Claude Fable 5, Strands Harness cost 77% less than Claude Code and achieved 7.9 percentage points higher accuracy. Against Codex, similar cost advantages were observed.
**Q: Can I use Strands Harness for production deployments?**
A: Yes. It is designed to work both locally during development and in production environments. The same codebase can be used for both, and deployment configurations can be auto-generated for AWS, GCP, Azure, Cloudflare, and Modal.
**Q: What languages and ecosystems does it support?**
A: Python and TypeScript are both supported. There is also a CLI tool for prototyping agents in plain English.
**Q: What is the Apache 2.0 license?**
A: Apache 2.0 is a permissive open-source license that allows you to use, modify, and distribute the software freely, including in commercial products, with minimal restrictions.
**Q: How does the context management system work?**
A: The harness manages its own context window through three defaults: truncating tool results over about 1,500 tokens, compacting conversation history when context usage exceeds 85%, and recovering from overflow by summarizing and continuing within the agent loop.
**Q: Does the efficiency come at the cost of accuracy?**
A: No. The benchmarks show that Strands Harness maintains near-equal accuracy compared to rival harnesses while delivering significantly lower costs. In some cases, it actually outperformed competitors on accuracy.
—
## Conclusion
Strands Harness represents a significant step forward in making agent development more accessible, affordable, and production-ready. By packaging AWS’s internal Strands primitives into a single, general-purpose framework, it removes much of the engineering burden that comes with building a reliable agent loop from scratch.
The benchmark results are compelling: up to 77% cost savings compared to established tools like Claude Code, with equal or better accuracy across six diverse benchmarks. The three-pronged context management strategy — truncation, compaction, and in-loop recovery — provides a clear blueprint for why harness design matters as much as model selection.
For developers looking to build agents that are cost-effective, scalable, and easy to deploy across multiple cloud platforms, Strands Harness offers a strong starting point. Its open-source nature, dual Python and TypeScript support, and single-line setup make it one of the most approachable agent frameworks available today.
Thank you for reading



