Skip to main content

Observability and replay for LLM agents

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loupe_sdk-0.3.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loupe_sdk-0.3.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file loupe_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: loupe_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for loupe_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7bafa6d88fe173a2103c8cd090328f383d583d10bc0c455cacaaa8cff24d14d0
MD5 cb2dc26c8d0632aa58efd441b6477e5b
BLAKE2b-256 4a91497dd8c77a6a27686eec828ebf0572d4968560c444a4ead99d75316ff354

See more details on using hashes here.

File details

Details for the file loupe_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: loupe_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for loupe_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5248c2a7ef9113bee751d1542f739b01931ef0a5362d2cfbbe2161d621984cd4
MD5 44c43f71fec7e43ef06c7f77f45f026c
BLAKE2b-256 3bafd9cbfe7e67dca713b22454f4be7c7483262b2ed3ebdf1c787ac0c8bcb01e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page