Skip to main content

Prerequisites

  • Node.js (v16 or higher)
  • npm or pnpm
  • OpenAI API key (or other AI service)

Step 1: Project Setup

Step 2: TypeScript Configuration

Create tsconfig.json:

Step 3: Create Express Server

Create src/server.ts:

Step 4: Environment Configuration

Create .env:

Step 5: Package Scripts

Update package.json:

Step 6: Run the Server

Step 7: Test Your Agent