TypeScript SDK
The Lucidic AI TypeScript SDK provides full observability for your AI applications built with TypeScript/JavaScript. It offers automatic instrumentation for OpenAI and Anthropic, with the same powerful features as our Python SDK. It also exposes async-safe session context helpers for concurrent backends.Installation
Install the SDK via npm:Quick Start
Key Features
Automatic Instrumentation
- Automatic tracking for OpenAI and Anthropic
- Auto event creation for every LLM call
- Auto step creation when no active step exists
- Flush spans on exit (even when autoEnd is disabled)
Full TypeScript Support
- Comprehensive type definitions
- Async/await support throughout
- Type-safe configuration
Advanced Features
- Multimodal support (text and images)
- Cost tracking with built-in pricing data
- Data masking for sensitive information
- Mass simulations for testing at scale
- Prompt management from the platform
TypeScript vs Python SDK
Feature | TypeScript SDK | Python SDK |
---|---|---|
OpenAI Integration | ✅ Full support | ✅ Full support |
Anthropic Integration | ✅ With streaming limitation | ✅ Full support |
LangChain Integration | ✅ Available (OpenTelemetry) | ✅ Supported |
PydanticAI Integration | ❌ Not applicable | ✅ Supported |
Auto Instrumentation | ✅ OpenTelemetry | ✅ OpenTelemetry |
Multimodal Support | ✅ Text & Images | ✅ Text & Images |
Mass Simulations | ✅ Supported | ✅ Supported |
Prompt DB | ✅ Supported | ✅ Supported |
Data Masking | ✅ Supported | ✅ Supported |
Important: Import Order
For automatic tracking to work, use one of these patterns:Next Steps
- Installation & Setup - Detailed setup guide
- Core Concepts - Sessions, Steps, and Events
- Provider Integrations: OpenAI, Anthropic, Vercel AI
- API Reference - Complete function documentation