See where your agent burns tokens β€” without a proxy.

Audit your LLM token spend by pasting a trace. TokenDam gives you the line-item waste β€” uncached prefixes, bloated context, dead tools, duplicated docs, runaway reasoning β€” each with a dollar figure and a fix. No SDK swap, no gateway, no routing your prod traffic through anyone.

πŸ”’ 100% in your browser. Your trace never leaves this tab β€” no upload, no server, no logging.

Trace JSON
reads: OpenAI Β· Anthropic Β· LangSmith Β· Langfuse Β· Vercel AI SDK Β· Batch Β· raw logs
How do I get my trace? β†’

A "trace" is just the request payload(s) you send the model. Capture a few calls from one agent run β€” caching, history & duplicate-doc waste only show across multiple calls.

// easiest: the capture helper (any SDK)
import { tap, writeTrace } from "tokendam/capture";
await openai.chat.completions.create(tap({ model, messages, tools }));
await writeTrace("trace.json");   // then paste trace.json here

β€” or log the request args yourself β€”

Raw OpenAI SDK

const params = { model, messages, tools };
console.log(JSON.stringify(params));
// paste it β€” or wrap several as [p1, p2, ...]
const res = await openai.chat.completions.create(params);

Raw Anthropic SDK

const req = { model, system, messages, tools };
console.log(JSON.stringify(req));
// TokenDam reads your cache_control markers directly
const res = await anthropic.messages.create(req);

Vercel AI SDK

const openai = createOpenAI({
  fetch: async (url, init) => {
    console.log(init?.body); // the exact request JSON
    return fetch(url, init);
  },
});

LangChain / LangSmith

from langsmith import Client
print(Client().read_run(run_id).inputs)
# paste the JSON β€” or paste a run/array of runs directly

Tip: add each response's usage object to include output-cost and score real cache hits.

How this fits

TokenDamProxies & gateways
(Tokenwise, OpenRouter, Portkey…)
SetupPaste a trace β€” zero integrationRoute your prod traffic through them
Sees your promptsNever β€” runs in your browserYes β€” sits in the request path
Best forAuditing & fixing waste at the sourceOngoing routing / failover / caching

Use TokenDam to find and fix the waste in your prompts; reach for a gateway when you want to route traffic. They're complementary β€” TokenDam just doesn't ask you to trust it with your data.