AI agent concepts, successful in isolated environments, often falter when integrated into custom application loops. Addressing this, the AWS Strands Agents team has unveiled Strands Harness, a general-purpose agent framework.
This open-source solution, distributed under Apache 2.0 for Python and TypeScript, enables rapid development, typically requiring just one line of code. Strands Harness supports flexible deployment (local or cloud). Benchmarks show a 28% reduction in token costs compared to rival harnesses using the same Claude or GPT models, while sustaining near-equivalent accuracy.
Introducing Strands Harness
An agent harness provides the core operational environment for a language model, managing the execution loop, tool integration, context, memory, and recovery. Strands Harness packages these fundamental components into default settings, designed as a versatile system beyond coding tasks.
Upon initialization, create_harness() generates an agent with capabilities:
- Compatibility with major reasoning models (Amazon Bedrock, Anthropic, OpenAI, Google, Ollama, LiteLLM).
- Integrated tools for shell, file operations, and web interactions.
- Optimized handling of large tool outputs via offloading and caching.
- Persistent long-term memory and conversation resumption (session ID).
- Subtask delegation to a helper agent and multi-step workflow tracking.
Cost Efficiency and Performance Benchmarks
Distributed benchmarking on Amazon EC2, utilizing Harbor, assessed six benchmarks. Cost was measured as average dollars per task against competitors like Claude Code and DeepSeek Harness.
DeepSeek Harness was approximately 14% cheaper but consistently yielded lower scores. Its inclusion contributed to the overall 28% cost savings reported for Strands Harness against a wider competitive landscape.
In a direct Terminal-Bench 2.1 comparison using Claude Fable 5, Strands Harness proved 77% more cost-efficient than Claude Code, achieving 7.9 points higher accuracy. It also matched oh-my-pi's accuracy at a 54% lower cost.
Efficiency Drivers: Context Management
Strands Harness's efficiency attributes to default prompt caching and advanced context management. Researchers emphasize robust context handling improved both token efficiency and accuracy, guided by three principles:
- Tool results exceeding 1,500 tokens are truncated.
- Context summarization (compaction) activates when usage surpasses 85%.
- In-loop context recovery engages upon context window overflow.
These findings align with independent research showing cost variations for the same model depending on the chosen harness. A detailed follow-up paper is expected.
Getting Started and Customization
Installation is simple: pip install strands-harness or npm install @strands-agents/harness. Developers specify a model or connect to local Ollama.
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) facilitates prototyping agents with natural language, demonstrating capability to generate harness code for tool integration. The CLI itself, built on Strands Harness, showcases its modularity.
Extensive customization permits overriding defaults, swapping models, or replacing components down to the SDK. As a library dependency, an agent prototyped locally maintains identical behavior in production.
This article is a rewritten summary based on publicly available reporting. For the original story, visit the source.
Source: MarkTechPost