SDK Reference
The Adaline SDK enables you to build production-ready AI agentic applications with enterprise-grade observability and deployment management.TypeScript SDK Available Now! The Adaline SDK is currently available in TypeScript. Python SDK is coming soon. Stay tuned for updates!
Installation
Overview
The Adaline SDK provides two core capabilities:Deployment Management
Fetch and cache your deployed prompts with automatic background refresh:getDeployment()- Get a specific prompt deployment by IDgetLatestDeployment()- Get the latest prompt deployment by environment (e.g., production, staging)initLatestDeployment()- Initialize cached prompt deployment with auto-refresh
Observability & Monitoring
Track every AI agentic application interaction with structured traces and spans:- Monitor - Buffer and batch log submissions with automatic retries and automatic flushing
- Trace - High-level operation tracking (e.g., user request, workflow, agentic application interaction)
- Span - Granular operation tracking (e.g., LLM call, tool execution, retrieval, embedding generation, function call, guardrail check, etc.)
Quick Start
Key Features
Automatic Background Refresh
Keep your prompts up-to-date without redeploying your application:Smart Buffering & Batching
Optimize performance with automatic batching and retry logic:- Logs are buffered in memory and flushed in batches
- Automatic retry with exponential backoff on transient failures
- Configurable flush intervals and buffer sizes
- Failed entries are tracked and retried on next flush
Comprehensive Observability
Track everything in your AI agentic application:- Model spans - LLM inference calls (streaming and non-streaming)
- Tool spans - Function/API calls
- Retrieval spans - RAG and vector database queries
- Embeddings spans - Embedding generation
- Function spans - Custom application logic
- Guardrail spans - Safety and compliance checks
Rich Metadata
Attach detailed context to every operation and later search or filter on them.- Tags - Categorize and filter traces (e.g.,
['production', 'high-priority']) - Attributes - Key-value metadata (e.g.,
{ userId: '123', region: 'us-east' }) - Sessions - Group related traces by session ID (e.g.,
user-session-123) - References - Link traces and spans with custom IDs (e.g.,
trace-ref-001)