Documentation Index
Fetch the complete documentation index at: https://mintlify.com/The-Context-Company/observatory/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install the Observatory Python SDK using pip:Authentication
Set your API key as an environment variable:api_key parameter directly to any function:
Quick Start
Here’s a basic example of tracking an AI agent run:Core Concepts
Runs
A run represents a single execution of your AI agent. Use therun() function to create and track runs.
Steps
A step represents an individual LLM call within a run. Steps track prompts, responses, token usage, and costs.Tool Calls
A tool call represents a function or tool invocation during a run:API Reference
run()
Create and track AI agent runs
step()
Track individual LLM calls
tool_call()
Monitor tool and function invocations
LiteLLM
Auto-instrument LiteLLM completions
Environment Variables
Your Observatory API key
Custom Observatory endpoint URL (defaults to production)
Set to “1” to enable debug logging
Python Version Support
The SDK supports Python 3.9 and above:- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
