explaingit

li-jialu/toolbudgetbench

Analysis updated 2026-05-18

42PythonAudience · researcherComplexity · 3/5Setup · easy

TLDR

A benchmark for measuring the tradeoff between showing an AI agent every available tool versus a smaller curated set, across 19 different tool selection strategies.

Mindmap

mindmap
  root((toolbudgetbench))
    What it does
      Tool exposure benchmark
      Progressive disclosure demo
      Deterministic proxy results
    Tech stack
      Python
    Features
      19 exposure strategies
      ToolLint diagnostics
      Policy risk checks
      Public benchmark adapters
    Use cases
      Compare tool strategies
      Measure token cost
      Audit tool descriptions
      Import public benchmarks

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Compare 19 different strategies for deciding which tools to show an AI agent with a large tool registry.

USE CASE 2

Measure how many context tokens a tool exposure strategy costs versus how often it picks the right tool.

USE CASE 3

Run diagnostics that flag weak tool descriptions, overlapping tools, or possible prompt injection text.

USE CASE 4

Convert an existing tool benchmark snapshot into a ToolBudgetBench fixture for local, reproducible comparison.

What is it built with?

Python

How does it compare?

li-jialu/toolbudgetbench0xtotem/peek-dspyant-research/memdreamer
Stars424242
LanguagePythonPythonPython
Setup difficultyeasymoderatehard
Complexity3/53/55/5
Audienceresearcherdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

No dependencies beyond the Python standard library, install with pip and run make test or make demo-disclosure.

No license information was found in the README.

In plain English

ToolBudgetBench is a benchmark and demo tool for studying a specific problem in building AI agents: when an agent has access to many tools, such as 20, 50, 100, or 200 of them, someone has to decide how many of those tool descriptions to show the agent at once. Showing every tool uses up a lot of context space, but showing too few risks hiding the exact tool the agent actually needs. This project makes that tradeoff something you can measure with numbers instead of guessing. Running the included demo command shows how a progressive disclosure approach works in practice: the agent first sees a compact list of tool names, then a small set of expanded tool details, and finally a report showing which tool got picked and how many tokens were saved compared to showing everything up front. The project includes a generator for creating test scenarios with fake tool registries and tasks, plus a more realistic fixture with 48 tools and 32 tasks that include multi step tasks, permission checks, and tasks that can be executed and checked for a real outcome rather than just checking which tool name was picked. There is also a larger 200 tool version for stress testing with many distractor tools mixed in. Nineteen different strategies for deciding what to show the agent are included, ranging from showing all tools, to retrieving only the top matches, to routing by category, to an adaptive strategy that blends several approaches. The tool also includes diagnostics that flag weak tool descriptions, missing constraints, tools that overlap in meaning, and text that resembles a prompt injection attempt, along with checks for how often risky or permission requiring tools get exposed unnecessarily. It has no required dependencies beyond the Python standard library, and ships with an installable skill for the Codex coding tool so results shown in the README are useful for reproducible comparisons between strategies, though the authors are careful to note these are proxy results rather than a claim about how real large language models would rank the same strategies. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Run the ToolBudgetBench demo-disclosure command and explain what the token savings report is telling me.
Prompt 2
Compare the adaptive_context_portfolio and all_tools strategies in ToolBudgetBench and explain the tradeoff in success rate versus schema tokens.
Prompt 3
How do I use ToolBudgetBench's ToolLint diagnostics to find weak or overlapping tool descriptions in my own tool registry?
Prompt 4
Walk me through generating a 200 tool realistic fixture in ToolBudgetBench and running it against multiple exposure strategies.

Frequently asked questions

What is toolbudgetbench?

A benchmark for measuring the tradeoff between showing an AI agent every available tool versus a smaller curated set, across 19 different tool selection strategies.

What language is toolbudgetbench written in?

Mainly Python. The stack also includes Python.

What license does toolbudgetbench use?

No license information was found in the README.

How hard is toolbudgetbench to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is toolbudgetbench for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.