项目介绍
Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测
Strands Agents 是一个用 Python 和 TypeScript 构建、运行 AI Agent 的开源 SDK。README 将其定位为:当你原本要自己写 agent loop 时,可以改用 Strands——它运行在你的进程内,没有托管控制平面,并覆盖手写循环逐渐需要的各类能力。仓库为 monorepo,包含 harness(Python/TypeScript)、两个 SDK、CLI、MCP Server、文档站与测试基础设施。
需要说明的是,它不是可直接下载使用的“工作流文件”或成品 Agent,而是供开发者编写 Agent 的框架与 SDK;其中的 MCP Server 是围绕 Strands 构建知识的辅助组件,不能把整个仓库当作 MCP 服务使用。
核心能力
点击能力名称查看输入、输出和原文依据。
README 列出的能力包括:生命周期控制(轮次限制、token 预算、取消、停止原因)、工具与结构化输出、MCP 工具接入、多 Agent 模式、记忆与会话、模型可移植性、流式输出、guardrails、tracing 与 evals。
两种使用层次:
- Harness:一次
create_harness()(Python)或createHarness()(TypeScript)调用得到预配置 Agent,默认涵盖模型、工具、记忆、会话与上下文管理。 - SDK:需要自行掌控 agent loop、工具、模型提供方与记忆时,使用更底层的
strands-agents(Python)或@strands-agents/sdk(TypeScript)。
此外还提供 strands CLI,用于在终端中做原型与对话;以及 strands-mcp,让编码 Agent 获得 Strands 相关知识。README 还提到可为 Claude Code、Codex、Cursor 安装 Strands 插件,具体安装与验证步骤需查阅官方文档。
实际应用场景
适用场景
适合需要在自有应用中嵌入 Agent 循环的 Python 或 TypeScript 开发者,例如:需要控制轮次与 token 预算的生产级 Agent、需要接入 MCP 工具链的编码辅助、需要多 Agent 协作或会话记忆的应用、希望在 Bedrock/Anthropic/OpenAI/Gemini 等模型间切换而不改业务代码的团队。
若你只需要一个成品聊天客户端或现成工作流模板,本项目并不直接提供;它要求具备编程与部署能力。
安装与接入
README 给出的入门命令如下(按原文):
pip install strands-harness
npm install @strands-agents/harness
SDK 层:Python 要求 3.10 及以上,pip install strands-agents;TypeScript 需在 Node.js 22+ 的 ESM 项目("type": "module")中 npm install @strands-agents/sdk。
README 示例显示,TypeScript 版默认使用 Amazon Bedrock,因此需配置 AWS 凭据或传入其他模型;Python 与 TypeScript 的模型提供方配置(含 Bedrock、Anthropic、OpenAI、Gemini、Ollama 等)见官方 Quickstart。仓库还给出开发用命令(hatch、npm ci、npm run build 等),属于源码开发流程,不是终端用户安装步骤,此处不展开。
使用条件与限制
- 是否需要部署
- 需自行准备运行环境,具体要求见正文
- 是否需要注册
- 账号和认证要求见正文;未明确说明的项目仍待核验
- 是否需要 API Key
- 待核验
- 费用与额度
- 费用边界见正文,项目许可不代表模型或托管服务免费
- 所需权限
- 待核验
- 许可证与服务条款
- 待核验
权限费用与限制
- 本项目为 SDK 框架,运行在你自己的进程中,不提供托管控制平面;你需要自行负责运行环境、凭据与部署。
- 模型调用取决于所选提供方,相关 API Key、云凭据、调用费用与配额需向对应服务商核验;README 未给出价格信息。
- 仓库代码以 Apache-2.0 发布,但公开仓库不等于模型、云服务或全部配套组件免费;各包的许可证以各自目录为准,需逐一核验。
- Discord、文档站等为外部服务,访问与可用性受网络环境影响,国内访问情况待核验。
- 安全方面 README 指向 CONTRIBUTING 的安全问题说明,未列出具体安全测评结论。
国内使用情况
网友核验 用户经验分享
与站长实测独立,不代表官方认证或本站已实测。
最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。
分项统计、有效期与样本量
| 核验项目 | 有效人数 | 成功 / 部分 / 失败 / 无法判断 | 成功率 | 最近核验 / 有效期 |
|---|---|---|---|---|
| 官方网站访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| GitHub 仓库访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 安装与运行 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 官方服务国内连接 / MCP 连接 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 国内网络情况 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 国内模型兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 自定义 API | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外服务依赖 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外账号要求 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 中文界面 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 客户端兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 账号及费用信息 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。
最近有效核验
暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。
查看全部有效核验 →国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。
- 官方网站访问
- 尚未实测 待核验
- GitHub 仓库访问
- 尚未实测 待核验
- 官方服务国内连接
- 尚未实测 待核验
- 国内网络情况
- 尚未实测 待核验
- 国内模型兼容性
- 尚未实测 待核验
- 自定义 API
- 尚未实测 待核验
- 海外服务依赖
- 尚未实测 待核验
- 海外账号要求
- 尚未实测 待核验
- 中文界面
- 尚未实测 待核验
- 国内最后核验时间
- 尚未实测
许可与国内使用
仓库根目录 LICENSE.APACHE 为 Apache License 2.0,README 亦声明项目采用 Apache License 2.0。这是对仓库代码的授权,不当然覆盖第三方模型、云托管服务或未来可能出现的商业模块。
国内使用需注意:默认模型提供方涉及境外云服务,网络可达性、账号注册、计费与合规要求均需自行核验;README 未声明对国内模型或国内云的区域支持,也未说明服务部署地域。
项目资料与来源
字段依据与待核验事项
access:来源确认 · pip install strands-harness
project_type:来源确认 · Strands Agents is an open-source SDK for building and running AI agents in Python and TypeScript.
原始 README(折叠技术参考)
<div align="center">
<div>
<a href="https://strandsagents.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://strandsagents.com/latest/assets/wordmark-github-dark.svg">
<img src="https://strandsagents.com/latest/assets/wordmark-github-light.svg" alt="Strands" width="320">
</picture>
</a>
</div>
<h1>
Strands Agents
</h1>
<h2>
A model-driven approach to building AI agents in just a few lines of code.
</h2>
<div align="center">
<a href="https://github.com/strands-agents/harness-sdk/graphs/commit-activity"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/strands-agents/harness-sdk"/></a>
<a href="https://github.com/strands-agents/harness-sdk/issues"><img alt="GitHub open issues" src="https://img.shields.io/github/issues/strands-agents/harness-sdk"/></a>
<a href="https://github.com/strands-agents/harness-sdk/pulls"><img alt="GitHub open pull requests" src="https://img.shields.io/github/issues-pr/strands-agents/harness-sdk"/></a>
<a href="https://github.com/strands-agents/harness-sdk/blob/main/LICENSE.APACHE"><img alt="License" src="https://img.shields.io/github/license/strands-agents/harness-sdk"/></a>
</div>
<p>
<a href="https://strandsagents.com/">Documentation</a>
◆ <a href="https://github.com/strands-agents/samples">Samples</a>
◆ <a href="https://github.com/strands-agents/harness-sdk/tree/main/strands-cli">CLI</a>
◆ <a href="https://github.com/strands-agents/harness-sdk/tree/main/strands-mcp">MCP Server</a>
◆ <a href="https://discord.gg/strands">Discord</a>
<br>
Harness (<a href="https://github.com/strands-agents/harness-sdk/tree/main/harness-py">Python</a>, <a href="https://github.com/strands-agents/harness-sdk/tree/main/harness-ts">TypeScript</a>)
◆ SDK (<a href="https://github.com/strands-agents/harness-sdk/tree/main/strands-py">Python</a>, <a href="https://github.com/strands-agents/harness-sdk/tree/main/strands-ts">TypeScript</a>)
◆ <a href="https://github.com/strands-agents/box">Box</a>
◆ <a href="https://github.com/strands-agents/shell">Shell</a>
◆ <a href="https://github.com/strands-agents/evals">Evals</a>
◆ <a href="https://github.com/strands-labs">Labs</a>
</p>
</div>
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](https://strandsagents.com/docs/user-guide/concepts/agents/agent-loop/) (turn limits, token budgets, cancellation, stop reasons), [tools](https://strandsagents.com/docs/user-guide/concepts/tools/) and [structured output](https://strandsagents.com/docs/user-guide/concepts/agents/structured-output/), [MCP](https://strandsagents.com/docs/user-guide/concepts/tools/mcp-tools/), [multi-agent patterns](https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/), [memory](https://strandsagents.com/docs/user-guide/concepts/memory/overview/) and [sessions](https://strandsagents.com/docs/user-guide/concepts/agents/session-management/), [model portability](https://strandsagents.com/docs/user-guide/concepts/model-providers/), [streaming](https://strandsagents.com/docs/user-guide/concepts/streaming/), [guardrails](https://strandsagents.com/docs/user-guide/safety-security/guardrails/), [tracing](https://strandsagents.com/docs/user-guide/observability-evaluation/observability/), and [evals](https://strandsagents.com/docs/user-guide/evals-sdk/quickstart/).
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](https://strandsagents.com/docs/user-guide/build-with-ai/)
for install and verification steps.
This monorepo contains Strands harness, the Python and TypeScript SDKs, the documentation site, and supporting packages:
| Directory | Description |
|-----------|-------------|
| [`harness-py/`](harness-py/) | Python Strands harness: fully assembled agent via `create_harness()` ([PyPI](https://pypi.org/project/strands-harness/) · [docs](https://strandsagents.com/docs/user-guide/harness/)) |
| [`harness-ts/`](harness-ts/) | TypeScript Strands harness: fully assembled agent via `createHarness()` ([npm](https://www.npmjs.com/package/@strands-agents/harness) · [docs](https://strandsagents.com/docs/user-guide/harness/)) |
| [`strands-cli/`](strands-cli/) | `strands` CLI: prototype and chat with a harness agent from the terminal ([npm](https://www.npmjs.com/package/@strands-agents/cli)) |
| [`strands-py/`](strands-py/) | Python SDK: agent loop, model providers, tools ([PyPI](https://pypi.org/project/strands-agents/) · [releases](https://github.com/strands-agents/harness-sdk/releases?q=python%2F&expanded=false)) |
| [`strands-ts/`](strands-ts/) | TypeScript SDK: agent loop, model providers, tools ([npm](https://www.npmjs.com/package/@strands-agents/sdk) · [releases](https://github.com/strands-agents/harness-sdk/releases?q=typescript%2F&expanded=false)) |
| [`strands-mcp/`](strands-mcp/) | MCP server that gives coding agents knowledge about building with Strands Agents ([PyPI](https://pypi.org/project/strands-agents-mcp-server/)) |
| [`site/`](site/) | Source for the [strandsagents.com](https://strandsagents.com) documentation site (Astro/Starlight) |
| [`team/`](team/) | Governance and cross-SDK process docs (tenets, decisions, PR & compatibility guidelines, and `designs/` proposals) |
| [`test-infra/`](test-infra/) | CDK stack provisioning the AWS resources a subset of integration tests run against (knowledge bases, SSH sandboxes) |
## Why Strands
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](https://strandsagents.com/docs/user-guide/concepts/model-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.
## Quick Start
The easiest way to get started is with **[Strands harness](https://strandsagents.com/docs/user-guide/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](https://strandsagents.com/docs/user-guide/harness/quickstart/), or see the [Python Strands harness](harness-py/) and [TypeScript Strands harness](harness-ts/) packages to get started.
### Python
```bash
pip install strands-harness
```
```python
from strands_harness import create_harness
agent = create_harness()
agent("Find the slowest test in this repo and explain why it's slow")
```
### TypeScript
```bash
npm install @strands-agents/harness
```
```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")
```
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](https://strandsagents.com/docs/user-guide/harness/reference/configuration/) documents every default you can override.
The [Quickstart Guide](https://strandsagents.com/docs/user-guide/quickstart/overview/) 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.
### Python
Requires Python 3.10+:
```bash
pip install strands-agents
```
```python
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](strands-py/) covers tools, model providers, MCP, and bidirectional streaming.
### TypeScript
To build a Strands agent in TypeScript, install the SDK in a Node.js 22+ ESM project (`"type": "module"`):
```bash
npm install @strands-agents/sdk
```
```typescript
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](https://strandsagents.com/docs/user-guide/sdk/quickstart/typescript/)
to configure a model provider, run your first agent, and add tools. Use the
[TypeScript API reference](https://strandsagents.com/docs/api/typescript/) for the full
SDK surface, or explore more examples in the [TypeScript SDK README](strands-ts/).
## Documentation
For detailed guidance & examples, explore our documentation:
- [User Guide](https://strandsagents.com/)
- [Strands Harness Guide](https://strandsagents.com/docs/user-guide/harness/) ([quickstart](https://strandsagents.com/docs/user-guide/harness/quickstart/) · [configuration reference](https://strandsagents.com/docs/user-guide/harness/reference/configuration/))
- [Quick Start Guide](https://strandsagents.com/docs/user-guide/quickstart/overview/)
- [Agent Loop](https://strandsagents.com/docs/user-guide/concepts/agents/agent-loop/)
- [Bidirectional Streaming](https://strandsagents.com/docs/user-guide/sdk/bidi/) (Python)
- [Examples](https://strandsagents.com/docs/examples/)
- API Reference: [Python](https://strandsagents.com/docs/api/python/strands.agent.agent/) · [TypeScript](https://strandsagents.com/docs/api/typescript/)
- [Production & Deployment Guide](https://strandsagents.com/docs/user-guide/deploy/operating-agents-in-production/)
The docs themselves live in this monorepo under [`site/`](site/), and doc PRs are welcome alongside code changes.
## Development
Git operations (commits, branches, PRs) are done from the repo root. Each package has its own toolchain:
**Python SDK** (`strands-py/`):
```bash
cd strands-py
pip install hatch
hatch test # run unit tests
hatch fmt # format & lint
```
**TypeScript SDK** (`strands-ts/`):
```bash
npm ci # install from repo root
npm run build # build
npm test # run unit tests
```
**Documentation site** (`site/`):
```bash
cd site
npm install
npm run dev # local dev server at http://localhost:4321/
```
## Contributing ❤️
We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) 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**](https://discord.com/invite/strands)
## License
This project is licensed under the Apache License 2.0 - see the [LICENSE.APACHE](LICENSE.APACHE) file for details.
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
历史前置条件说明(补充参考)
Python 3.10+(SDK)或 Node.js 22+ ESM 项目(TypeScript SDK);需配置所选模型提供方的凭据或 API Key,TypeScript 默认走 Amazon Bedrock,需 AWS 凭据;模型调用费用与配额由提供方决定,具体价格待核验;涉及境外云服务与外部文档站,国内网络可达性待核验;无需托管控制平面,自托管运行。
项目来源与清单版权许可
https://github.com/strands-agents/harness-sdk
整理来源:https://github.com/slavakurilyak/awesome-ai-agents
清单版权与许可:
MIT License
Copyright (c) 2024 Slava Kurilyak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.