Archive of AI

Source Snapshot / 2025-05-16-aws-strands-agents-open-source-sdk-3

strands-agents/sdk-python

Linked event: 2025-05-16 · AWS Open-Sources Model-Driven Agent Framework Strands Agents SDK with MCP Support

Publisher
GitHub
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / 63ad6442525dbc08
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

[来源关键摘录] Strands Agents 官方开源仓库,提供免控制平面锁定的轻量化智能体开发与沙箱工具套件。

[正文前段节选] Skip to content

Navigation Menu

Appearance settings

You signed in with another tab or window. Reload to refresh your session.

You signed out in another tab or window. Reload to refresh your session.

You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

Repository navigation

NotificationsYou must be signed in to change notification settings

Fork1.6k (1.6k)

Star9.3k (9.3k)You must be signed in to star a repository

Build an agent harness and control it end-to-end. Open-source SDK for production AI agents in Python & TypeScript - any model, any cloud.

strandsagents.com/

agent-frameworkagenticagentic-aiagentsaiai-agentsanthropicautonomous-agentsbedrockgenerative-aiharnessllmllm-agentmcpmulti-agent-systemsopenaipythonsdkstrands-agentstypescript

Apache-2.0 license

Code of conduct

Contributing

Security policy

Custom properties

Report repository

BranchesTags

Open more actions menu

Latest commit

3,414 Commits

Folders and files

Last commit message

Last commit date

.claude-plugin

.cursor-plugin

.codecov.yml

.gitattributes

.node-version

CODE_OF_CONDUCT.md

CONTRIBUTING.md

LICENSE.APACHE

package-lock.json

package.json

pyproject.toml

View all files

Repository files navigation

Strands Agents

A model-driven approach to building AI agents in just a few lines of code.

Documentation

◆ MCP Server

Harness (Python, TypeScript)

◆ SDK (Python, TypeScript)

Strands Agents is an open-source SDK for building and running AI agents in Python and TypeScript. Choose Strands when you would otherwise write your own agent loop: it runs in your process with no hosted control plane, and it covers the jobs a hand-rolled loop grows into. In one SDK you get lifecycle controls (turn limits, token budgets, cancellation, stop reasons), tools and structured output, MCP, multi-agent patterns, memory and sessions, model portability, streaming, guardrails, tracing, and evals.

Using a coding agent? Install the Strands plugin for Claude Code, Codex, or Cursor.

It adds framework selection, scaffolding, tool authoring, MCP server connections, web

framework guides, and LangGraph migration guidance. See

Use Strands with AI coding agents

for install and verification steps.

This monorepo contains Strands harness, the Python and TypeScript SDKs, the documentation site, and supporting packages:

Python Strands harness: fully assembled agent via create_harness() (PyPI · docs)

TypeScript Strands harness: fully assembled agent via createHarness() (npm · docs)

strands-cli/

strands CLI: prototype and chat with a harness agent from the terminal (npm)

Python SDK: agent loop, model providers, tools (PyPI · releases)

TypeScript SDK: agent loop, model providers, tools (npm · releases)

strands-mcp/

MCP server that gives coding agents knowledge about building with Strands Agents (PyPI)

Source for the strandsagents.com documentation site (Astro/Starlight)

Governance and cross-SDK process docs (tenets, decisions, PR & compatibility guidelines, and designs/ proposals)

CDK stack provisioning the AWS resources a subset of integration tests run against (knowledge bases, SSH sandboxes)

Build an agent harness. Control it end-to-end.

Build your way. Any model, any cloud. Context management, execution limits, and observability built in before you write a line of config. Swap backends when you scale; your code stays the same.

Model agnostic. First-class support for Amazon Bedrock, Anthropic, OpenAI, and Gemini, plus many more providers and custom ones.

Stay in control. The agent loop traces every decision by default. Hooks let you intercept any step to log it, validate it, or redirect it.

Deliver outcomes that work. Guardrails catch mistakes before they run. Steering handlers let agents correct themselves instead of failing silently.

MCP, streaming, multi-agent patterns, and structured output are all built in.

The easiest way to get started is with Strands harness, a fully assembled, state-of-the-art agent. A single create_harness() (Python) or createHarness() (TypeScript) call gives you an optimized agent with benchmarked defaults for the model, tools, memory, sessions, and context management — ready to take from idea to production. Follow the harness quickstart, or see the Python Strands harness and TypeScript Strands harness packages to get started.

pip install strands-harness

from strands_harness import create_harness

agent = create_harness()

agent("Find the slowest test in this repo and explain why it's slow")

npm install @strands-agents/harness

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")

Start here to get a batteries-included agent, then drop down to the SDKs below when you want to own the agent loop and wire up tools, model providers, and memory yourself. The harness configuration reference documents every default you can override.

The Quickstart Guide covers configuring providers (Amazon Bedrock, Anthropic, OpenAI, Gemini, Ollama, and more).

Working with the SDK

The Strands Harness SDK lets you go deeper and control every part of the agent: the loop, tools, model providers, memory, sessions, and hooks. You can dive into the SDK after working with Strands harness or if you prefer building your own harness from the ground up when the assembled defaults aren't enough.

Requires Python 3.10+:

pip install strands-agents

from strands import Agent

from strands.vended_tools import http_request

agent = Agent(tools=[http_request])

agent("Tell me about the Strands harness features: https://strandsagents.com/docs/user-guide/harness/index.md")

The Python SDK README covers tools, model providers, MCP, and bidirectional streaming.

To build a Strands agent in TypeScript, install the SDK in a Node.js 22+ ESM project ("type": "module"):

npm install @strands-agents/sdk

import { Agent } from '@strands-agents/sdk'

import { httpRequest } from '@strands-agents/sdk/vended-tools/http-request'

const agent = new Agent({ tools: [httpRequest] })

await agent.invoke('Tell me about the Strands harness features: https://strandsagents.com/docs/user-guide/harness/index.md')

The agent uses Amazon Bedrock by default, so configure AWS credentials or pass another model.

Start with the TypeScript quickstart

to configure a model provider, run your first agent, and add tools. Use the

TypeScript API reference for the full

SDK surface, or explore more examples in the TypeScript SDK README.

For detailed guidance & examples, explore our documentation:

Strands Harness Guide (quickstart · configuration reference)

Quick Start Guide

Bidirectional Streaming (Python)

API Reference: Python · TypeScript

Production & Deployment Guide

The docs themselves live in this monorepo under site/, and doc PRs are welcome alongside code changes.

Git operations (commits, branches, PRs) are done from the repo root. Each package has its own toolchain:

Python SDK (strands-py/):

cd strands-py

pip install hatch

hatch test # run unit tests

hatch fmt # format & lint

TypeScript SDK (strands-ts/):

npm ci # install from repo root

npm run build # build

npm test # run unit tests

Documentation site (site/):

npm run dev # local dev server at http://localhost:4321/

Contributing ❤️

We welcome contributions! See our Contributing Guide for details on:

Reporting bugs & features

Development setup

Contributing via Pull Requests

Code of Conduct

Reporting of security issues

Stay in touch with the team

Come meet the Strands team and other users on Discord

This project is licensed under the Apache License 2.0 - see the LICENSE.APACHE file for details.

See CONTRIBUTING for more information.

Contributors

Generated from amazon-archives/__template_Apache-2.0

You can’t perform that action at this time.