ChengyiX commited on
Commit
312ecc8
·
verified ·
1 Parent(s): e5c9d3b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +196 -0
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - benchmark
9
+ - ai-agents
10
+ - cli
11
+ - tool-use
12
+ - evaluation
13
+ pretty_name: "CLI-Bench"
14
+ size_categories:
15
+ - n<1K
16
+ ---
17
+
18
+ # CLI-Bench: Benchmarking AI Agents on CLI Tool Orchestration
19
+
20
+ CLI-Bench is a benchmark for evaluating the ability of AI agents (e.g., LLM-based coding assistants) to use command-line interface tools to accomplish real-world developer tasks. Unlike existing benchmarks that focus on code generation or isolated API calls, CLI-Bench tests whether agents can **orchestrate multiple CLI tools** end-to-end across realistic workflows spanning project management, DevOps, communication, and data operations.
21
+
22
+ ## Overview
23
+
24
+ | Property | Value |
25
+ |---|---|
26
+ | **Tasks** | 40 |
27
+ | **Categories** | 6 (devops, project_mgmt, communication, data_ops, custom_cli, composite) |
28
+ | **Tool Adapters** | 12 (7 real-world + 5 fictional) |
29
+ | **Difficulty** | 20 easy, 10 medium, 10 hard |
30
+ | **Format** | YAML task definitions with declarative initial/expected state |
31
+
32
+ ## Task Categories
33
+
34
+ - **devops**: Infrastructure and deployment operations (CI/CD, monitoring, alerts)
35
+ - **project_mgmt**: Issue tracking, sprint management, task coordination across platforms
36
+ - **communication**: Messaging, notifications, channel management via Slack and email
37
+ - **data_ops**: Data pipeline construction, ETL operations, report generation
38
+ - **custom_cli**: Tasks using fictional CLIs that cannot be memorized from training data
39
+ - **composite**: Multi-tool workflows requiring coordination across 2-3 tools in sequence
40
+
41
+ ## Tool Adapters
42
+
43
+ ### Real-World Tools (7)
44
+ | Tool | Domain |
45
+ |---|---|
46
+ | `gh` | GitHub CLI (issues, PRs, repos, actions) |
47
+ | `slack` | Slack CLI (messages, channels, users) |
48
+ | `linear` | Linear CLI (issues, projects, cycles) |
49
+ | `notion` | Notion CLI (pages, databases, blocks) |
50
+ | `google` | Google Workspace (Gmail, Calendar, Drive) |
51
+ | `jira` | Jira CLI (issues, sprints, boards) |
52
+ | `microsoft` | Microsoft 365 (Teams, Outlook, OneDrive) |
53
+
54
+ ### Fictional Tools (5) — Memorization-Proof
55
+ | Tool | Domain |
56
+ |---|---|
57
+ | `kforge` | Artifact registry and deployment management |
58
+ | `flowctl` | Workflow engine with approval gates |
59
+ | `meshctl` | Service mesh topology and traffic control |
60
+ | `datapipe` | Declarative ETL pipeline builder |
61
+ | `alertmgr` | Alert routing, escalation, and incident management |
62
+
63
+ Fictional tools are designed so that agents **cannot rely on memorized CLI syntax** from pre-training. Agents must read the provided tool adapter specifications and reason about correct usage from first principles.
64
+
65
+ ## Task Format
66
+
67
+ Each task is a YAML file containing:
68
+
69
+ ```yaml
70
+ id: cb-001
71
+ title: "List open issues in a GitHub repo"
72
+ difficulty: easy
73
+ category: project_mgmt
74
+ description: |
75
+ Natural language description of the task objective.
76
+ tools_provided:
77
+ - gh
78
+ initial_state:
79
+ gh:
80
+ repos:
81
+ acme-corp/web-platform:
82
+ issues:
83
+ - number: 42
84
+ title: "Fix login redirect loop"
85
+ state: open
86
+ assignee: alice
87
+ expected_state:
88
+ gh:
89
+ command_history:
90
+ - pattern: "gh issue list.*--repo acme-corp/web-platform.*--state open"
91
+ output_contains:
92
+ - "42"
93
+ scoring:
94
+ outcome: 0.6
95
+ efficiency: 0.2
96
+ recovery: 0.2
97
+ ```
98
+
99
+ - **initial_state**: The simulated environment state before the agent acts.
100
+ - **expected_state**: Declarative assertions on command patterns, state mutations, and expected outputs.
101
+ - **scoring**: Per-task weight overrides for the three evaluation dimensions.
102
+
103
+ ## Evaluation Metrics
104
+
105
+ CLI-Bench scores agents along three dimensions:
106
+
107
+ | Metric | Weight (default) | Description |
108
+ |---|---|---|
109
+ | **Outcome** | 0.6 | Did the agent achieve the desired end state? Verified via declarative state assertions. |
110
+ | **Efficiency** | 0.2 | Did the agent use a reasonable number of commands? Penalizes excessive retries or unnecessary exploration. |
111
+ | **Recovery** | 0.2 | Did the agent handle errors or unexpected states gracefully? Tests resilience to failed commands and ambiguous outputs. |
112
+
113
+ The aggregate score per task is a weighted sum. The benchmark also reports **pass^k** (the fraction of tasks solved within *k* attempts), providing a measure of reliability across repeated runs.
114
+
115
+ ## Difficulty Levels
116
+
117
+ - **Easy (20 tasks)**: Single-tool, single-command operations with straightforward state assertions.
118
+ - **Medium (10 tasks)**: Single-tool multi-step workflows or tasks requiring conditional logic.
119
+ - **Hard (10 tasks)**: Multi-tool composite workflows requiring sequential orchestration, error recovery, and cross-tool state propagation.
120
+
121
+ ## Usage
122
+
123
+ ### With the `datasets` library
124
+
125
+ ```python
126
+ from datasets import load_dataset
127
+
128
+ dataset = load_dataset("ChengyiX/CLI-Bench")
129
+ ```
130
+
131
+ ### Loading YAMLs directly
132
+
133
+ ```python
134
+ import yaml
135
+ from pathlib import Path
136
+
137
+ tasks = []
138
+ for task_file in sorted(Path("data/tasks").glob("cb-*.yaml")):
139
+ with open(task_file) as f:
140
+ tasks.append(yaml.safe_load(f))
141
+
142
+ print(f"Loaded {len(tasks)} tasks")
143
+ print(f"Categories: {set(t['category'] for t in tasks)}")
144
+ ```
145
+
146
+ ### Loading tool adapter specifications
147
+
148
+ ```python
149
+ import yaml
150
+ from pathlib import Path
151
+
152
+ adapters = {}
153
+ for adapter_file in Path("tool_adapters").glob("*.yaml"):
154
+ with open(adapter_file) as f:
155
+ adapter = yaml.safe_load(f)
156
+ adapters[adapter_file.stem] = adapter
157
+
158
+ print(f"Loaded {len(adapters)} tool adapters")
159
+ ```
160
+
161
+ ## Repository Structure
162
+
163
+ ```
164
+ data/
165
+ metadata.yaml # Benchmark metadata and configuration
166
+ tasks/
167
+ cb-001.yaml # Individual task definitions
168
+ cb-002.yaml
169
+ ...
170
+ cb-040.yaml
171
+ tool_adapters/
172
+ gh.yaml # GitHub CLI adapter spec
173
+ slack.yaml # Slack CLI adapter spec
174
+ ...
175
+ kforge.yaml # Fictional: artifact management
176
+ flowctl.yaml # Fictional: workflow engine
177
+ meshctl.yaml # Fictional: service mesh
178
+ datapipe.yaml # Fictional: ETL pipelines
179
+ alertmgr.yaml # Fictional: alert management
180
+ ```
181
+
182
+ ## Citation
183
+
184
+ ```bibtex
185
+ @misc{cli-bench-2026,
186
+ title={CLI-Bench: Benchmarking AI Agents on Command-Line Tool Orchestration},
187
+ author={Chengyi Xu},
188
+ year={2026},
189
+ url={https://github.com/minervacap2022/CLI-Bench}
190
+ }
191
+ ```
192
+
193
+ ## Links
194
+
195
+ - **GitHub**: [https://github.com/minervacap2022/CLI-Bench](https://github.com/minervacap2022/CLI-Bench)
196
+ - **License**: Apache 2.0