# open-agent-sdk

Guides you in deploying in-process TypeScript AI agents without local CLI dependencies. Useful for cloud containers and serverless tasks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 746 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/open-agent-sdk/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/open-agent-sdk

## What it does

The `@shipany/open-agent-sdk` package offers an open alternative to `@anthropic-ai/claude-agent-sdk`. This skill explains how to embed the autonomous loop directly into a Node.js process instead of spawning CLI subshells.

It covers core functions such as streaming `query()` and stateful `createAgent()`. Setup options include restricting tool access via `allowedTools`, setting turn limits, and wiring external MCP servers over stdio or HTTP.

Running this requires Node.js 18+ and an `ANTHROPIC_API_KEY`. Without them, execution fails immediately.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill open-agent-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/open-agent-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/open-agent-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill open-agent-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/open-agent-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill open-agent-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/open-agent-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills open-agent-sdk
```

2. **Manually: put the files in place**
- File: `.github/skills/open-agent-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill open-agent-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/open-agent-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/open-agent-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill open-agent-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/open-agent-sdk/SKILL.md

## When to use it
- run agent loops in-process without CLI subshells
- configure MCP servers in TypeScript applications
- restrict allowed tools for read-only agent workflows
- route agent requests to custom endpoints using baseURL

## Example prompts
- Show how to set up createAgent with read-only tools using open-agent-sdk
- How do I add an MCP filesystem server with open-agent-sdk in TypeScript?
- Migrate my project from claude-agent-sdk to open-agent-sdk

## Similar
- [rivet-sdk](https://affpapa.org/en/nevibecode/skills/anthropics-rivet-sdk.md) — skill · 2100 installs
- [linear-sdk-scripting](https://affpapa.org/en/nevibecode/skills/linear-sdk-scripting.md) — skill · 1200 installs
- [azure-sdk-typescript](https://affpapa.org/en/nevibecode/plugins/azure-sdk-typescript.md) — plugin · ★ 3149
- [migrate-ai-sdk-v6-to-v7](https://affpapa.org/en/nevibecode/skills/migrate-ai-sdk-v6-to-v7.md) — skill · 5500 installs
- [copilot-sdk-nodejs](https://affpapa.org/en/nevibecode/rules/copilot-sdk-nodejs.md) — rule · ★ 40451
- [sentry-node-sdk](https://affpapa.org/en/nevibecode/skills/sentry-node-sdk.md) — skill · 3300 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 199 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
