Skip to main content

loupe-sdk

Python SDK for Loupe — open-source observability and replay for LLM agents.

Instrument your agent with three lines, see every trace in the dashboard, then replay any run with a different prompt or model and diff the outputs side-by-side.

Install

pip install loupe-sdk

Quick start

import loupe
from groq import Groq

loupe.init(api_key="lp_...", host="https://your-loupe-server.onrender.com")

client = Groq(api_key="...")
loupe.instrument_groq(client)          # also: instrument_openai, instrument_anthropic

@loupe.trace(name="my_agent")
def run_agent(query: str) -> str:
    with loupe.span("search", type="tool") as s:
        results = do_search(query)
        s.output = {"count": len(results)}
    ...

Every decorated call becomes a trace; every loupe.span() and auto-instrumented LLM call becomes a span under it.

Self-host

See the Loupe repo for the full server + dashboard setup.

Release files for loupe-sdk 0.3.1

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-sdk 0.3.1
File Size Uploaded
loupe_sdk-0.3.1.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for loupe-sdk 0.3.1
File Interpreter ABI Platform
loupe_sdk-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.3 kB

Release files / loupe_sdk-0.3.1.tar.gz

Download URL loupe_sdk-0.3.1.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fc38212a8419eb9306f495fa36dd33272568223f0e25c0466c7a9e87f4b3ed07
BLAKE2b-256 checksum
How to use checksums
ca02a6e2f6b950cd04d94124a2deeb940f46a605b51e6501a819ae907f92e88a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / loupe_sdk-0.3.1-py3-none-any.whl

Download URL loupe_sdk-0.3.1-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5cb0ec8071575ca7cc15de263cbbb9d41cb3db4c8233ccad56d278ae61f7d0f
BLAKE2b-256 checksum
How to use checksums
25502250e15db4c883787645fed52e239c592623909b574d297289caacc1e31b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release history Release notifications | RSS feed

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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