---
title: "Strands Agents TypeScript SDK: Build AI Agents in TypeScript"
date: 2026-04-06T00:00:00.000Z
description: "The Strands Agents TypeScript SDK brings the model-driven approach to the TypeScript ecosystem. Build type-safe AI agents that run in Node.js and the browser."
tags: ["Open Source", "Announcement", "TypeScript"]
---
We’re excited to announce the release candidate of the [Strands Agents TypeScript SDK](https://github.com/strands-agents/sdk-typescript). The SDK brings the model-driven approach to building AI agents to the TypeScript and JavaScript ecosystem. If you’ve been following Strands Agents, you know the Python SDK has been powering production agents across AWS and the broader community since May 2025. Now, TypeScript developers get the same simple, powerful primitives with full type safety, custom tools, and the ability to run agents in both Node.js and the browser.

Getting started takes just a few lines of code:

```bash
npm install @strands-agents/sdk
```

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

const agent = new Agent({
  systemPrompt: 'You are a helpful assistant.',
})

const result = await agent.invoke(
  'What makes TypeScript great for building agents?'
)
console.log(result)
```

That’s it. An agent with a model, a prompt, and a conversation. The model drives the reasoning and orchestration, while you shape its behavior to fit your use case.

## What’s in the box

The TypeScript SDK ships with the core features you need to build agents that range from quick prototypes to production systems. Here’s a quick tour. For the full details, head over to the [TypeScript quickstart guide](/docs/user-guide/quickstart/typescript/index.md).

### Model providers

The SDK supports multiple model providers out of the box. Amazon Bedrock is the default, with first-class support for OpenAI, Anthropic, Google Gemini, and Vercel AI SDK providers:

```typescript
import { Agent } from '@strands-agents/sdk'
import { OpenAIModel } from '@strands-agents/sdk/models/openai'

const agent = new Agent({
  model: new OpenAIModel({
    api: 'chat',
    modelId: 'gpt-4o',
  }),
})
```

### Tools

Define a tool with a Zod schema and a callback. The SDK handles the rest:

```typescript
import { tool } from '@strands-agents/sdk'
import { z } from 'zod'

const calculator = tool({
  name: 'calculate',
  description: 'Evaluate a math expression.',
  inputSchema: z.object({
    expression: z.string().describe('The math expression to evaluate'),
  }),
  callback: (input) => String(eval(input.expression)),
})
```

### Streaming

Stream responses as they’re generated for responsive UIs and real-time feedback:

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

for await (const event of agent.stream('Tell me a story')) {
  if (event.type === 'modelStreamUpdateEvent') {
    // Handle each chunk as it arrives
  }
}
```

### MCP integration

Connect to any [Model Context Protocol](https://modelcontextprotocol.io/) server and use its tools directly:

```typescript
import { Agent, McpClient } from '@strands-agents/sdk'
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'

const mcpClient = new McpClient({
  transport: new StdioClientTransport({
    command: 'uvx',
    args: ['awslabs.aws-documentation-mcp-server@latest'],
  }),
})

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

### Multi-agent orchestration

Coordinate multiple agents using Graph (deterministic DAG execution) or Swarm (dynamic, model-driven handoffs) patterns:

```typescript
import { Agent } from '@strands-agents/sdk'
import { Graph } from '@strands-agents/sdk/multiagent'

const researcher = new Agent({
  id: 'researcher',
  systemPrompt: 'Research the topic.',
})
const writer = new Agent({
  id: 'writer',
  systemPrompt: 'Write a polished draft.',
})
const reviewer = new Agent({
  id: 'reviewer',
  systemPrompt: 'Review the draft.',
})

const graph = new Graph({
  nodes: [researcher, writer, reviewer],
  edges: [
    ['researcher', 'writer'],
    ['writer', 'reviewer'],
  ],
})

const result = await graph.invoke('Write a blog post about AI agents')
```

### And more

The SDK also includes structured output with Zod schema validation, conversation management (sliding window, summarization), lifecycle hooks, session persistence (including S3 storage), OpenTelemetry-based observability, Agent-to-Agent (A2A) protocol support, and vended tools like notebook, file editor, HTTP request, and bash. Check the [docs](https://strandsagents.com) for the full rundown.

## Agents in the browser

What makes the TypeScript SDK unique is that it runs natively in the browser. No server required. This opens up a whole category of interactive, client-side agent experiences.

To show what’s possible, we built a [browser agent example](https://github.com/strands-agents/sdk-typescript/tree/main/strands-ts/examples/browser-agent) where an AI agent manipulates a live canvas element through natural language. You chat with the agent, and it uses a custom `update_canvas` tool to change HTML, CSS, or run JavaScript in an iframe, all streaming in real time.

![Browser agent demo](/_astro/browser-agent-demo.Jvtwtfjm_Z1m7x6a.webp)

Clone the repo and try it out:

```bash
git clone https://github.com/strands-agents/sdk-typescript.git
cd sdk-typescript/strands-ts/examples/browser-agent
npm install && npm run dev
```

## Get started

The TypeScript SDK is available now on npm:

```bash
npm install @strands-agents/sdk
```

Here’s where to go next:

-   [Getting started](/docs/user-guide/quickstart/typescript/index.md) to build your first agent
-   [GitHub](https://github.com/strands-agents/sdk-typescript) for source code and examples

We’re building this in the open and contributions are welcome. Whether it’s a bug fix, a new feature, or a cool example, we’d love to see what you build. Join us [on GitHub](https://github.com/strands-agents/sdk-typescript) and let us know what you think.