Install
Get @theokit/sdk installed in your project.
Requirements
| Requirement | Version |
|---|---|
| Node.js | 22.12 or newer |
| Package manager | npm, pnpm, yarn, or bun |
| TypeScript (optional but recommended) | 5.8+ |
Node 20 reached end-of-life in April 2026. Use nvm install 22 && nvm use 22 if you're on an older version.
Install
pnpm add @theokit/sdknpm install @theokit/sdkyarn add @theokit/sdkbun add @theokit/sdkVerify install
Run this one-liner to confirm the package resolved and the Agent namespace loaded:
node -e "console.log(require('@theokit/sdk').Agent ? 'ok' : 'fail')"You should see ok. If you see fail or a Cannot find module error, check your Node version (node --version) and re-run install with --force.
Optional peer dependencies
The SDK ships zero hard runtime deps for the core path. Some features pull optional peer deps on demand — install them only when you use the feature:
| Feature | Peer dep |
|---|---|
| MCP servers via stdio | @modelcontextprotocol/sdk |
| AWS Bedrock auto-token | @aws/bedrock-token-generator + @aws-sdk/credential-providers |
| GCP Vertex AI | google-auth-library |
| Memory: LanceDB backend | @lancedb/lancedb |
| Memory: cross-process locks | proper-lockfile |
| Telemetry (OTel spans) | @opentelemetry/api |
| Runtime schema validation | zod ≥3.25 |
The SDK detects missing peers at runtime and throws a typed ConfigurationError with the exact install command.
Troubleshooting
- "Unsupported engine" — your Node is below 22.12. Upgrade.
- "Module not found: @theokit/sdk" — your workspace may not include
node_modules/in module resolution. Trypnpm install --shamefully-hoistor check your bundler config. - TypeScript errors on import — set
"moduleResolution": "bundler"or"NodeNext"intsconfig.json.
Next
Continue to the Quickstart to build your first agent in 30 seconds, or jump to Providers if you need to pick an LLM provider first.