Core Concepts
The Lucidic AI TypeScript SDK uses the same hierarchical structure as the Python SDK to track your AI workflows.Hierarchy Overview
Sessions
A Session represents a complete AI workflow or conversation. It’s the top-level container for all tracking data.Creating Sessions
Session Properties
Managing Sessions
Steps
Steps represent logical units of work within a session.Creating Steps
Step Properties
Managing Steps
Automatic Step Creation
If you make an LLM call without an active step, one is created automatically:Events
Events represent individual operations within steps - typically LLM API calls.Automatic Event Creation
When using instrumented providers, events are created automatically:Manual Event Creation
For custom tracking or unsupported providers:Event Properties
Automatic Behaviors
The TypeScript SDK includes several automatic features:1. Auto Session Ending
Sessions automatically end when the process exits:2. Auto Step Ending
Active steps are automatically ended when the session ends.3. Auto Event Creation
LLM calls from instrumented providers create events automatically:Best Practices
1. Prefer withLucidic for Self-Contained Workflows
UsewithLucidic
for one-shot tasks that should end when work finishes. See Session Context.
2. Consistent Evaluation
3. Error Handling
Next Steps
- Provider Integrations - Setup for OpenAI, Anthropic, and others
- Advanced Features - Multimodal, masking, and more
- API Reference - Complete function documentation