Prerequisites
Node.js 18+ or Bun 1.0+ Verify your installation:Install SDK
Install LLM Provider SDK
Install your LLM provider’s official SDK:Quick Start
Create a simple trace:Framework Integration
Next.js
App Router (Recommended):Express
Fastify
Environment Variables
Set up environment variables for configuration:TypeScript Support
The SDK is written in TypeScript with full type definitions. tsconfig.json:Verification
Verify the SDK is working: 1. Send a test trace:Troubleshooting
Module not found
Error:Cannot find module '@uselumina/sdk'
Solution: Reinstall dependencies:
Connection refused
Error:ECONNREFUSED localhost:9411
Solution: Verify Lumina is running:
TypeScript errors
Error:TS2307: Cannot find module '@uselumina/sdk'
Solution: Add types to tsconfig.json: