SDK Reference
The Adaline SDK enables you to build production-ready AI agentic applications with enterprise-grade observability and deployment management.Installation
- TypeScript
- Python
Overview
The Adaline SDK provides two core capabilities:Deployment Management
Fetch and cache your deployed prompts with automatic background refresh:getDeployment()/get_deployment()- Get a specific prompt deployment by IDgetLatestDeployment()/get_latest_deployment()- Get the latest prompt deployment by environment (e.g., production, staging)initLatestDeployment()/init_latest_deployment()- 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
- TypeScript
- Python
Key Features
Automatic Background Refresh
Keep your prompts up-to-date without redeploying your application:- TypeScript
- Python
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 (5xx)
- Configurable flush intervals and buffer sizes
- Failed entries are counted and dropped, following the OpenTelemetry error handling principle
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)