
ClawTrace
Visualize agent execution trees and track token costs per step
Replaces Langsmith, Datadog, New Relic, Dynatrace

Who it's for
ClawTrace fits engineers who need to identify expensive calls, repeated tool use, and steps that can be pruned from a multi-step agent run.
Your agents are simple single-call prompts with no tool execution.
TraceCards and CostCraft patches help researchers inspect how trajectories can become reusable skill improvements.
You only need production uptime alerts.
The problem
Agent runs become expensive and hard to debug when each model call, tool call, and retry disappears into logs. Teams can see that an agent failed or spent too much, but they often cannot identify which step caused the cost spike or where the workflow repeated work. Skill improvement has the same visibility problem. Without a compact trace artifact, developers cannot reliably decide which behavior to preserve, prune, or repair across repeated agent runs.
How it works
ClawTrace compiles agent sessions into compact YAML TraceCards that include per-step USD cost, token counts, and redundancy flags.
The README describes three CostCraft patch types: preserve, prune with counterfactual evidence, and repair. That gives teams a structured way to improve agent skills from traces.
ClawTrace targets OpenClaw agents and ships with a web UI built on Next.js 15 plus a FastAPI backend for trace analysis.
Features
- TraceCard summaries
- CostCraft skill patches
- OpenClaw-compatible stack
Recommended for this setup
Strengths
- Cost detail at the step level: Per-step token and dollar-cost data helps teams optimize agent workflows where raw success or failure logs do not show waste.
- Research-backed workflow: The project links to an arXiv paper and frames tracing around skill distillation, which gives the tool a clearer method than generic agent dashboards.
Trade-offs
- OpenClaw-specific fit: ClawTrace is most relevant for teams already building OpenClaw agents. Teams on LangChain, custom agent runners, or hosted observability products should verify integration work before adopting it.
Tech stack
FAQ
ClawTrace traces OpenClaw LLM agent runs and records cost, token usage, tool calls, and redundancy signals for each step.
ClawTrace is Apache 2.0 licensed according to the repository metadata and README badge.
Yes. The project focuses on cost-aware tracing, with TraceCards and CostCraft patches designed to expose expensive or redundant agent behavior.