From real tool traces to executable environments and long-horizon tasks through typed dependencies, state-aware walks, and replay verification.
Demo · Method · Results · Installation · Repository · Quick Start · Citation
- 🎬 ToolSpace in One Minute
- 🛰️ From Tool Traces to Verified Tasks
- 📊 Main Results
- 🔧 Installation
- 📂 Repository
- 🚀 Quick Start
- 🙏 Acknowledgments
- 📄 Citation
toolspace-demo-v32-compressed-1080p.mp4
▶ Watch / download the 1080p video ·
Explore the interactive demo ↗
From tools to verified tasks, stronger agents, and harder benchmarks.
Music: Dolce Vita — Peyruis.

Framework overview · Figure 2 in the paper.
Mine adjacent calls in real MCP and open-agent traces with deterministic rules. Nodes encode tools and normalized arguments; edges capture observed dependencies. Cluster the graph into environments, synthesizing persistent data for operation tools, restoring state for query tools, and reusing recorded outputs for stateless tools.
| Dependency | Execution evidence | Share of edges |
|---|---|---|
| 🟣 Data | An output value supplies a type-compatible input to the next call. | 69% |
| 🟢 State | One call changes an object that a later call reads or updates. | 25% |
| 🟠 Retry | A failed call is followed by a successful alternative. | 6% |
Sample state-compatible successors by edge weight, grounding arguments in the task, initial state, or earlier observations. Checkpoint before execution; roll back and resample on failure. Reverse-synthesize the successful workflow into a goal and state/trace/output assertions, then replay from the initial snapshot before acceptance.
| Cross-environment composition 66.2% of the analyzed trajectories span at least two environments; the mean is 18.86 tool calls. |
Ground only what needs state 55.3% fewer synthesized files in a 500-environment study: 2,724 → 1,218. |
Trajectory statistics use the 21,385 trajectories with at least five calls. File count is the paper's synthesis-cost proxy, not a measured reduction in dollars or runtime. See §5 and §6.4.
ToolSpace across seven long-horizon agent benchmarks. ToolSpace-8B and ToolSpace-35B-A3B are SFT checkpoints; their + RL variants continue training from those checkpoints. ToolSpace-744B-A40B uses SFT only. Scores use each benchmark's native metric.
Per-benchmark scores · Table 1
| Model | AutomationBench | SkillsBench | JobBench | Tau3-Banking | BFCL-V4 | Harvey-LAB | OfficeQA-Pro | Avg. |
|---|---|---|---|---|---|---|---|---|
| Qwen3-8B | 0.0 | 0.1 | 0.1 | 4.1 | 42.8 | 0.0 | 3.0 | 7.2 |
| ToolSpace-8B | 32.3 | 3.9 | 13.1 | 10.3 | 65.3 | 0.0 | 12.0 | 19.6 |
| ToolSpace-8B + RL | 34.3 | 4.1 | 15.5 | 11.3 | 67.5 | 0.0 | 12.0 | 20.7 |
| Qwen3.6-35B-A3B | 8.2 | 30.7 | 6.4 | 9.3 | 60.0 | 0.8 | 45.9 | 23.0 |
| ToolSpace-35B-A3B | 45.8 | 42.4 | 40.0 | 34.0 | 74.3 | 1.7 | 48.9 | 41.0 |
| ToolSpace-35B-A3B + RL | 45.8 | 45.3 | 40.0 | 42.3 | 74.8 | 2.5 | 51.9 | 43.2 |
| GLM 5.2 | 29.3 | 56.7 | 43.4 | 37.1 | 75.6 | 13.3 | 56.9 | 44.6 |
| ToolSpace-744B-A40B | 54.7 | 67.8 | 57.5 | 43.3 | 78.4 | 27.5 | 67.1 | 56.6 |
| Claude Opus 5 | 45.6 | 63.7 | 68.0 | 48.7 | 80.6 | 22.7 | 67.2 | 56.6 |
Final scores on AutomationBench Pro and Tau3 Banking Pro for seven frontier models, including DeepSeek-V4.1-Flash-1017 (updated Table 2; higher is better).
Published scores: Table 2. The paper describes 600 AutomationBench Pro tasks; the public AutomationBench Pro package contains 300 frozen tasks. Tau3 Banking Pro contains 98 tasks, separate from the original 97-task banking set.
Install uv, then clone the repository. Keep TOOLSPACE_ROOT set in the same shell for the commands below.
git clone https://github.com/dongguanting/ToolSpace.git
cd ToolSpace
export TOOLSPACE_ROOT="$PWD"Each module uses its own environment:
| Module | Python | Runtime requirements |
|---|---|---|
| AutomationBench Pro synthesis | 3.13+ | uv; local Automation simulator |
| Seven benchmarks | 3.10 / 3.12 / 3.13 | Linux; Node.js 18+; Docker for SkillsBench; Podman for Harvey-LAB |
| AutomationBench Pro | 3.10+ | Local simulator and native verifiers |
| Tau3 Banking Pro | 3.12 | Linux; Node.js; ripgrep, bubblewrap, socat; working user namespaces |
Benchmark setup creates separate environments under benchmark/.runtime/ and installs pinned dependencies. It needs access to GitHub, PyPI, and Hugging Face. See the system package installation commands.
The default online evaluation setup requires a Boyue API key for user simulation, dense retrieval, and LLM judges. Register at Boyue API, open API令牌 (API tokens), and create a token in the auto group (documentation).
Create the evaluation configuration:
cp benchmark/.env.example benchmark/.envEdit benchmark/.env with your endpoint and credentials:
# Model under evaluation: local serving or an OpenAI-compatible hosted API.
MODEL=toolspace-model
MODEL_BASE_URL=http://localhost:8000/v1
MODEL_API_KEY=EMPTY
# Boyue: auxiliary models used by the evaluation harness.
BOYUE_API_KEY=sk-your-boyue-token
BOYUE_BASE_URL=https://api.boyuerichdata.opensphereai.com/v1
# BFCL-V4 web search: set either SERPER_API_KEY or SERPAPI_API_KEY.
SERPER_API_KEY=your-serper-key
# OfficeQA-Pro: a Hugging Face read token with dataset access.
HF_TOKEN=hf_your-read-tokenMODEL must match the model ID exposed by your serving endpoint. To evaluate a Boyue-hosted model, use its model ID, set MODEL_BASE_URL to the Boyue base URL, and set MODEL_API_KEY to your Boyue token.
| Used by | Required service |
|---|---|
| Tau3-Banking / Tau3 Banking Pro | Boyue: GPT-5.2 user simulator and judge/reviewer where enabled; text-embedding-3-large for dense retrieval |
| JobBench | Boyue: Grok-4.3 rubric judge |
| Harvey-LAB | Boyue: GLM-5.2 rubric judge and deliverable matching |
| BFCL-V4 | SerpAPI or Serper for web search |
| OfficeQA-Pro | Accept access to databricks/officeqa, then set HF_TOKEN |
Boyue is a third-party OpenAI-compatible service. Alternative providers can be configured through the corresponding base URL, key, and model settings; see the benchmark API guide. Offline demos, replay, and validation need no API keys.
Benchmark launchers load benchmark/.env automatically. For the synthesis and Pro commands below, export the same configuration into your shell:
set -a
source "$TOOLSPACE_ROOT/benchmark/.env"
set +aToolSpace/
├── Tool-Space/ # Task synthesis: graph → walk → task → replay
│ ├── automation_environment/ # Local simulator, tool catalog, and checkpoints
│ ├── tool_graph/ # Typed dependencies and executable workflow sampling
│ ├── task_generation/ # Model prompts, task/verifier generation, and export
│ ├── verification/ # Independent replay and native scoring
│ ├── examples/ # Input bundles, walk configs, and offline fixtures
│ └── run_pipeline.py # Full pipeline and individual-stage CLI
├── benchmark/ # Seven standard evaluation suites
│ ├── AutomationBench/
│ ├── SkillsBench/
│ ├── JobBench/
│ ├── Tau3-Banking/
│ ├── BFCL-V4/
│ ├── Harvey-LAB/
│ └── OfficeQA-Pro/
├── Automation-Pro/ # AutomationBench Pro evaluation
├── Tau3-Banking-Pro/ # Tau3 Banking Pro evaluation
└── assets/ # README figures and demo media
| Folder | What you get | Start here |
|---|---|---|
Tool-Space/ |
Tool graph construction, workflow sampling, task/verifier generation, and replay | Pipeline guide · Input format |
benchmark/ |
Seven evaluation suites, pinned dependencies, and unified outputs | Setup and evaluation |
Automation-Pro/ |
AutomationBench Pro: 300 frozen automation tasks across six domains | Validation, replay, and scoring |
Tau3-Banking-Pro/ |
Tau3 Banking Pro: 98 banking tasks, 698 knowledge documents, and native outcome scoring | Setup and evaluation |
Release scope: The full ToolSpace graph is large. This release uses AutomationBench as a concrete example: it applies the ToolSpace pipeline to 47 services and 758 endpoints, composes longer executable workflows, and synthesizes AutomationBench Pro tasks with verifiers. The broader tool-space and training statistics describe the paper's experiments.
Starting from AutomationBench environments, build the tool graph, sample state-aware long-horizon workflows, jointly generate tasks and verifiers, and replay them to produce AutomationBench Pro tasks. The bundled example demonstrates this complete chain on a small reconciliation workflow.
Offline demo — no API key required:
cd "$TOOLSPACE_ROOT/Tool-Space"
uv sync --locked
uv run python run_pipeline.py demo --output outputs/demo
uv run python run_pipeline.py verify --tasks outputs/demo/tasksEnvironment execution and replay are real; model responses use fixtures. The dataset, summary, and replay report are saved under outputs/demo/tasks/. Use a fresh output directory for each run.
Generate new tasks through Boyue after completing API Configuration:
cd "$TOOLSPACE_ROOT/Tool-Space"
export PRO_MODEL="your-boyue-model-id"
export PRO_BASE_URL="$BOYUE_BASE_URL"
export PRO_API_KEY="$BOYUE_API_KEY"
export PRO_API="chat" # Use "responses" if supported by your endpoint.
uv run python run_pipeline.py run \
--input examples/project_reconciliation.json \
--walk-config examples/walk.json \
--count 1 --seed 42 --output outputs/proThe synthesis CLI reads PRO_* from the shell; it does not load .env automatically. See the pipeline guide for individual stages, custom inputs, and resume support.
Install an isolated environment and validate the 300 task contracts:
cd "$TOOLSPACE_ROOT/Automation-Pro"
uv venv --python 3.10 .venv
uv pip install --python .venv/bin/python -r requirements.txt
.venv/bin/python evaluate.py validateEvaluate the model configured in API Configuration:
.venv/bin/python evaluate.py run \
--model "$MODEL" --base-url "$MODEL_BASE_URL" \
--api chat --api-key-env MODEL_API_KEY \
--output results/my-model --concurrency 4Or replay an existing predictions file without a model API:
.venv/bin/python evaluate.py replay \
--input predictions.jsonl --output results/replayUse a fresh result directory. See the prediction format and scoring guide.
On Linux, install the Python environment and validate the 98-task package:
cd "$TOOLSPACE_ROOT/Tau3-Banking-Pro"
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -r requirements.txt
.venv/bin/python evaluate.py --check-onlyFor live evaluation, install the knowledge-shell runtime and use Boyue for the customer simulator and dense retrieval. The Linux packages listed in Environment Setup must also be available.
npm install --prefix .runtime/shell --no-save @anthropic-ai/sandbox-runtime@0.0.23
export USER_BASE_URL="$BOYUE_BASE_URL"
export USER_API_KEY="$BOYUE_API_KEY"
.venv/bin/python evaluate.py \
--limit 1 --concurrency 1 --output outputs/pro98-smoke \
--reasoning-effort max --no-reviewUse a reasoning effort supported by your model endpoint, a fresh output directory, and remove --limit 1 for all 98 tasks. Report Pro98 with the model and retrieval configuration; see the banking evaluation guide. Keep reference trajectories and verifier targets on the evaluator side.
Configure benchmark/.env first, then install and run a smoke test:
cd "$TOOLSPACE_ROOT/benchmark"
bash setup_all.sh
SCOPE=smoke RUN_NAME=my-model-smoke bash AutomationBench/run.shRun one full suite or all seven:
RUN_NAME=my-model bash AutomationBench/run.sh
RUN_NAME=my-model bash run_all.shReplace AutomationBench with another directory to run a different suite. All launchers support --limit N, --tasks ID,ID, and --check-only. Results are written to benchmark/outputs/<benchmark>/<RUN_NAME>/.
| Directory | Evaluation set | Metric |
|---|---|---|
| AutomationBench | 600 public tasks | Strict task pass rate |
| SkillsBench | 79 tasks × 3 trials | Mean official verifier reward |
| JobBench | 65 tasks | Mean rubric score |
| Tau3-Banking | 97 Banking Knowledge tasks | Native task success rate |
| BFCL-V4 | 5,217 all_scoring cases |
Official weighted overall accuracy |
| Harvey-LAB | Fixed 120-task sample | Official all-pass rate |
| OfficeQA-Pro | 133 questions | Official answer accuracy |
We thank the creators of AutomationBench, SkillsBench, JobBench, tau2-bench, BFCL, Harvey LAB, and OfficeQA. Third-party components retain their respective licenses and attribution; see the license and notice files in each module.
@article{dong2026toolspace,
title = {ToolSpace: Scaling Tool-Centric Environment Synthesis for Long-Horizon Agents},
author = {Dong, Guanting and Sun, Zhichao and Yang, Xinyu and others},
year = {2026},
journal = {arXiv preprint arXiv:2611.05036},
url = {https://arxiv.org/abs/2611.05036}
}