Skip to main content

LLM Path

A lightweight tool for tracing LLM API requests.

Screenshot

Features

  • Transparent Proxy — Drop-in HTTP proxy that captures all LLM API traffic. Works with OpenAI, Anthropic (Claude), and Google (Gemini) APIs.
  • Request Visualization — Interactive web viewer to visualize the request 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

Proxy for More Providers

Google Agent Development Kit (ADK)

Start the proxy:

llm-path proxy --port 8080 --target https://generativelanguage.googleapis.com --output adk.jsonl

Set the environment variable for your ADK application:

GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:8080

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)

Development Guide

git clone https://github.com/wang0618/llm-path.git
cd llm-path
uv sync

uv run llm-path proxy --port 8080 --target https://api.openai.com --output trace.jsonl &
uv run llm-path cook trace.jsonl -o ./viewer/public/data.json

cd viewer
npm install
npm run dev

License

MIT

  1. nanobot is a lightweight OpenClaw implementation in Python. ↩

  2. The deep research agent is from the Google ADK demo, see deepresearch ↩

Metadata

Release files for llm-path 0.3.0

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

Source distribution (sdist)

Source distribution for llm-path 0.3.0
File Size Uploaded
llm_path-0.3.0.tar.gz 94.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-path 0.3.0
File Interpreter ABI Platform
llm_path-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 197.5 kB

Release files / llm_path-0.3.0.tar.gz

Download URL llm_path-0.3.0.tar.gz
Size 94.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cc912b4b167e0336325c8189c1b9b73fafc13ca2bc30665ae83c36ba6f406b6f
BLAKE2b-256 checksum
How to use checksums
f6995386f2859620eb6614dfe6be7eb88e5281f32ac5de5ad51b7497e665ea06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 24, 2026.

Transparency log

Release files / llm_path-0.3.0-py3-none-any.whl

Download URL llm_path-0.3.0-py3-none-any.whl
Size 103.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
743133e021629d73e5955f7d72d24e167ddba3422cf2a888f2513a903da2a52e
BLAKE2b-256 checksum
How to use checksums
690bc7b94f38ac6a8c8dd8b1d6f97f5666a1a8f057b6588614250662397278ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

1 release file

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