Install
npm install @strands-agents/sdk@1.24.0 zodThe TypeScript Strands Agents SDK for Node.js: install, a first agent, and pages on Zod tools and MCP, hooks and interrupts, graphs, swarms and A2A, production and how it differs from Python.
@strands-agents/sdk brings the Strands agent loop to Node.js: the same model-driven design as the Python SDK, with tools defined by Zod schemas and typed end to end.
Install
npm install @strands-agents/sdk@1.24.0 zodVersion
@strands-agents/sdk 1.24.0 · checked 2026-11-19 · Node.js 22+ · ESM only
Best for
Agents inside Node.js services, typed tools, graphs and swarms, agents on AgentCore Runtime or Lambda.
import { Agent, tool } from '@strands-agents/sdk'import { z } from 'zod'
const wordCount = tool({ name: 'word_count', description: 'Count the words in a piece of text.', inputSchema: z.object({ text: z.string() }), callback: ({ text }) => text.split(/\s+/).filter(Boolean).length,})
const agent = new Agent({ model: 'us.anthropic.claude-sonnet-5-5', tools: [wordCount], printer: false,})
console.log((await agent.invoke("How many words are in 'the quick brown fox'?")).toString())printer defaults to true: the agent writes its answer to stdout. Turn it off in servers.OpenAIModel uses the Responses API by default; pass api: 'chat' for Chat Completions (the Python class is the other way round).Graph/Swarm limits default to Infinity.bedrock-agentcore and the Strands A2A module want different major versions of @a2a-js/sdk.| Date | Version | Changes |
|---|---|---|
| 2026-10-24 | 1.24.0 | New standalone TypeScript guide in the Strands Agents section, expanding the TypeScript Strands page from the Amazon Bedrock guide into comprehensive, tools, hooks, multi-agent, recipes and production pages. All examples type-check under strict and run against an offline Bedrock stub. |
Python: see Strands Agents (Python).