Installation Guide
Get started with AIDK in minutes.
Prerequisites
- Node.js 20 or later
- Package manager: pnpm (recommended), npm, or yarn
Quick Install
Choose your integration path:
Full Framework
Complete framework with all features.
pnpm add aidk
pnpm add aidk-ai-sdk ai @ai-sdk/openaiCore Packages
Essential
# Core framework
pnpm add aidk
# Choose an AI provider adapter
pnpm add aidk-ai-sdk ai @ai-sdk/openai # Vercel AI SDK
# OR
pnpm add aidk-openai # Direct OpenAI
# OR
pnpm add aidk-google # Google AIServer Integration
# Express.js
pnpm add aidk-express express
# NestJS
pnpm add aidk-nestjs @nestjs/common @nestjs/coreClient Integration
# React
pnpm add aidk-react aidk-client
# Angular
pnpm add aidk-angular aidk-clientTypeScript Configuration
AIDK requires JSX configuration. Update your tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"jsx": "react-jsx",
"jsxImportSource": "aidk",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
}
}Package Manager Notes
pnpm (Recommended)
pnpm add aidkWhy pnpm? Faster installs, better disk usage, strict dependency resolution.
Installing in current directory only (ignore workspace):
If you're in a pnpm workspace but want to install packages only in the current directory:
# Install in current directory, ignore workspace root
pnpm add --ignore-workspace aidk
# Or use the -w flag to disable workspace protocol
pnpm add -w aidkNote: Use --ignore-workspace when you want packages installed locally rather than hoisted to the workspace root.
npm
npm install aidkyarn
yarn add aidkVerify Installation
Create a test file to verify everything works:
// test.ts
import { Component } from 'aidk';
class TestAgent extends Component {
render() {
return <section>Hello AIDK</section>;
}
}
console.log('✅ AIDK installed successfully!');Run it:
npx tsx test.tsCommon Issues
JSX Transform Error
Error: Cannot find module 'aidk/jsx-runtime'
Fix: Ensure jsxImportSource is set to "aidk" in tsconfig.json
Module Resolution
Error: Cannot find module 'aidk'
Fix: Use "moduleResolution": "NodeNext" or "bundler" in tsconfig.json
Type Errors
Error: Type errors in IDE
Fix: Restart your TypeScript server or IDE
Version Compatibility
| AIDK Version | Node.js | TypeScript |
|---|---|---|
| 1.x | ≥ 20 | ≥ 5.0 |
Monorepo Setup
If you're using a monorepo (Turborepo, Nx, etc.), install AIDK in individual packages:
# In your agent package
cd packages/agents
pnpm add aidk aidk-ai-sdk
# In your server package
cd packages/server
pnpm add aidk-expressDocker
For Docker deployments:
FROM node:20-alpine
WORKDIR /app
# Install pnpm
RUN npm install -g pnpm
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source
COPY . .
# Build
RUN pnpm build
CMD ["node", "dist/server.js"]