Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.observ.dev/llms.txt

Use this file to discover all available pages before exploring further.

Configuration Reference

OptionTypeDefaultDescription
apiKeystringYour Observ API key (required)
recallbooleanfalseEnable semantic caching
environmentstring"production"Environment tag for filtering
debugbooleanfalseEnable debug logging (TypeScript only)

Option Details

apiKey

Required - Your Observ API key for authentication and tracing. Get your API key from Settings → API Keys.
const ob = new Observ({
  apiKey: "your-observ-api-key",
});

recall

Intelligently cache similar prompts and reduce costs in a few lines of code. When enabled, Observ analyzes the semantic meaning of prompts and returns cached responses for similar requests, even if the exact wording differs.
const ob = new Observ({
  apiKey: "your-observ-api-key",
  recall: true, // Enable semantic caching
});
Semantic caching can reduce costs by up to 85% on similar prompts. It’s especially effective for: - Customer support chatbots - FAQ systems - Repeated queries with slight variations

environment

Tag traces with an environment identifier for filtering in the dashboard. Useful for separating production, staging, development, and test traces.
const ob = new Observ({
  apiKey: "your-observ-api-key",
  environment: "staging",
});
Common values: "production", "staging", "development", "test"

debug

TypeScript only - This option is not available in the Python SDK.
Enable detailed logging for debugging integration issues.
const ob = new Observ({
  apiKey: "your-observ-api-key",
  debug: true, // Enable debug logging
});
Debug mode logs:
  • API calls to Observ servers
  • Caching hits/misses
  • Tracing events
  • Error details

Complete Example

import Observ from "observ-sdk";

const ob = new Observ({
  apiKey: process.env.OBSERV_API_KEY,
  recall: true,
  environment: process.env.NODE_ENV || "development",
  debug: process.env.NODE_ENV === "development",
});

Environment Variables

OBSERV_API_KEY=your-observ-api-key
ENVIRONMENT=production

Next Steps

Usage Guide

Learn how to wrap provider clients

Session Tracking

Group related calls with sessions

Custom Metadata

Attach metadata to traces

Dashboard

View your traces and analytics