← Back to directory
O

Open Agent SDK (TypeScript)

Community
Open-source TypeScript Agent SDK that runs the full agent loop in-process, supporting Anthropic and OpenAI-compatible APIs.
GitHub source repository ↗
★ 2.7k Stars Category · Dev Tools Very popular Source revision a9ade5fdaefb
30FMRS · D
Reliability
4/20
Security and permissions
3/20
Maintenance
6/20
Documentation
12/20
Setup experience
5/20

Open Agent SDK (TypeScript) is a feature-rich open-source SDK offering an in-process agent loop, multi-model support, a wide range of tools, and a skill system. However, it is a third-party implementation, not officially maintained, and requires careful security configuration.

Read the FMRS scoring method →

Open Agent SDK (TypeScript) is an open-source SDK that lets developers run a full agent loop in their own application without needing a CLI subprocess. It supports the Anthropic Messages API and OpenAI-compatible APIs (such as OpenAI, DeepSeek, Qwen, Mistral), and offers a rich set of built-in tools, skill system, lifecycle hooks, subagents, permissions, session persistence, and more. It can be deployed in cloud, serverless, Docker, and CI/CD environments.

Tools

Bash
Execute shell commands
Read
Read files with line numbers
Write
Create or overwrite files
Edit
Precise string replacement in files
Glob
Find files by pattern
Grep
Search file contents with regex
WebFetch
Fetch and parse web content
WebSearch
Search the web
NotebookEdit
Edit Jupyter notebook cells
Agent
Spawn subagents for parallel work
Skill
Invoke registered skills
TaskCreate
Create a task
TaskList
List tasks
TaskUpdate
Update a task
TaskGet
Get a task
TaskStop
Stop a task
TaskOutput
Get task output
TeamCreate
Create a multi-agent team
TeamDelete
Delete a multi-agent team
SendMessage
Send messages between agents
EnterWorktree
Enter a Git worktree isolation environment
ExitWorktree
Exit a Git worktree isolation environment
EnterPlanMode
Enter structured planning mode
ExitPlanMode
Exit structured planning mode
AskUserQuestion
Ask the user for input
ToolSearch
Discover lazy-loaded tools
ListMcpResources
List MCP resources
ReadMcpResource
Read MCP resources
CronCreate
Create a scheduled task
CronDelete
Delete a scheduled task
CronList
List scheduled tasks
RemoteTrigger
Remote agent triggers
LSP
Language Server Protocol (code intelligence)
Config
Dynamic configuration
TodoWrite
Session todo list

Setup

  1. Install the npm package: npm install @codeany/open-agent-sdk
  2. Set your API key environment variable: export CODEANY_API_KEY=your-api-key
  3. Configure other environment variables as needed (e.g., CODEANY_API_TYPE, CODEANY_BASE_URL, CODEANY_MODEL).
  4. Import the SDK in your code and use query or createAgent to get started.

Fit and risk

Best for

  • TypeScript projects that need an in-process agent loop
  • Developers wanting to support both Anthropic and OpenAI-compatible models
  • Applications requiring fine-grained control over tools and permissions
  • Agents to run in cloud, serverless, or Docker environments

Not for

  • Scenarios requiring official Claude Agent SDK maintenance
  • Users who need CLI functionality (SDK removes that dependency)
  • Users who want to use MCP servers with zero code

Required permissions

  • API key access (e.g., CODEANY_API_KEY)
  • File system read/write (depending on configured tools)
  • Network access (for API calls and WebFetch/WebSearch)
  • Environment variable configuration

Risks and side effects

  • Tools may perform destructive operations (e.g., Bash, Write), configure permissions carefully
  • API key leakage risk
  • Models may produce inaccurate or harmful outputs
  • Dependence on third-party API availability and costs

Troubleshooting

  1. Check API key is correctly set
  2. Verify API type and base URL configuration
  3. Ensure Node.js version >= 18
  4. Check if model name supports auto-detection
  5. Inspect network connectivity and proxy settings
  6. Check disk space for session persistence

Use cases

Building autonomous agent applications
Executing multi-step tool-calling tasks
Integrating MCP servers
Developing custom skills and tools
Implementing chat interfaces or automation workflows

Supported clients

Claude DesktopFull support