codeany-ai/open-agent-sdk-typescript
Agent-SDK without CLI dependencies, as an alternative to claude-agent-sdk, completely open source
What it solves
Open Agent SDK provides a way to integrate autonomous AI agents into TypeScript applications without needing separate subprocesses or CLI tools. It simplifies the process of creating agents that can interact with the local filesystem, execute shell commands, and use external tools while maintaining a persistent session state.
How it works
The SDK implements an agentic loop (API call $\rightarrow$ tool execution $\rightarrow$ repeat) directly in-process. It abstracts the differences between Anthropic and OpenAI-compatible APIs (including DeepSeek, Qwen, and Mistral), allowing developers to switch models easily. The system uses a provider layer to handle communication with LLMs and a query engine to manage the execution of tools and subagents.
Who it’s for
TypeScript developers who want to build AI agents that can perform complex tasks like code review, debugging, or file manipulation within their own application environment, cloud functions, or CI/CD pipelines.
Highlights
- In-process execution: Runs the full agent loop without requiring a CLI or subprocess.
- Extensive built-in toolset: Includes over 35 tools for Bash, filesystem access (Read/Write/Edit), web searching, and LSP code intelligence.
- MCP Integration: Supports Model Context Protocol (MCP) servers for extending agent capabilities via standard interfaces.
- Flexible Tooling: Allows the creation of custom tools using Zod schemas for validation.
- Subagents and Skills: Supports spawning specialized subagents for parallel work and reusable prompt templates called "skills" (e.g.,
debug,review). - Lifecycle Hooks: Provides 20 different lifecycle events (like
PreToolUseandPostToolUse) to intercept and control agent behavior. - Session Management: Supports session persistence, forking, and resuming conversations.
Related
- Project
- Project
- Project
- Project
- Project