Skip to main content

A tool for tracing LLM requests

Project description

LLM Path

A lightweight tool for tracing LLM API requests — intercept, record, and visualize your LLM application's behavior.

Features

  • Transparent Proxy — Drop-in HTTP proxy that captures all LLM API traffic. Works with any OpenAI-compatible API and Anthropic API.
  • Request Visualization — Interactive web viewer to visualize the requests topology graph and show the context diff between requests.

Installation

pip install llm-path

Quick Start

1. Start the Proxy

llm-path proxy --port 8080 --target https://api.openai.com --output trace.jsonl

Replace the --target host in the command above with your LLM provider's API host.

2. Point Your Client to the Proxy

from openai import OpenAI

- client = OpenAI()
+ client = OpenAI(base_url="http://localhost:8080/v1")

All requests will be transparently forwarded to your LLM provider and recorded to the trace file.

3. Visualize the Traces

llm-path viewer trace.jsonl

CLI Reference

# Start proxy server
llm-path proxy [OPTIONS]
  --port      Port to listen on (default: 8080)
  --output    Output JSONL file path (required)
  --target    LLM Provider API URL (required)

# Visualize traces
llm-path viewer <input> [OPTIONS]
  --port      Port to listen on (default: 8765)
  --host      Host to bind to (default: 127.0.0.1)

License

MIT

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

llm_path-0.2.0.tar.gz (89.3 kB view details)

Uploaded Source

Built Distribution

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

llm_path-0.2.0-py3-none-any.whl (93.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_path-0.2.0.tar.gz
  • Upload date:
  • Size: 89.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_path-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f5fb79f6d6db9037accf97a2256c2f536c65bc953d05db8151b23646847f9e2
MD5 0ddda0ad3abea85c9bdbafc2ff89b329
BLAKE2b-256 4a34e4f6ad0d294e18aaf4ebd5978c8231fb0d6a8e4d5cf48123316df220e060

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_path-0.2.0.tar.gz:

Publisher: release.yml on wang0618/llm-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: llm_path-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 93.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_path-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4860835d30c459dd59b222260c846effc41527528a7b537b312dacc27ab2282c
MD5 6d4ae6b40d9c2406bc786b75a771a1d8
BLAKE2b-256 6fafc5f522e1a72dbfb22c3be6a6d7b9af77d6576ddcf64b2a6799e886b45095

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_path-0.2.0-py3-none-any.whl:

Publisher: release.yml on wang0618/llm-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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