Open Agent SDK TypeScript is an in-process agent loop library for OpenAI-compatible and Anthropic-compatible APIs, with API and tool abstractions, examples, and lifecycle hooks. It targets TypeScript and MIT license since 2026-03-31.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Open Agent SDK (TypeScript) is an open-source Agent SDK that runs the full agent loop in-process, with no CLI dependencies. It supports OpenAI-compatible APIs and Anthropic-compatible providers. It is available in Go as well.
How it works
The SDK provides top-level functions such as query and createAgent to run streaming and blocking prompts, tools with Zod schemas, and MCP server integration. It includes built-in tools and skills, lifecycle hooks, and support for multi-turn conversations. The API surface includes agent methods (query, prompt, getMessages, close, etc.) and configurable options (apiType, model, apiKey, baseURL, tools, allowedTools, permissionMode, mcpServers, hooks, etc.).
Getting started
Install command from README:
npm install @codeany/open-agent-sdk
Set environment variables, for example:
export CODEANY_API_KEY=your-api-key
OpenAI-compatible models example:
export CODEANY_API_TYPE=openai-completions
export CODEANY_API_KEY=sk-...
export CODEANY_BASE_URL=https://api.openai.com/v1
export CODEANY_MODEL=gpt-4o
Anthropic-compatible example:
export CODEANY_BASE_URL=https://openrouter.ai/api
export CODEANY_API_KEY=sk-or-...
export CODEANY_MODEL=anthropic/claude-sonnet-4
Recent releases
- none
Traction
2743 stars, 949 forks, 10 open issues (as listed in repository facts).
Behind the repo
The project is the TypeScript implementation of the Open Agent SDK; a Go variant is also available via open-agent-sdk-go, linked in the README.
Caveats
License: MIT. Created 2026-03-31. Last push 2026-07-26. Language: TypeScript. Open issues: 10.
Features (highlights)
- In-process agent loop with no subprocess/CLI
- Supports OpenAI-compatible and Anthropic-compatible APIs
- Quick-start patterns for streaming and blocking prompts
- Example usage for one-shot queries, multi-turn conversations, and tools
- Custom tools with Zod schemas and MCP server integration
- Skills, hooks, and lifecycle events
- Web UI server example and API reference for core functions and options






