Catalogue of Tools & Metrics for Trustworthy AI

These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.

contextburn



contextburn is an open-source tool that measures how efficiently AI coding agents use the tokens users pay for. Tokens are the units of text processed by language models and are a key driver of usage costs. Because coding agents repeatedly resend the accumulated conversation context at each step, a large proportion of tokens is often spent reprocessing earlier material rather than generating new output.

The tool is designed to improve transparency around the resource use and cost of agentic AI workflows. It helps developers and researchers understand how different ways of managing sessions affect the proportion of paid compute that is converted into useful work.

contextburn analyses the session transcripts stored locally by Claude Code and does not transmit any data over the network. It reports two metrics. The first measures the share of tokens that become model output, providing insight into the efficiency of the agent itself. The second is a cost-weighted efficiency metric that accounts for the lower cost of cached context and reflects how users structure and manage their sessions. Both metrics are normalised to enable meaningful comparisons across models, sessions and workflows. The tool also corrects for double-counted usage records.

Users can run contextburn from the command line to review token usage, session efficiency and the factors contributing to context growth. It also includes a Model Context Protocol (MCP) server, allowing agents to monitor their own efficiency during a session, as well as editor extensions and a macOS menu bar application.

About the tool


Tool type(s):


Objective(s):


Purpose(s):



Country/Territory of origin:


Lifecycle stage(s):


Type of approach:







Stakeholder group:



Geographical scope:


Required skills:


Technology platforms:


Programming languages:


Tags:

  • ai coding
  • agentic ai
  • llm observability
  • open-source
  • ai agents
  • token efficiency
  • context window
  • cost transparency

Modify this tool

Use Cases

There is no use cases for this tool yet.

Would you like to submit a use case for this tool?

If you have used this tool, we would love to know more about your experience.

Add use case
Partnership on AI

Disclaimer: The tools and metrics featured herein are solely those of the originating authors and are not vetted or endorsed by the OECD or its member countries. The Organisation cannot be held responsible for possible issues resulting from the posting of links to third parties' tools and metrics on this catalogue. More on the methodology can be found at https://oecd.ai/catalogue/faq.