Skip to main content

loupe-ai — Python SDK

Forensic observability + circuit attribution for Python LLM agents. Zero-code capture of every LLM call to append-only JSONL traces, with a local dashboard, TUI, and SAE-based interpretability on top.

Install

pip install loupe-ai                  # CLI + dashboard + httpx capture, batteries included
pip install 'loupe-ai[interp]'        # adds the real SAE attribution backend (~150MB)
pip install 'loupe-ai[langgraph]'     # framework SDK extras: langgraph, anthropic, openai,
                                      # pydantic-ai, llama-index, dspy, crewai, autogen, openhands

From a clone of the repo: pip install -e '.[dev]'.

Quickstart

from loupe import trace, record_step
from loupe.integrations import patch_all

patch_all()                                  # auto-capture any installed LLM SDK

@trace(framework="anthropic")
async def my_agent(query: str):
    record_step("plan", "compose request")
    # ...your real agent code; LLM calls captured automatically
    return result

await my_agent("refactor auth.py")
# trace saved to ~/.loupe/traces/{run_id}.jsonl

View traces locally:

loupe ui              # opens http://localhost:7860 — live SSE dashboard
loupe list            # terminal table of every run
loupe attribute <id>  # SAE circuit attribution per llm-call step
loupe cluster         # find features that recur across tagged failures
loupe replay <id>     # re-invoke a captured run for reproducibility testing

See SPEC.md for the wire format and ARCHITECTURE.md for the layering.

Metadata

Release files for loupe-ai 0.0.83

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loupe-ai 0.0.83
File Size Uploaded Provenance Actions
loupe_ai-0.0.83.tar.gz 299.2 kB With provenance Details for loupe_ai-0.0.83.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loupe-ai 0.0.83
File Interpreter ABI Platform Actions
loupe_ai-0.0.83-py3-none-any.whl Python 3 none any Details for loupe_ai-0.0.83-py3-none-any.whl

Total release size: 544.5 kB

Release files / loupe_ai-0.0.83.tar.gz

Download URL loupe_ai-0.0.83.tar.gz
Size 299.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6bab109ae7b868916a31c7dfb1789588cf6b968f1e3fbb9042cb2bc193df31c0
BLAKE2b-256 checksum
How to use checksums
a2b4da96e0abe0e736ee206761260af747a679780805327ba95906f868ed92cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.

Transparency log

Release files / loupe_ai-0.0.83-py3-none-any.whl

Download URL loupe_ai-0.0.83-py3-none-any.whl
Size 245.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6ea5c04c280024ae32c9d82caf4da25aacebd02ae93f38ae168f87030544a54
BLAKE2b-256 checksum
How to use checksums
2796a81d0869e48fbd0fc4286d6e26bd86d0a38d343d5e835ad6e27bc647795a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.

Transparency log

Security for loupe-ai 0.0.83

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for loupe_ai-0.0.83.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page