You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ee3592
Browse filesBrowse the repository at this point in the historyBrowse files
Rate limits: count them and adapt how many calls run at once
- Providers report a refusal for rate or capacity reasons (HTTP 429,
overloaded) as ProviderError::RateLimited, apart from other transient
errors. It is retried with the same backoff.
- One Throttle per session: max_parallel is the ceiling; a rate limit
halves the window (never below one); ten calls in a row that go through
give a slot back. Plan tasks and sub-agent calls start new work only
while the window has room; running work is never stopped.
- Counters provider_retries and rate_limit_retries; a guard event of kind
rate_limited; a plan event window once a rate limit has narrowed it,
which the task board shows ("slowed to 2 at a time after 3 rate limits").
- The score is shown as 93.0% ±0.8, the run-to-run standard error across
the five runs, the measure the official leaderboard uses; the across-tasks
interval stays, labelled as such.
Copy file name to clipboardExpand all lines: BLUEPRINT.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This document says **what** gitagent is built to do and **why** each part exists
6
6
7
7
## 0. Goal in one paragraph
8
8
9
-
gitagent 3 is a single static Rust binary that runs **agents defined as git repositories**. An agent is a folder of plain files (identity, rules, memory, skills, tools, hooks, schedules, sub-agents), so its behaviour is versioned, reviewed and diffed like code. One loop runs every agent, the same way in a terminal, behind an SDK, in a fresh clone of a repository, on a timetable, or inside a benchmark container. That loop is built to finish real work: it shapes what the model reads, keeps the provider's cache warm, guards against loops and running out of time, and refuses "done" until the work has been verified. The proof is public: 93.03% on Terminal-Bench 2.1 with Claude Opus 5.5, above every published harness on that benchmark.
9
+
gitagent 3 is a single static Rust binary that runs **agents defined as git repositories**. An agent is a folder of plain files (identity, rules, memory, skills, tools, hooks, schedules, sub-agents), so its behaviour is versioned, reviewed and diffed like code. One loop runs every agent, the same way in a terminal, behind an SDK, in a fresh clone of a repository, on a timetable, or inside a benchmark container. That loop is built to finish real work: it shapes what the model reads, keeps the provider's cache warm, guards against loops and running out of time, and refuses "done" until the work has been verified. The proof is public: 93.0% ±0.8 on Terminal-Bench 2.1 with Claude Opus 5.5, above every published harness on that benchmark.
10
10
11
11
---
12
12
@@ -43,7 +43,7 @@ gitagent 3 is a single static Rust binary that runs **agents defined as git repo
43
43
44
44
gitagent is measured on Terminal-Bench 2.1, and Terminal-Bench runs through **Harbor**, an open framework for running agents against containerised tasks. Harbor matters for four reasons.
45
45
46
-
1.**It is the same yardstick as the published results.** The leaderboards for Terminal-Bench 2.1 were produced with Harbor: the same task images, the same time limits, the same hidden tests, the same scoring. Running gitagent through it is what makes 93.03% comparable with the published 87.6% for Terminus 2 on the same model, rather than a number from a home-made runner.
46
+
1.**It is the same yardstick as the published results.** The leaderboards for Terminal-Bench 2.1 were produced with Harbor: the same task images, the same time limits, the same hidden tests, the same scoring. Running gitagent through it is what makes 93.0% ±0.8 comparable with the published 87.6% for Terminus 2 on the same model, rather than a number from a home-made runner.
47
47
2.**Grading is independent of the agent.** Harbor starts each task's container, hands the agent the instruction, stops it at the task's time limit, and when the agent has finished it runs the task's hidden tests itself and records the reward. gitagent never sees, reads or writes the tests. The result is a pass or a fail decided outside the agent, which is the only kind worth publishing.
48
48
3.**It fits a static binary.** Harbor's "installed agent" model uploads the agent into the task container and runs it there. gitagent is one binary with no runtime, so installing it is a single file copy, and nothing in the container has to change. The shim that does this, `gitagent_harbor/agent.py`, is about two hundred lines.
49
49
4.**It produces evidence others can check.** Harbor runs many trials in parallel, resumes trials that failed for reasons outside the agent (a revoked key, a full Docker network), keeps every trajectory and verifier log, and uploads a job publicly. The headline run's nine jobs, one per time limit, are public, so anyone can read every trial behind the number.
@@ -130,6 +130,7 @@ Steps 4 to 9 repeat until the stop check accepts, the agent replies in conversat
130
130
| D24 | Everyday defaults keep the benchmark's guards, except the snapshot; the console has no time limit unless one is set | The loop detector, stop check and context clearing help in any repository; a person at the console stops a turn with Ctrl-C, while runs nobody watches keep a 30-minute ceiling; the snapshot costs up to 15 seconds per start in a project the user already knows |
131
131
| D25 | Sub-agents are warned as their turns run low, may be given their own turn limit (up to 100), and come back marked partial when they run out | A review cut off mid-step wastes its whole cost; a warned one hands back what it found, and the lead re-runs only what is marked partial |
132
132
| D26 | The `/tests` write guard applies to benchmark runs only | It protects graders' tests; in a user's project `/tests` is an ordinary path and a pattern such as `grep -v /tests/` must not be refused |
133
+
| D27 | One throttle per session: `max_parallel` is a ceiling, a rate-limit refusal halves the window, ten clean calls in a row give a slot back | The right number of parallel calls depends on the account's rate limit, which gitagent cannot know; backing off beats retrying blindly, and the ceiling stays the user's choice |
133
134
134
135
**Left out on purpose:** critics that rewrite answers; best-of-N on benchmarks; memory or learning during a scored run; automated rewriting of the harness; masking every turn; third-party multi-provider frameworks; a web interface; voice; remote sandboxes.
135
136
@@ -223,7 +224,7 @@ Dependencies are kept few: `tokio`, `reqwest` with rustls, `serde`, `serde_json`
223
224
224
225
## 9. Observability
225
226
226
-
Counters are written to `counters.json` after every turn and exported with telemetry when it is on. They cover the loop (`turns`, `tool_calls`, `malformed_calls`, `repairs`, `refusals`, `fallback_turns`), the shell (`exec_timeouts`, `background_sessions`, `interrupts`, `shell_restarts`), shaping and context (`shaped_bytes_in`, `spill_reads`, `masks_applied`, `mask_checkpoints`, `compactions`, `cache_read_tokens`, `cache_write_tokens`), the guards (`stop_accepts`, `stop_rejections`, `loop_triggers`, `protected_writes_blocked`), hooks and compliance (`hook_blocks`, `hook_modifies`, `approvals_granted`, `approvals_denied`, `compliance_blocks`), memory, sub-agents and plans (`subagent_calls`, `plan_tasks`, `plan_failed_tasks`), workflows and MCP.
227
+
Counters are written to `counters.json` after every turn and exported with telemetry when it is on. They cover the loop (`turns`, `tool_calls`, `malformed_calls`, `repairs`, `refusals`, `fallback_turns`, `provider_retries`, `rate_limit_retries`), the shell (`exec_timeouts`, `background_sessions`, `interrupts`, `shell_restarts`), shaping and context (`shaped_bytes_in`, `spill_reads`, `masks_applied`, `mask_checkpoints`, `compactions`, `cache_read_tokens`, `cache_write_tokens`), the guards (`stop_accepts`, `stop_rejections`, `loop_triggers`, `protected_writes_blocked`), hooks and compliance (`hook_blocks`, `hook_modifies`, `approvals_granted`, `approvals_denied`, `compliance_blocks`), memory, sub-agents and plans (`subagent_calls`, `plan_tasks`, `plan_failed_tasks`), workflows and MCP.
227
228
228
229
A feature whose counters stay at zero across a measurement run is either broken or useless, and is investigated before it is kept.
<imgsrc="./docs/media/console.gif"alt="A gitagent session in the terminal"width="820" />
33
33
</p>
34
34
35
-
**Terminal-Bench 2.1: 93.03%** with Claude Opus 5.5, all 89 tasks, five runs each, code frozen at the published commit. The published harnesses on the same benchmark: Terminus 2 with the same model 87.6%, Codex CLI with GPT-6 Astra 87.4%, and the highest published entry, Artificial Analysis's own harness with Claude Fable 5.1 at maximum effort, 91.4%. The numbers are under [Results](#results); the reason is under [How gitagent works](#how-gitagent-works).
35
+
**Terminal-Bench 2.1: 93.0% ±0.8** with Claude Opus 5.5, all 89 tasks, five runs each, code frozen at the published commit; the ± is the run-to-run variation, as on the official leaderboard. The published harnesses on the same benchmark: Terminus 2 with the same model 87.6%, Codex CLI with GPT-6 Astra 87.4%, and the highest published entry, Artificial Analysis's own harness with Claude Fable 5.1 at maximum effort, 91.4%. The numbers are under [Results](#results); the reason is under [How gitagent works](#how-gitagent-works).
36
36
37
37
## Why gitagent
38
38
@@ -49,7 +49,7 @@ Most agent frameworks treat the agent as code scattered across your application.
49
49
50
50
Fork an agent. Branch a personality. `git log` its memory. Diff its rules. Review a change to its behaviour like a code change. Every result traces back to a commit.
51
51
52
-
**gitagent 3** is the Rust rewrite: one static binary with no runtime to install, the harness that scored 93.03% on Terminal-Bench 2.1, a console in your terminal, parallel sub-agents with a live task board, and SDKs for Python, TypeScript and any other language over a simple line protocol. Agents, hooks, schedules and SDK code written for the TypeScript gitagent (1.x and 2.x) run unchanged, and agent folders in the OpenGAP format load too. See [Coming from the TypeScript gitagent](#coming-from-the-typescript-gitagent).
52
+
**gitagent 3** is the Rust rewrite: one static binary with no runtime to install, the harness that scored 93.0% on Terminal-Bench 2.1, a console in your terminal, parallel sub-agents with a live task board, and SDKs for Python, TypeScript and any other language over a simple line protocol. Agents, hooks, schedules and SDK code written for the TypeScript gitagent (1.x and 2.x) run unchanged, and agent folders in the OpenGAP format load too. See [Coming from the TypeScript gitagent](#coming-from-the-typescript-gitagent).
53
53
54
54
## Install
55
55
@@ -161,6 +161,14 @@ the next task starts as soon as one finishes. Use it for work that splits
161
161
into similar pieces: many files to read, many items to check. It costs
162
162
tokens in proportion, so give it scoped tasks.
163
163
164
+
`max_parallel` is a ceiling. When the model provider refuses a call for
165
+
rate limits, the call is retried after a backoff and the number of tasks
166
+
running at once is halved; after ten calls in a row go through, one slot
167
+
comes back, up to the ceiling. The task board says when this happens
168
+
("slowed to 2 at a time after 3 rate limits"), and every run counts its
169
+
`rate_limit_retries`. So set `max_parallel` to what you want when the
170
+
account allows it, and let gitagent slow down when it does not.
171
+
164
172
Each task gets 30 model calls unless the agent gives it its own
165
173
`max_turns` (up to 100), which it can size to the task: more for a large
166
174
review, fewer for a quick look-up. A task is warned when 80% of its calls
@@ -214,7 +222,7 @@ The headline run's logs are public: every trial of it, with its trajectory and v
214
222
215
223
| Harness | Model | Terminal-Bench 2.1 | Runs per task | Source |
216
224
|---|---|---|---|---|
217
-
|**gitagent 3**| Claude Opus 5.5 |**93.03%** (414/445; 75 of 89 tasks passed every run) | 5 |[job logs on the Harbor hub](#the-same-run-by-time-limit)|
225
+
|**gitagent 3**| Claude Opus 5.5 |**93.0% ±0.8** (414/445; 75 of 89 tasks passed every run) | 5 |[job logs on the Harbor hub](#the-same-run-by-time-limit)|
218
226
| Terminus 2 | Claude Opus 5.5 | 87.6% | 1 |[Vals.ai](https://www.vals.ai/benchmarks/terminal-bench-2-1)|
219
227
| Codex CLI | GPT-6 Astra | 87.4% ±0.9 | — |[Snorkel, the official leaderboard](https://snorkel.ai/leaderboard/terminal-bench-2-1/)|
220
228
| Artificial Analysis's own harness | Claude Fable 5.1, max effort | 91.4% | — |[Artificial Analysis](https://artificialanalysis.ai/evaluations/terminalbench-2-1)|
@@ -234,9 +242,9 @@ Pass@k is the chance that at least one of k runs passes:
| 3 h 20 min | 5 | 100.0% | 100.0% | 100.0% |[job](https://hub.harborframework.com/jobs/1d8e0bdb-7ae5-4ec7-8e54-329007590e9d)|
237
-
|**all**|**445**|**93.03%**||||
245
+
|**all**|**445**|**93.0% ±0.8**||||
238
246
239
-
Two of the 89 tasks start a virtual machine inside the task container, which this host cannot do, and no harness has passed them here; without those two the mean is 95.2%. The 95% interval for the headline run is 88.8–96.9%. It cost $112.85, about $0.25 per run, with 92% of the input tokens served from the prompt cache.
247
+
Two of the 89 tasks start a virtual machine inside the task container, which this host cannot do, and no harness has passed them here; without those two the mean is 95.2%. The ±0.8 is the standard error across the five runs (93.3, 95.5, 92.1, 92.1 and 92.1%), the measure the official leaderboard shows; across tasks, the 95% interval is 88.8–96.9%, which answers the wider question of how the score would hold on a different set of tasks. It cost $112.85, about $0.25 per run, with 92% of the input tokens served from the prompt cache.
0 commit comments