
Open Agent Sdk
Embed an in-process Claude-compatible agent loop in TypeScript for serverless, Docker, or CI without a local Claude CLI subprocess.
Overview
Open Agent SDK is an agent skill for the Build phase that shows how to build and deploy in-process TypeScript agents with `@shipany/open-agent-sdk` without Claude CLI dependencies.
Install
npx skills add https://github.com/aradotso/trending-skills --skill open-agent-sdkWhat is this skill?
- In-process `@shipany/open-agent-sdk`—open-source, API-compatible alternative to `@anthropic-ai/claude-agent-sdk`
- Runs without local CLI subprocess—suited to cloud, serverless, Docker, and CI/CD
- Node.js 18+ install via npm with Anthropic or OpenRouter-style base URL configuration
- Programmatic `options.env` and API key overrides for hosted deploy targets
- Trigger phrases cover serverless agents, TypeScript autonomous loops, and CLI-free deploy
- Requires Node.js 18+
Adoption & trust: 647 installs on skills.sh; 31 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Claude-compatible agent loops in serverless or containerized Node hosts where spawning a local Claude CLI is impossible or undesirable.
Who is it for?
Indie builders shipping agent features on Vercel, Fly, Docker, or CI who want TypeScript control and open-source SDK code paths.
Skip if: Non-TypeScript stacks, pure prompt-only chat with no programmatic agent loop, or teams standardizing only on Anthropic’s hosted CLI toolchain.
When should I use this skill?
Use open agent sdk; build an AI agent with open-agent-sdk; deploy claude agent without CLI; create autonomous agent in TypeScript; agent sdk for serverless or cloud; replace claude-agent-sdk with open source; run AI agen
What do I get? / Deliverables
You configure npm install, API auth, and in-process agent options so autonomous loops run in your app or CI like the official SDK—but fully in-process.
- Configured SDK install and env/auth setup
- In-process agent loop integration pattern
- Deploy-ready agent entrypoint for cloud or CI
Recommended Skills
Journey fit
Build is primary because the skill centers on implementing and configuring the SDK in your application codebase. Agent-tooling is the correct shelf for SDK setup, auth env vars, and in-process agent loops versus generic backend CRUD.
How it compares
In-process open-source SDK skill—not an MCP server catalog entry or desktop Claude Code workflow.
Common Questions / FAQ
Who is open-agent-sdk for?
Solo developers building autonomous agent features in Node/TypeScript who deploy to cloud, serverless, or containers and cannot rely on a local CLI subprocess.
When should I use open-agent-sdk?
During Build agent-tooling when integrating `@shipany/open-agent-sdk`, replacing `@anthropic-ai/claude-agent-sdk` in restricted hosts, or setting up OpenRouter-compatible agent loops.
Is open-agent-sdk safe to install?
The skill describes npm packages and API keys you must protect; review the Security Audits panel on this page and pin dependency versions in your repo.
SKILL.md
READMESKILL.md - Open Agent Sdk
# Open Agent SDK > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. Open Agent SDK (`@shipany/open-agent-sdk`) is a fully open-source, in-process AI agent framework for TypeScript/Node.js. It runs the complete Claude Code agent engine directly — no local CLI subprocess required — making it suitable for cloud servers, serverless functions, Docker containers, and CI/CD pipelines. It is API-compatible with `@anthropic-ai/claude-agent-sdk`. --- ## Installation ```sh npm install @shipany/open-agent-sdk ``` Requires Node.js 18+. --- ## Authentication & Configuration Set the Anthropic API key as an environment variable: ```sh export ANTHROPIC_API_KEY=your-api-key ``` Or use a third-party provider (e.g. OpenRouter): ```sh export ANTHROPIC_BASE_URL=https://openrouter.ai/api export ANTHROPIC_API_KEY=your-openrouter-key export ANTHROPIC_MODEL=anthropic/claude-sonnet-4-6 ``` These can also be passed programmatically via `options.env` or `apiKey`/`baseURL` in `createAgent()`. --- ## Core API ### `query({ prompt, options })` — Streaming, compatible with official SDK Returns an `AsyncGenerator<SDKMessage>`. Drop-in replacement for `@anthropic-ai/claude-agent-sdk`. ```typescript import { query } from '@shipany/open-agent-sdk' for await (const message of query({ prompt: 'Find and fix the bug in auth.ts', options: { allowedTools: ['Read', 'Edit', 'Bash'], permissionMode: 'acceptEdits', }, })) { if (message.type === 'assistant' && message.message?.content) { for (const block of message.message.content) { if ('text' in block) process.stdout.write(block.text) else if ('name' in block) console.log(`\n[Tool used: ${block.name}]`) } } else if (message.type === 'result') { console.log(`\nDone: ${message.subtype}`) } } ``` --- ### `createAgent(options)` — Reusable agent with session state ```typescript import { createAgent } from '@shipany/open-agent-sdk' const agent = createAgent({ model: 'claude-sonnet-4-6', systemPrompt: 'You are a senior TypeScript engineer. Be concise.', maxTurns: 20, }) // Blocking call const result = await agent.prompt('Read package.json and describe the project') console.log(result.text) console.log(`Tokens used: ${result.usage.input_tokens + result.usage.output_tokens}`) // Streaming call for await (const msg of agent.query('Now add JSDoc to all exported functions')) { if (msg.type === 'assistant' && msg.message?.content) { for (const block of msg.message.content) { if ('text' in block) process.stdout.write(block.text) } } } // Session management const history = agent.getMessages() // full conversation history agent.clear() // reset session ``` --- ## Options Reference | Option | Type | Default | Description | |---|---|---|---| | `model` | `string` | `claude-sonnet-4-6` | Claude model ID | | `apiKey` | `string` | `ANTHROPIC_API_KEY` env | API key | | `baseURL` | `string` | Anthropic API | Override for third-party providers | | `cwd` | `string` | `process.cwd()` | Working directory for file/shell tools | | `systemPrompt` | `string` | — | Custom system prompt prepended to agent | | `tools` | `Tool[]` | All built-in | Override the full tool list | | `allowedTools` | `string[]` | all | Whitelist specific tools by name | | `permissionMode` | `string` | `bypassPermissions` | `acceptEdits`, `bypassPermissions`, `plan`, `default` | | `maxTurns` | `number` | `100` | Maximum agentic lo