Requirements
- Node.js 18 or later
- The Sinker Rust sidecar running on
localhost:7777(see the repo README) - An API key for your chosen model provider (
OPENAI_API_KEY,ANTHROPIC_API_KEY,GROQ_API_KEY, orXAI_API_KEY)
Install
- npm
- pnpm
- yarn
ESM
The SDK is published as native ESM ("type": "module"). If you’re using CommonJS, import it with a dynamic import():
TypeScript
Full.d.ts declarations are included. No @types/ package needed. Requires "moduleResolution": "NodeNext" (or "Bundler") in your tsconfig.json:
Verify the connection
SinkerError: Request failed: fetch failed — start the sidecar first with sinker start from the sinker/ directory.