Skip to main content
The AgentBasis Python SDK provides a simple, lightweight way to track the performance, traces, sessions, and behavior of AI agents. It sends data using the OpenTelemetry (OTel) standard, making it compatible with AgentBasis and other observability backends. This is the foundation SDK that enables deep observability for coded agents built with:

Pure Python

Track any function with decorators

LLM Providers

OpenAI, Anthropic, Gemini

LangChain

Full chain and tool tracing

Pydantic AI

Agent monitoring

Why AgentBasis?

  • Full Trace Visibility - See every LLM call, tool invocation, and chain execution with parent-child relationships
  • Per-User Debugging - Filter traces by user, session, or conversation to debug specific issues
  • Cost & Performance Tracking - Monitor token usage, latency, and costs across all your agents
  • Framework Agnostic - Works with OpenAI, Anthropic, Gemini, LangChain, Pydantic AI, pure Python and many more

Installation

pip install agentbasis

Next Steps

What is AgentBasis?

Learn about the platform and dashboard

Quick Start

Initialize the SDK and start tracking

Core Concepts

Learn about tracing and context

API Reference

Complete function reference