Milkey Skills SDK
An adapter-first TypeScript SDK for adding Milkey skills to existing AI products.
@milkeyskills/sdk is the public TypeScript SDK for connecting Milkey skills into existing AI products without replacing your current provider client, prompts, memory, or runtime.
Adapter-first
Map Milkey into provider-native shapes instead of hiding providers behind a new abstraction layer.
Thin surface
The SDK stays focused on Milkey contracts, adapters, and typed client behavior.
Mode-aware
Inline, hosted, and auto mode stay explicit and inspectable per provider surface.
Production-ready
Typed errors, timeouts, abort handling, and release checks are built into the package.
What it is
- The SDK does: expose typed Milkey backend contracts, map Milkey tools into provider-native formats, and provide helper functions for tool follow-up flows.
- The SDK does not: replace your model provider, become an agent runtime, own prompts, or own your full conversation system.
- Version today: 0.1.4.
Right mental model
Quickstart
npm install @milkeyskills/sdkimport { milkey } from "@milkeyskills/sdk" const milkeyClient = milkey.createClient({ baseUrl: process.env.MILKEY_BASE_URL!, apiKey: process.env.MILKEY_API_KEY!,})From there, choose the provider page that matches the API surface your app already uses.
Core principles
- Adapter-first: the SDK adapts to OpenAI, Anthropic, Gemini, and AI SDK shapes instead of inventing a new universal runtime.
- Provider-native: helper outputs look like the provider you already use, so the rest of your stack does not need to be rewritten.
- Thin orchestration boundary: your app keeps prompts, state, retries, routing, logging, and business policy.
Next docs
Start here
Provider Support Matrix
See which providers, API variants, and modes are supported right now.
Architecture
Inline vs Hosted
Choose the right delivery path before you write provider-specific integration code.
Core API
Milkey Client API
Understand createClient, client methods, config fields, and canonical tools.
Resolution logic
Capabilities & Modes
Understand auto mode and the capability table behind provider defaults.
Reliability
Errors
Handle config, timeout, HTTP, and malformed tool-call failures correctly.
Provider quickstart
OpenAI Chat
Use Milkey inline or hosted tools with Chat Completions while keeping full transcript control.
Provider quickstart
OpenAI Responses
Use the recommended OpenAI hosted path first, then inline mode only when you need full loop ownership.
Provider quickstart
OpenAI Realtime
Use the hosted-only Realtime helper when you need OpenAI Realtime plus Milkey-hosted MCP delivery.
Provider quickstart
Anthropic
Connect Milkey to Anthropic Messages with the hosted MCP beta path or the inline tool path.
Provider quickstart
Gemini generateContent
Use Milkey inline tools with the official Google Gen AI SDK and a bounded function-calling loop.
Provider quickstart
Gemini Interactions
Use the hosted Gemini Interactions path when you want provider-native `mcp_server` configuration.
Provider quickstart
AI SDK
Use the thin inline AI SDK helper when you want Milkey tools as native AI SDK tool objects.