| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
ToolArena is a benchmark for evaluating how well Large Language Model (LLM) agents can create "tools" from GitHub repositories. Each tool (or task) corresponds to a Python function with defined inputs and outputs, wrapped in a containerised environment for reproducibility and testability.
ToolArena contains multiple tasks under the tasks/ directory. Each task is:
By default, each task's folder contains:
tasks/<TASK_NAME>/
├── task.yaml
├── implementation.py
├── install.sh
├── tests.py
└── data/
├── download.sh
└── ...
You can use this benchmark to evaluate how well your LLM agent can create implementations for the tasks defined in ToolArena. You can also propose your own new tasks to contribute to the benchmark.
We welcome new tasks and improvements to existing ones. See CONTRIBUTING.md for a full guide on how to contribute a new task.
curl -LsSf https://astral.sh/uv/install.sh | shuv sync --all-groupssource .venv/bin/activatetoolarena --helpdocker pull ghcr.io/katherlab/toolarena:cpu
docker pull ghcr.io/katherlab/toolarena:cudaCreate a .env file in the repository’s root directory with at least these variables:
CUDA_VISIBLE_DEVICES=0 # If you have a GPU, set the device ID here; otherwise, you can leave it blank
HF_TOKEN=hf_... # Replace with your HuggingFace token
OPENAI_API_KEY=sk-... # Replace with your OpenAI API keyYou will need to request access to the following HuggingFace repositories, which are required by some of the tasks:
An OpenAI API key is required for the textgrad_medical_qa_optimize task.
All tasks live under the tasks/ directory. Each contains:
Some tasks require large external data files as input (e.g. images, datasets, etc.). Each task may specify a data/download.sh script, which downloads all required external data from publicly available repositories. While may execute these download scripts yourself, ToolArena provides a convenient command to download all data for you:
toolarena downloadIf you want to download the data for one specific task, simply run toolarena download <TASK_NAME> instead.
A candidate implementation must have:
Suppose you have created a folder <IMPLEMENTATION_DIR> (outside of tasks/) that looks like:
<IMPLEMENTATION_DIR>/
└── <TASK_NAME>/
├── install.sh
└── implementation.py
Here's how to run it:
toolarena run <TASK_NAME> <INVOCATION> --implementation <IMPLEMENTATION_DIR>Where:
Note
If you omit <INVOCATION>, ToolArena runs all invocations (the example plus every test invocation) for that task.
Because ToolArena caches results, repeated runs with the same inputs do not require rerunning the entire tool.
To run the benchmark (i.e., the entire battery of tests) on your candidate implementations:
pytest tasks --implementation <IMPLEMENTATION_DIR>Tip
You can refine your test runs:
pytest tasks --implementation <IMPLEMENTATION_DIR> --skip-uncachedpytest tasks/<TASK_NAME> --implementation <IMPLEMENTATION_DIR>Each task provides a human-generated reference implementation to prove that the task is possible. The reference implementations are supplied alongside the task definitions in the tasks/ directory.
To run the reference implementation for any task, simply omit the --implementation flag:
# Run a single invocation (example invocation):
toolarena run <TASK_NAME> example
# Or run all invocations for that task:
toolarena run <TASK_NAME>And to run all tasks' tests (the entire benchmark) with reference implementations:
pytest tasksIf you need to inspect a running container or attach a debugger:
Debug a specific invocation:
toolarena debug <TASK_NAME> <INVOCATION_NAME> --implementation <IMPLEMENTATION_DIR>This starts the container and provides instructions to attach VS Code or open a bash session in the container.
Check logs directly in Docker:
toolarena run <TASK_NAME> <INVOCATION> --implementation <IMPLEMENTATION_DIR>
docker logs -f <TASK_NAME>This streams any output from the tool in real-time. Under the hood, the toolarena run command creates a Docker container with the same name as the task.
Feel free to open Issues or Pull Requests if you encounter problems or want to propose improvements. Happy tool-building!
| Back | FazBrowse Home | New Git URL |