Open beta · v0.1.0

Intercept.Visualize.Fix.
Before your agent
breaks production.

Open-source AI observability. Every token, every dollar, every context diff — visible in real time.

MIT licensed · self-hostable · TypeScript

Session cost
$0.000
across 12 steps
Context growth
500 → 84k tokens
Live traces
LIVE
Waiting for traces...
847 calls intercepted3 anomalies flagged
OpenAIAnthropicGroqLangChainAutoGPTCrewAIMistralOllamaLlamaIndexGPT-4oClaude SonnetGemini ProOpenAIAnthropicGroqLangChainAutoGPTCrewAIMistralOllamaLlamaIndexGPT-4oClaude SonnetGemini Pro
★Open sourceMIT licensedSelf-hostableTypeScript

The Problem

Your agent doesn't
know it's bleeding.

Every step in a multi-step agent re-sends the entire conversation history. By step 10, you're paying 39× what you paid on step 1. No alert fires. No log appears.

Token accumulation · 10 steps
1
500
3
3k
5
12k
7
34k
10
84k
16,700%
context growth
Step 1: 500 tokens → Step 10: 84,000 tokens
39×
cost multiplier
$0.004 per call → $0.158 per call in 9 steps
0
visibility
No logs. No diffs. No way to know.
Until now.

How It Works

Three lines of code.
Full observability.

01

Install

bash
npm install @prompt-tracer/sdk

One package. Works with OpenAI, Anthropic, and any OpenAI-compatible API. Zero configuration required.

02

Wrap your client

typescript
const ai = wrapOpenAI(openai, tracer);

A JavaScript Proxy intercepts every call. Tokens, cost, latency — captured automatically on the microtask queue.

03

Observe

sess-a3f1
$0.005
sess-b2c4
$0.012
sess-9e4danomaly
$2.10

Every session, every step, full context diff. Cost anomalies flagged the moment growth exceeds your baseline.

Integration

Drop-in.
Non-blocking.
Zero latency added.

JavaScript Proxy objects intercept calls — no monkey-patching. Telemetry fires on the microtask queue after your code continues. Your agent never slows down.

→Works with streaming responses
→Handles infinite agent loops safely
→Automatic retry with exponential backoff
→Full TypeScript types preserved
tracer.ts
import OpenAI from "openai";
import { Tracer, wrapOpenAI } from "@prompt-tracer/sdk";
const tracer = new Tracer({
ingestUrl: "https://app.com/api/ingest",
sessionId: crypto.randomUUID(),
});
const ai = wrapOpenAI(openai, tracer);
// Every call is now traced. Nothing else changes.
const res = await ai.chat.completions.create({
model: "gpt-4o",
messages,
});

Features

Everything you need
to stop flying blind.

INTERCEPT

Proxy-based capture

Native JavaScript Proxy wraps your LLM client. No monkey-patching. Original types fully preserved. Streaming works identically.

VISIBILITY

Context diff viewer

See exactly which messages were added or removed at every step. Stored as diffs — 85% storage reduction.

DETECTION

Cost anomaly engine

Automatic classification of normal, spike, and error steps. Flagged the moment context growth exceeds your session baseline.

SOON
REPLAY

Prompt replay engine

Re-fire any captured prompt against any model. A/B compare outputs. Optimize without re-running your entire agent.

Start tracing
in 5 minutes.

Free. Open source. No credit card required.

MIT licensed · self-hostable · your data never leaves your infrastructure