LibreAI / AI Agents / logfire
// agents · pydantic/logfire

logfire

Pydantic Logfire: Python and AI observability on OpenTelemetry — SQL-queryable traces, metrics, and logs

★ 4.5k stars⑂ 309 forksMITupdated 2026-10
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

logfire is an open-source ai agents project by pydantic (pydantic/logfire on GitHub). It has 4,510 GitHub stars and 309 forks, is released under the MIT license, and was last updated on GitHub on 8 October 2026.

GitHub stars
4,510
Forks
309
License
MIT
Last updated on GitHub
8 October 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Decide your backend

    Use the Logfire cloud platform (free tier available) or export OpenTelemetry data to another backend.

  2. Install and authenticate

    Install the SDK from PyPI and run the auth command if you will send data to Logfire.

  3. Configure in code

    Call logfire.configure() in your application entry point.

  4. Instrument and inspect

    Add auto-instrumentation (for example for FastAPI) and view your first trace as a structured, queryable timeline.

// features

Why people love it

OpenTelemetry foundation

Built on OTel, so data can also flow to any OTel-compatible backend — no proprietary agent.

SQL-queryable observability

Query traces, metrics, and logs with plain SQL instead of a bespoke query language.

Python-object rich display

Data is shown as rich Python objects rather than flattened JSON strings.

One-call auto-instrumentation

Instrument frameworks such as FastAPI with calls like logfire.instrument_fastapi(app).

AI and agent observability

Purpose-built views and evals for LLM calls and agent behavior.

Pydantic validation analytics

See how your Pydantic models validate in production, from the team behind Pydantic itself.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Clone the project and enter its directory (most users install from PyPI instead).

    git clone https://github.com/pydantic/logfire.git
    cd logfire
  2. Install and authenticate

    Install the SDK and authenticate with the Logfire platform.

    pip install logfire
    logfire auth
  3. Configure and instrument

    Add configuration and auto-instrumentation to your app, then run it and open the Logfire UI.

    import logfire
    logfire.configure()
    logfire.instrument_fastapi(app)
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains Logfire?

Pydantic — the team behind the Pydantic data-validation library and Pydantic AI.

Is Logfire free?

The Python SDK in this repo is MIT-licensed and free. The hosted platform has free and paid tiers per the README, its backend is closed source, and self-hosting the platform requires an enterprise license.

Does it need a paid API key?

No paid key is required to start: the SDK is free, the cloud has a free tier, and you can export to any OpenTelemetry backend instead.

How does it compare to LangSmith or generic APM tools?

Logfire is OpenTelemetry-native and SQL-queryable, spans general Python observability (not only LLMs), and renders data as Python objects; LangSmith focuses on LLM tracing within its own platform.

How do I get started?

Run `pip install logfire`, `logfire auth`, add `logfire.configure()` to your app, and instrument your framework.

// keep exploring

Similar tools

AI Agents

openllmetry

OpenTelemetry-native observability for LLM apps.

★ 7.5k starsApache-2.0
View guide →
AI Agents

RagaAI-Catalyst

Python SDK for Agent AI Observability, Monitoring and Evaluation Framework. Includes features like agent, llm and tools tracing, debugging multi-agentic syst…

★ 16.2k starsApache-2.0
View guide →
AI Agents

ragas

Supercharge LLM app evaluations with objective metrics, synthetic test data and feedback loops.

★ 16.0k starsApache-2.0
View guide →
Agents

magentic

Use LLMs as plain Python functions: prompts become typed, testable code.

★ 2.4k starsMIT
View guide →
AI Agents

nocturne_memory

Nocturne_memory, in Python — built for a lightweight, rollbackable, and visual long-ter...

★ 1.4k starsMIT
View guide →
Agents

griptape

Modular Python framework for AI agents and workflows with tools and memory.

★ 2.6k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if logfire is not the right fit.

Get logfire

Free and open — grab the source, star the repo, and start creating.