Skip to main content

Prerequisites

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

Step 1: Create NestJS Project

Step 2: Configure Environment

Create .env:
Update src/app.module.ts:

Step 3: Create Agent Module

Step 4: Implement Agent Service

Update src/agent/agent.service.ts:

Step 5: Implement Agent Controller

Update src/agent/agent.controller.ts:

Step 6: Update Agent Module

Update src/agent/agent.module.ts:

Step 7: Update Main Configuration

Update src/main.ts:

Step 8: Run the Server

Step 9: Test Your Agent