open-agent-sdk-typescript  by codeany-ai

In-process AI agent SDK, alternative to CLI-dependent solutions

Created 1 week ago

New!

2,516 stars

Top 18.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Open Agent SDK provides a TypeScript library for building autonomous AI agents, offering an alternative to Anthropic's official SDK by eliminating CLI dependencies. It enables developers to deploy sophisticated agents capable of code understanding, file manipulation, web searching, and complex workflows directly in cloud, serverless, or CI/CD environments, enhancing deployment flexibility.

How It Works

This SDK integrates the complete Claude Code engine, running the agent loop entirely in-process. Unlike the official SDK which spawns a local CLI subprocess, Open Agent SDK directly interfaces with the Anthropic API. This in-process architecture leverages the full Claude Code engine's components, including its advanced permission system, multi-layer context compression, auto-memory management, and a comprehensive suite of built-in tools, facilitating robust agent execution without external process dependencies.

Quick Start & Requirements

Install via npm: npm install @shipany/open-agent-sdk. Configure API access by setting the ANTHROPIC_API_KEY environment variable or using third-party providers like OpenRouter by setting ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY. Requires a Node.js environment. Examples are available in the examples/ directory.

Highlighted Details

  • In-Process Execution: Enables deployment in serverless functions, Docker containers, and CI/CD pipelines by avoiding CLI subprocesses.
  • Full Claude Code Engine: Incorporates the complete 2,000+ source files of the official Claude Code engine, ensuring feature parity for core agent logic.
  • Extensive Tooling & MCP: Supports numerous built-in tools (Read, Write, Edit, Bash, WebSearch, Agent, etc.) and integrates with Model Context Protocol (MCP) servers for extended capabilities.
  • Advanced Agent Features: Offers sophisticated multi-agent systems, Git worktree isolation, robust permission handling, and context compression techniques.

Maintenance & Community

Bug reporting and issue tracking are managed via GitHub issues at github.com/shipany-ai/open-agent-sdk/issues.

Licensing & Compatibility

Distributed under the permissive MIT License, allowing for commercial use and integration into closed-source applications.

Limitations & Caveats

Requires valid API keys for Anthropic or compatible services, incurring usage costs. While the SDK is open-source, it relies on proprietary AI models. Deployment flexibility is high, but deep customization may require understanding the complex underlying engine.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
5
Star History
2,529 stars in the last 11 days

Explore Similar Projects

Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
59 more.

AutoGPT by Significant-Gravitas

0.1%
183k
AI agent platform for building, deploying, and running autonomous workflows
Created 3 years ago
Updated 21 hours ago
Feedback? Help us improve.