Skip to content

[V1] Agent - Browser Compatibility #552

@pgrayy

Description

@pgrayy

Summary

Ensure browser compatibility for as many SDK components as possible. The TypeScript SDK should work in browser environments for use cases like client-side agents, browser-based chat interfaces, and web applications. This involves identifying which components can run in the browser (e.g., model providers with CORS support, tool execution, hooks, streaming), auditing for Node.js-specific dependencies (e.g., fs, path, child_process), and expanding the existing browser test suite to cover these components.

Usage

⚠️ Agent-generated example - This is a preliminary API sketch and has not been finalized.

// Browser-compatible agent usage
import { Agent } from '@strands-agents/sdk'
import { AnthropicModel } from '@strands-agents/anthropic'

const agent = new Agent({
  model: new AnthropicModel({
    modelId: 'claude-sonnet-4-20250514',
  }),
})

const result = await agent.invoke('Hello from the browser!')

Documentation

N/A

Reference

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestone:v1Item associated with the release of Strands TypeScript SDK V1.

    Projects

    Status

    Release

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions