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.2.0.tar.gz (11.8 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.2.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loupe_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 11.8 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.2.0.tar.gz
Algorithm Hash digest
SHA256 6738589cc779d103f53861c041d00c2cf9bb738c744f9c3fbb921569ae789a12
MD5 dec645ef3eb9fa41a8b76c99226c5ac1
BLAKE2b-256 a5baf54d0f9322984d314a31a0f0a517363b4c280568be3c2554e604741ba8c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loupe_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b137658fa2abc97918cc87c3386434252971414d8046408db74a4213b6add6d4
MD5 7a108cd4d1f0e7a04ad2fd9cb06c7e71
BLAKE2b-256 637a84a60d3facb8d5bd4302b84ffe664a63db15a33fe9f6481c61a725ed00e3

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