A curated list of AI tools and resources for developers, see the AI Resources .

Claude Agent SDK WebSocket Server

An open-source WebSocket server that wraps the Claude Agent SDK to enable real-time, bidirectional communication with Claude in sandboxes or local environments.

Detailed Introduction

Claude Agent SDK WebSocket Server is an open-source project that wraps the Anthropic Claude Agent SDK into a WebSocket service, allowing developers to interact with Claude in real-time within local or E2B sandbox environments. The repository follows a monorepo layout including the server, client library, and E2B build scripts, enabling secure sandbox creation and message streaming via the @dzhng/claude-agent client.

Main Features

  • Real-time WebSocket interaction that streams SDK query results to connected clients.
  • E2B sandbox template build (bun run build:e2b) for isolated testing and deployment.
  • Client library and example scripts (@dzhng/claude-agent) to simplify integration.
  • Local deployment support with environment configuration, Docker scripts, and test clients.

Use Cases

Suitable for applications that need to expose Claude capabilities via a real-time API, such as interactive assistants, demo consoles, education labs, or sandboxed integration tests. Developers can test locally at <http://localhost:3000> or create isolated sandboxes for safe validation and CI workflows.

Technical Features

The project is implemented in TypeScript with a modular design, using a message-queue style processing and single-connection concurrency strategy to manage streamable SDK interactions and support interrupts. Its modularity allows swapping SDK backends, extending tool integrations, and integrating with CI/CD pipelines for reproducible workflows.

Claude Agent SDK WebSocket Server
Resource Info
🌱 Open Source 🦾 Agents 🛠️ Dev Tools