Boxdawn
01/how it works

Cheap filter first, expensive check second.

Boxdawn reads your trace as a graph and runs a two-stage cascade. The structural pass finds candidate waste in microseconds. The semantic pass looks only at what survived — never at everything.

  trace.json  ─▶  ┌────────────────────────────┐
                  │  1. STRUCTURAL PASS        │
                  │     (byte-exact, O(n))     │
                  │     provable duplicate     │
                  └──────────┬─────────────────┘
                             │
                  ┌──────────▼─────────────────┐
                  │  2. CONTEXT RESEND         │
                  │     (chunk-level match)    │
                  │     input-side accounting  │
                  └──────────┬─────────────────┘
                             │
                  ┌──────────▼─────────────────┐
                  │  3. REDUNDANT READ         │
                  │     (file re-read events)  │
                  └──────────┬─────────────────┘
                             │
                  ┌──────────▼─────────────────┐
                  │  4. LLM-JUDGE (opt-in)     │
                  │     (semantic paraphrase)  │
                  │     API key required       │
                  └──────────┬─────────────────┘
                             ▼
                        report.md
pattern
repeat_node

The same agent runs on the same inputs again, with no new information in between.

pattern
pingpong

Two agents keep handing off without either producing a new state.

Implemented — not yet observed in real traces

pattern
context_resend

Every API call re-sends the whole conversation. On long agent sessions this compounds to ~97% of input tokens as re-sent context (byte-exact chunk match).

pattern
redundant_read

The same file is Read multiple times without intervening writes. Common in coding agents that lose track of what's already in context.

pattern
semantic_duplicate

Two message chunks with different bytes but the same meaning (paraphrased re-send). Detected by the opt-in LLM-judge layer — off by default, requires API key.

Opt-in only · requires ANTHROPIC_API_KEY

pingpong requires genuinely multi-agent traces; single-agent coding sessions and Toolathlon are not expected to produce it.

note — a fourth candidate pattern, regen_handoff, was descoped after failing pre-registered criteria. See Proven / Not Yet.


02/reference

What Boxdawn knows about.

Tool categories
  • read_only
  • side_effect
  • payload_dependent
  • declarative
Frameworks
  • LangChain / LangGraph
  • CrewAI
  • LlamaIndex
  • OpenAI Agents SDK
  • AutoGen
  • Smolagents
Detectors
  • find_repeat_candidates
  • find_pingpong_candidates
  • find_context_resend
  • find_redundant_reads
  • find_llm_judge_semantic_duplicates
Input formats
  • Boxdawn Trace JSON
  • OTel SDK JSON
  • Claude Code JSONL
  • Toolathlon JSONL
  • OpenInference nested
  • RedundancyBench
Register your tools (clew.yaml)
version: 1
tools:
  search_web:    { category: read_only }
  create_ticket: { category: side_effect, entity_id: response.ticket.id }
  run_python:    { category: payload_dependent }
  finalize:      { category: declarative }

03/report

A real report.

# Boxdawn Waste Report

- **trace_id**: `4130c9a7-ee88-443a-91b5-224accd13629`
- **analyzed**: 2026-08-06T11:12:53Z
- **detector params**: φ=0.514345, N=2, model=paraphrase-multilingual-MiniLM-L12-v2

## Cost summary

- **Total analyzed**: $2.977861
- **Total waste (detected)**: $1.922360 (64.6%)
- **Cost accuracy**: `accurate`

Breakdown by detector:
  - provable_duplicate: $0.000000
  - context_resend: $1.922360
  - redundant_read: $0.000000

## Result

- **Waste detection**: no waste detected (wasteful=False).
- **Context resend**: 5663 resent chunk(s), 5511430 of 5697854 input tokens (96.7%). See section below.

- **Tool mapping coverage for this trace**: 4 of 7 tools recognized (57.1%).
- **Unrecognized tools in this trace (top 3)**: TodoWrite, Skill, ToolSearch

## Context resend

Message chunks that appear in the input of two or more LLM calls within this trace, byte-exact by sha256. System-role chunks are exempt.

- **events**: 5663 resent chunk occurrence(s)
- **resent input tokens**: 5511430 of 5697854 (96.7%)
- **resent input cost**: $1.922360 of $2.057296 (93.4%)
- **cost accuracy**: `accurate`

### Top offenders (by LLM call)

- span `msg_01ATtjc982JnoAussf4jjzVL` — 114 resent chunks, 109273 tokens, $0.043310
- span `msg_01K88yE6zH1Lz6Gk2y9ADGX5` — 90 resent chunks, 88912 tokens, $0.039878
- span `msg_01JKCG6DPe6qPLcTxv8br4br` — 80 resent chunks, 80955 tokens, $0.038627
- span `msg_01HGSKybu9NxPvYD5LKAmv2h` — 100 resent chunks, 100547 tokens, $0.038584
- span `msg_01WhCrMWgSCyjjv1RsKWDH2t` — 138 resent chunks, 112970 tokens, $0.037664

---
_Note: detection thresholds are frozen at synthetic values (phi=0.514345, N=2); real-trace evaluation is ongoing._
_Cost is estimated saving potential, not measured — assumes the wasted output is re-consumed each subsequent turn (structural assumption)._

Analyzed 2026-08-06. Source: boxdawn analyze on trace-commons CC session 4130c9a7 (75 LLM calls, $2.98 total). Shows Cost summary + Context resend sections; Redundant read and LLM-judge (opt-in) return empty on this specific trace.


04/open source

Open source, because trust is the product.

Boxdawn is MIT-licensed and deterministic by default. Four detectors — provable duplicate, context resend, redundant read, and pingpong candidates — run locally with no API calls and no signup. A fifth layer, semantic-duplicate LLM-judge, is opt-in only: off by default, requires ANTHROPIC_API_KEY and explicit CLEW_ENABLE_LLM_JUDGE=1 to activate. Same trace in, same report out — every time, for the deterministic layers.

$ pip install "boxdawn[detect]"
$ boxdawn analyze your_trace.json

Works with OpenTelemetry SDK JSON and OpenInference trace exports — LangGraph, CrewAI, AutoGen, LlamaIndex, and anything else that speaks the standard.

MITlocal-firstdeterministic-firstdeterministicopt-in LLM-judge702 tests · CI greenOTel / OpenInference

Boxdawn diagnoses; it does not fix. No measured cost savings yet — we report what was found, not what was saved.