Skip to main content
Pydantic Logfire

AI Observability Platform for LLMs, Apps & AI Agents

Monitor your entire AI application stack, not just the LLM calls. Logfire is a production-grade observability platform for AI and general applications. See LLM interactions, agent behavior, API requests, and database queries in one unified trace. With SDKs for Python, JavaScript/TypeScript, and Rust, Logfire works with all OpenTelemetry-compatible languages.

Pydantic Logfire — spans and traces at a glance

Companies who trust Pydantic Logfire

Boosted.ai logo
DeepScribe logo
Airbyte logo
Evergreen.ai logo
Fleet AI logo
Seekr logo
Polar.sh logo
Stuut logo
Alpaca logo
Motorway logo
WorkWhile logo
Sophos logo
Aignostics logo
Amboss logo
Motorola logo
Epistemix logo
Nous Research logo
Pictet logo
SimpleClub logo
Tiger Data logo
Vox Media logo
ZenHub logo
Weaviate logo

Understanding

What is an AI observability platform?

An AI observability platform is a tool that provides advanced features beyond traditional monitoring. While standard monitoring tells you that a system failed, an observability tool allows you to identify the underlying causes. In the era of Large Language Models (LLMs) and autonomous agents, this distinction is critical.

An effective AI observability platform allows engineering teams to trace the lifecycle of a prompt, analyze token usage and latency per step, and benchmark model responses against groundedness and toxicity metrics.

The Full Picture

Break down silos: one tool for both AI and general observability

Most engineering teams are forced to use one observability tool for their backend application and a completely separate one for their LLMs. However, problems in production AI applications rarely come from the LLM alone. They hide in the seams: slow database queries that delay context retrieval, API timeouts during agent tool calls, inefficient vector searches, or memory leaks in background tasks. You need visibility across your entire application stack, not just the LLM calls.

What Logfire shows you

  • Complete application traces from request to response
  • Database queries, API calls, and business logic
  • Dashboards and application metrics
  • One platform with first-class AI & general observability for your entire application

What others show you

  • LLM request/response only
  • Missing context on performance bottlenecks
  • No visibility into retrieval quality
  • Separate tools for app monitoring

The Pydantic Stack

From prompt to validated output in one trace

See how Pydantic AI, AI Gateway, and Logfire work together. Define your schema with Pydantic models, extract structured data with an AI agent, route through Gateway for model flexibility, and observe the entire flow in Logfire.

import logfire
from pydantic import BaseModel
from pydantic_ai import Agent

logfire.configure()
logfire.instrument_pydantic_ai()


class City(BaseModel):
    name: str
    country: str
    population: int
    tourist_population: int
    landmarks: list[str]


agent = Agent(
    'gateway/openai:gpt-5',
    output_type=City,
    instructions='Extract information about the city',
)
result = agent.run_sync(
    'London is home to over nine million people, making it the largest city in the United Kingdom.
     Around thirty million tourists visit each year, drawn by landmarks like Big Ben, the Tower
      of London, and Buckingham Palace.'
)

logfire.info(f'Here is the output: {result.output=}')

Logfire instrumentation for structured output example

Why Logfire for AI Observability?

OpenTelemetry-Native

Any framework with OTel instrumentation works automatically. No special Logfire integration needed. Vercel AI SDK, LangChain, FastAPI—enable OTel, point to Logfire, done.

Complete Application Traces

See your entire application: LLM calls, agent reasoning, database queries, API requests, vector searches, business logic, JS/TS frontend.

Logfire Acts as an MCP Server

Use your favorite coding assistant (like Claude Code, Open Code, and Cursor) to talk directly to your Logfire data inside your code editor.

Integrated Evaluation Framework

Use Pydantic Evals to continuously evaluate LLM outputs in production. Curate datasets from production traces and catch regressions before users do.

Real-Time Cost Tracking

Track LLM API costs in real-time. Identify expensive prompts, optimize model selection, and set budget alerts. See exactly where your AI spending goes.

Pydantic AI & AI Gateway Integration

Natively integrates with Pydantic AI and Pydantic AI Gateway for model routing & budget control across all major LLM providers.

From Local Dev to Production

See all app traces in real-time as you code. Catch bugs in development, carry the same observability through to production. No tool switching, no friction.

First-Party SDKs for Python, JS/TS, Rust

Full SDKs for Python (AI frameworks), JavaScript/TypeScript (Node.js, Next.js, browsers, Cloudflare Workers, Deno), and Rust . Plus any OTel language.

Query Your Data with SQL

Drill down into your traces with SQL and use Natural Language Processing (NLP) to auto-generate your SQL queries.

Need self-hosting, SSO, or custom data retention? Talk to our team

Open Standards

Monitor your stack with OpenTelemetry

Logfire is built on OpenTelemetry, giving you a unified view of logs, traces, and metrics with no vendor lock-in. Our SDKs for Python, Rust, and TypeScript make instrumentation simple, and power features like live spans that render before they complete.

Logs

Structured and automatically redacted, with every log (span) linked to its trace. Search instantly or query with SQL.

Traces

One end-to-end timeline that combines APIs, databases, third-party calls, LLMs, and AI agents in one view.

Metrics

Track what matters to you: latency, errors, performance, cost, or any trend across your system. Set custom SLOs and alerts to keep your application reliable.

Multi-Language Support

Built for polyglot architectures

Real applications are rarely single-language. Your Python AI backend talks to a TypeScript frontend, Go microservices, and Java legacy systems. Logfire traces them all in unified, correlated views.

Python AI + TypeScript Frontend

See your agents and Next.js frontend in unified traces. Track requests from browser to AI model and back.

Microservices in Multiple Languages

Python, Go, Java, Node.js - one dashboard, complete visibility. Trace requests across service boundaries automatically.

Edge + Backend

Cloudflare Workers or Vercel Edge to Python backend, traced end-to-end. See latency at every hop.

Build with Vercel and trace with Logfire

Logfire works seamlessly with the Vercel ecosystem. Use @vercel/otel automatic server-side tracing, or our browser SDK for client-side visibility. The Vercel AI SDK has built-in OTel support - just enable it.

Integrations

Logfire works with your entire stack

Observability should not require a rewrite of your codebase. Built on open standards (OTel) with SDKs for Python, Javascript/Typescript, and Rust, Logfire supports auto-instrumentation for AI frameworks, web frameworks, databases, background workers, browsers, and more.

JavaScript / TypeScript

✨ Vercel AI SDK has built-in OTel support—no special integration needed

Rust

Built on tracing + OpenTelemetry ecosystem

Any Language via OpenTelemetry

Logfire is built on OpenTelemetry. Any framework with OTel instrumentation works automatically — no special integration needed. Our listed integrations are convenient wrappers, not requirements.

Go Java .NET Ruby PHP Erlang/Elixir Swift C++

Learn more about using standard OTel →

Insights

Query your data with full SQL

Query your data with full Postgres flavored SQL — all the control and (for many) nothing new to learn. Even if you don't like writing SQL, LLMs do, so SQL plus an MCP server lets your IDE use Pydantic Logfire as a window into your app's execution. Search for obstacles and opportunities, as you (or the AI) writes code.

With Proprietary DSLs

  • • Limited to anticipated queries
  • • AI assistants struggle with unfamiliar syntax
  • • Constrained analysis capabilities
  • • Vendor lock-in

With Logfire SQL

  • • Ask any question, get any answer
  • • AI assistants write excellent SQL
  • • Full analytical power—JOINs, aggregations, CTEs
  • • Familiar syntax—no new query language to learn
diagram showing an IDE using MCP server to query Logfire data

Enterprise Ready

Enterprise-level AI observability

AI applications often process sensitive user data. As a result, enterprise-level AI observability platforms need to meet strict security, compliance, and data privacy standards. Pydantic Logfire is architected to meet the rigorous governance standards of enterprise engineering teams.

Data sovereignty & self-hosting

Industries with strict data residency requirements (Finance, Healthcare, Legal) can make use of our fully self-hosted enterprise plan.

SOC2 Type II certified

Logfire is SOC2 Type II certified. We did not receive any exceptions in our report. A copy is available upon request.

HIPAA compliant

Logfire is HIPAA compliant. We are able to offer Business Associate Agreements (BAAs) to customers on our enterprise plans.

GDPR compliance & EU data region

Pydantic is fully GDPR compliant. For customers who need data kept in the EU, we offer an EU Data Region .

Logfire is already making developers' lives easier

Before Logfire, understanding what went wrong meant digging through huge text logs. Now we can trace an agent’s reasoning step by step, fix issues in minutes, and keep the platform fast even when tens of thousands of users are active.
Read case study
Zach Silver, Staff Software Engineer at Boosted.ai
With Logfire we can see the whole conversation thread, the LLM call, and every API hop - all in one go. It saves me a ton of time.
Read case study
Peter Kim, Principal Software Engineer at Sophos
We migrated from Langsmith to Logfire and the time it took to query our agent traces went down by 96%.
Andrew Pignanelli, Founder and CEO at General Intelligence Company
Logfire is the observability platform built by the stellar team behind Pydantic, if you use FastAPI or Pydantic in general, you should definitely check it out!
Sebastián Ramírez, Founder and CEO at FastAPI
We implemented the same system with several tools and it was clear that Pydantic AI is the right tool for us, it felt easier. It was nicer in every way. We really loved the integration with Logfire, which was so simple.
Read case study
Alon Menczer, Senior Developer at Lema AI

Ready to see your complete AI application?

Start monitoring your LLMs, agents, and entire application stack in minutes. 10 million free spans per month. No credit card required.

Frequently asked questions

What is AI observability?
AI observability describes a system that provides end-to-end visibility across an application and all its AI layers: LLMs, RAG, and agents. An AI observability platform correlates logs, traces, metrics, prompts, parameters, cost, and quality signals in one place and on one timeline.
What is the difference between APM and AI Observability?
Traditional Application Performance Monitoring (APM) focuses on system health metrics like CPU usage and request latency. AI Observability extends this to include LLM-specific metrics such as token usage, cost per request, prompt inputs/outputs, and hallucination detection.
How does Logfire help with RAG (Retrieval-Augmented Generation)?
Logfire traces the entire RAG pipeline. You can see the user query, the vector database retrieval latency, the retrieved context chunks, and the final LLM generation. All in one timeline to identify bottlenecks or relevance issues.
Does Logfire work with LangChain and LlamaIndex?
Yes. Logfire provides auto-instrumentation for major AI frameworks including LangChain and LlamaIndex, allowing you to visualize complex agentic chains and retrieval flows automatically.
Does Logfire support AI Agents?
Yes. Agent steps (tool calls, retrieval, reasoning phases) appear as spans with duration, errors, and cost, enabling loop detection, step-level SLOs (task success rate, avg steps), and precise optimization.
Is Logfire OpenTelemetry-native?
Yes. Logfire ingests OpenTelemetry signals and preserves OTLP portability, so you can reuse existing instrumentation, forward subsets to your SIEM/warehouse, and avoid vendor lock-in.
Do I need special Logfire integrations for my framework?
No. Logfire works with any OpenTelemetry-compliant instrumentation automatically. If your framework has OTel support (many do, including Vercel AI SDK, LangChain, FastAPI, Express, and hundreds more), you can simply enable it and configure the OTel exporter to send to Logfire. Our listed integrations are convenient wrappers that simplify setup, but they're optional—standard OTel always works.
How does Logfire handle security, privacy, and PII?
Logfire supports edge redaction through SDKs and collectors, role-based access with SSO, retention controls, and audit logs. For compliance posture, SOC 2, HIPAA, GDPR, and document request details, see the security page.
Can Logfire help control and reduce the cost of running AI and LLMs?
Yes. Track metrics such as token usage, cost per session/feature/route, and model/provider mix. Define custom SQL-backed alerts and budget caps to ensure costs stay within pre-defined boundaries.
Is Logfire only for Python applications?
No. Logfire is built on OpenTelemetry and works with any language. We provide first-party SDKs for Python (with deep integrations for AI frameworks), JavaScript/TypeScript (supporting Node.js, Next.js, browsers, Cloudflare Workers, and Deno), and Rust. For Go, Java, .NET, Ruby, and any other language with OpenTelemetry support, use standard OTel libraries - they work automatically with Logfire. Many teams use Logfire for polyglot architectures: Python AI backend + TypeScript frontend, microservices in multiple languages, etc. One dashboard, unified traces.
What exactly is Logfire and how is it different from other observability tools?
Logfire is a full-stack AI observability platform, not just a logging tool or LLM-specific monitor. Unlike traditional APMs that focus on infrastructure metrics, and unlike LLM-only tools that only show prompt inputs and outputs, Logfire gives you end-to-end visibility across your entire application — from HTTP requests and database queries to LLM calls, agent workflows, and RAG pipelines — all in a single, correlated timeline.
How does Logfire compare to LangSmith / Langfuse?
LangSmith and Langfuse focus primarily on LLM-layer tracing — prompt management, evaluation, and model behavior analysis. Logfire takes a broader approach: it's built on OpenTelemetry and provides full-stack observability across your entire application, including AI components. If your question is "why did the agent choose that tool?" a prompt-focused tool may help. If it's "why is this request slow, where's the bottleneck, and what's it costing me?" — that's what Logfire is built for.
Does Logfire only work with Pydantic AI, or can I use it with other frameworks?
Logfire works with any framework, not just Pydantic AI. It's built on OpenTelemetry, so any application with OTel instrumentation can send data to Logfire — including LangChain, LlamaIndex, Vercel AI SDK, FastAPI, Django, Express, and hundreds more. Likewise, Pydantic AI uses OpenTelemetry for its observability, so it can send data to any OTel-compatible backend, not just Logfire. There's no closed ecosystem.
How do I get started / how much code does it take?
Getting started with Logfire takes less than 5 minutes. Install the SDK (pip install logfire for Python, or npm install logfire for JavaScript/TypeScript), call logfire.configure(), and you're sending data. For AI frameworks like Pydantic AI, add one line — logfire.instrument_pydantic_ai() — to get full agent tracing automatically.
What does it cost? Is it really free?
Logfire's free Personal plan includes 10 million logs/spans/metrics per month with no credit card required. Paid plans start at $49/month (Team) and $249/month (Growth), both with additional records at $2/M above their included allowance; Enterprise is custom-priced with volume discounts. Every paid plan includes a price cap option so there are no surprise bills. See the pricing page for full details.
Can I self-host Logfire?
Logfire's SDKs are open source, but the server application and UI are closed source. For teams with data residency requirements, Logfire offers both EU and US hosting regions, and the Enterprise plan includes self-hosted deployment options with dedicated support. Contact the team for details.
FOR DEVELOPERS
Ready to start building?

Logfire's has SDKs for Python, TypeScript/JavaScript, and Rust. The Python SDK is open source under the MIT license and wraps the OpenTelemetry Python package. By default, it will send data to the Logfire platform but you could send data to any OpenTelemetry Protocol (OTLP) compliant endpoint.