Repolode
strands-agents

strands-agents/harness-sdk

Open-source SDK for building and running AI agents in Python and TypeScript, with tools, MCP, memory, and model portability.

Stars
8,868
Forks
1,398
Open issues
1,044
Last commit
13 hours ago

What is it?

Strands Agents is a monorepo containing an agent SDK and a higher-level assembled harness, available in Python and TypeScript. The SDK runs inside your own process with no hosted control plane, and handles the agent loop along with turn limits, token budgets, cancellation, and stop reasons.

Beyond the loop, the project covers tools and structured output, MCP connections, multi-agent patterns, memory and sessions, streaming, hooks, guardrails, tracing, and evals. Model providers include Amazon Bedrock, Anthropic, OpenAI, Gemini, and Ollama, with support for custom providers.

For a quick start, the harness exposes a single create_harness() or createHarness() call that returns a preconfigured agent. The monorepo also ships a strands CLI, an MCP server for coding agents, and the documentation site source.

Key features

  • 01Agent loop with turn limits, token budgets, cancellation, and stop reasons.
  • 02Tools, structured output, and MCP server connections.
  • 03Multi-agent patterns, memory, and session management.
  • 04Model providers including Bedrock, Anthropic, OpenAI, Gemini, and Ollama, plus custom providers.
  • 05Built-in hooks, guardrails, streaming, tracing, and evals.

Use cases

  • Building a custom agent loop in Python or TypeScript without hosting a control plane.
  • Switching between model providers without rewriting agent code.
  • Adding MCP tools and multi-agent workflows to an existing application.

Quick start

  1. 1

    Install the Python harness

    pip install strands-harness
  2. 2

    Create a harness agent and run a prompt in Python

    from strands_harness import create_harness agent = create_harness() agent("Find the slowest test in this repo and explain why it's slow")
  3. 3

    Or install the TypeScript harness

    npm install @strands-agents/harness
  4. 4

    Create a harness agent and run a prompt in TypeScript

    import { createHarness } from '@strands-agents/harness' const agent = await createHarness() await agent.invoke("Find the slowest test in this repo and explain why it's slow")

Things to know

  • Model providers such as Amazon Bedrock, Anthropic, OpenAI or Gemini require their own credentials and accounts.

Topics

FAQ

What is harness-sdk?
Open-source SDK for building and running AI agents in Python and TypeScript, with tools, MCP, memory, and model portability. Strands Agents is a monorepo containing an agent SDK and a higher-level assembled harness, available in Python and TypeScript. The SDK runs inside your own process with no hosted control plane, and handles the agent loop along with turn limits, token budgets, cancellation, and stop reasons.
Is harness-sdk free to use? What license does it have?
harness-sdk is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is harness-sdk still maintained?
Actively maintained. The last commit to harness-sdk was on Oct 19, 2026.
What can I use harness-sdk for?
Building a custom agent loop in Python or TypeScript without hosting a control plane. Switching between model providers without rewriting agent code. Adding MCP tools and multi-agent workflows to an existing application.
How do I install harness-sdk?
Install the Python harness: pip install strands-harness Create a harness agent and run a prompt in Python: from strands_harness import create_harness agent = create_harness() agent("Find the slowest test in this repo and explain why it's slow") Or install the TypeScript harness: npm install @strands-agents/harness Create a harness agent and run a prompt in TypeScript: import { createHarness } from '@strands-agents/harness' const agent = await createHarness() await agent.invoke("Find the slowest test in this repo and explain why it's slow")
Where can I get harness-sdk?
The source code and installation instructions are on GitHub: https://github.com/strands-agents/harness-sdk

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects