Build an agent harness and control it end-to-end. Open-source SDK for production AI agents in Python & TypeScript - any model, any cloud.
翻譯準備中
開發工具TypeScript · PythonGitHub @strands-agents自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗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:
| Directory | Description |
|---|---|
harness-py/ | Python Strands harness: fully assembled agent via create_harness() (PyPI · docs) |
harness-ts/ | 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) |
strands-py/ | Python SDK: agent loop, model providers, tools (PyPI · releases) |
strands-ts/ | TypeScript SDK: agent loop, model providers, tools (npm · releases) |
Build an agent harness. Control it end-to-end.
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).
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:
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/):
cd site
npm install
npm run dev # local dev server at http://localhost:4321/
We welcome contributions! See our Contributing Guide for details on:
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.
strands-mcp/ | MCP server that gives coding agents knowledge about building with Strands Agents (PyPI) |
site/ | Source for the strandsagents.com documentation site (Astro/Starlight) |
team/ | Governance and cross-SDK process docs (tenets, decisions, PR & compatibility guidelines, and designs/ proposals) |
test-infra/ | CDK stack provisioning the AWS resources a subset of integration tests run against (knowledge bases, SSH sandboxes) |