使用 Strands Agents 构建生产级 agent harness
使用 Strands Agents 构建与模型无关的 Python 或 TypeScript agent harness,支持工具、MCP、guardrails、追踪、流式处理和提供商切换。
先决条件
Python 3.10+ 或 Node.js/TypeScript,模型提供商凭证,可选的 MCP 兼容工具
安装
使用与您的环境匹配的上游安装或设置路径:
- pip install strands-agents strands-agents-tools
- npm install @strands-agents/sdk
- pip install hatch
- npm ci # 从仓库根目录安装
上游要求和注意事项:
- 此 monorepo 包含 Python SDK、TypeScript SDK、文档站点和支持包:
- | strands-py/ | Python SDK:agent loop、模型提供商、工具 (PyPI · releases) |
基本用法或入门说明:
交付有效成果。 Guardrails 在运行前捕获错误。引导处理程序让 agent 自我纠正,而不是静默失败。
两个 SDK 默认使用 Amazon Bedrock 模型提供商,因此您需要配置 AWS 凭证并启用 Claude Sonnet 的模型访问权限。[快速入门指南](https://strandsagents.com/docs/user-guide/quickstart...
from strands import Agent
Source: https://github.com/1991513ccie-png/skills
Extracted from upstream docs: https://raw.githubusercontent.com/strands-agents/harness-sdk/HEAD/README.md
文档
- https://strandsagents.com/


