Skip to main content
LangWatch integrates with PydanticAI through its built-in OpenTelemetry support to capture traces of agent runs and model interactions.

Installation

Usage

The LangWatch API key is configured by default via the LANGWATCH_API_KEY environment variable.
Initialize LangWatch and create your PydanticAI agent. PydanticAI’s built-in OpenTelemetry support will automatically send traces to LangWatch.
LangWatch automatically captures all PydanticAI agent runs and model interactions through PydanticAI’s built-in OpenTelemetry support. Use @langwatch.trace() decorators to add custom traces and metadata as needed.