Skip to main content
Learn how to integrate Icepick agents into your NestJS application using dependency injection and decorators.

Installation

Install the Icepick SDK and required dependencies:

Agent Setup

Create your agent definition (src/agents/my-agent.ts):

Service Integration

Create a service to handle agent operations (src/agents/agent.service.ts):

Controller Implementation

Create a controller to expose agent endpoints (src/agents/agent.controller.ts):

Module Configuration

Create and configure the agent module (src/agents/agent.module.ts):
Update your main app module (src/app.module.ts):

Environment Configuration

Configure your environment variables (.env):

Advanced Usage

Using Guards and Interceptors

Add authentication and logging:

Testing

Create unit tests for your agent service: