Skip to main content
Install the Lumina SDK for TypeScript and JavaScript applications.

Prerequisites

Node.js 18+ or Bun 1.0+ Verify your installation:
or

Install SDK


Install LLM Provider SDK

Install your LLM provider’s official SDK:

Quick Start

Create a simple trace:
Run it:
Check your dashboard at http://localhost:3000/traces to see the trace.

Framework Integration

Next.js

App Router (Recommended):
Pages Router:

Express

Fastify


Environment Variables

Set up environment variables for configuration:
Load in your application:

TypeScript Support

The SDK is written in TypeScript with full type definitions. tsconfig.json:
Type imports:

Verification

Verify the SDK is working: 1. Send a test trace:
2. Check dashboard: Open http://localhost:3000/traces and verify the trace appears.

Troubleshooting

Module not found

Error: Cannot find module '@uselumina/sdk' Solution: Reinstall dependencies:

Connection refused

Error: ECONNREFUSED localhost:9411 Solution: Verify Lumina is running:
Start Lumina if not running:

TypeScript errors

Error: TS2307: Cannot find module '@uselumina/sdk' Solution: Add types to tsconfig.json:

Next Steps

Configuration

Configure the SDK for your environment

Basic Usage

Learn basic tracing patterns

Advanced Usage

Multi-span tracing and error handling

API Reference

Complete SDK API documentation