Discover and explore top open-source AI tools and projects—updated daily.
dzhngControl Claude Agent via WebSocket server
New!
Top 68.2% on SourcePulse
Summary
This project provides a WebSocket server designed to sandbox and control the Claude Agent SDK, enabling real-time, bidirectional communication. It targets developers seeking to integrate Claude's advanced AI capabilities into their applications, particularly within isolated E2B environments. The primary benefit is offering a controlled, interactive, and sandboxed AI agent experience that can be programmatically managed.
How It Works
The core architecture utilizes a Bun-based WebSocket server that acts as a direct relay between a single client connection and the Claude Agent SDK. This server can be deployed as an E2B sandbox template, spinning up an isolated execution environment. The server manages message queuing, SDK processing, and relays responses back to the connected client. Configuration for system prompts, allowed tools, and models can be dynamically pushed via a /config HTTP endpoint or specified through client options, with the SDK stream initializing lazily upon the first client connection.
Quick Start & Requirements
Setup begins with creating a .env file, populating it with ANTHROPIC_API_KEY and E2B_API_KEY, followed by bun install. Deploying the server as an E2B sandbox template is accomplished using bun run build:e2b, a process that may take several minutes. Integration into user projects requires installing the client library (npm install @dzhng/claude-agent or bun add @dzhng/claude-agent) and connecting via TypeScript. Essential prerequisites include the Bun runtime, Node.js/npm, and the aforementioned API keys.
Highlighted Details
@dzhng/claude-agent) for simplified interaction.Maintenance & Community
The provided README does not detail specific contributors, community channels (like Discord or Slack), or a public roadmap.
Licensing & Compatibility
The project is released under the permissive MIT license. This license generally allows for commercial use and integration into closed-source projects without significant restrictions.
Limitations & Caveats
The server architecture enforces a single active WebSocket connection at any given time; subsequent connection attempts will be rejected. Successful deployment and operation necessitate valid Anthropic and E2B API keys. The project relies on the Bun runtime for its server and build processes.
1 week ago
Inactive
mitsuhiko
agi-inc
openai
ag-ui-protocol
Significant-Gravitas