Skip to content
Back to search

gear

Gear (General Evolution Architecture) is RSI infrastructure for AI agents. Use Gear to refine agent harnesses.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/rsi-gear/gear with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/rsi-gear/gear'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/rsi-gear--gear/badge.svg)](/listings/rsi-gear--gear)

HTML

<a href="/listings/rsi-gear--gear"><img src="/api/listings/rsi-gear--gear/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Use Gear through its **Refine Skill** in Codex, Claude Code, DSH, or another compatible agent environment. Start with an existing benchmark or provide your own tasks in [Harbor format](docs/guide/en/datasets.md).

For installation and dependency setup, see the [quick start guide](docs/guide/en/quickstart.md).

**Let your agent install Gear.** Paste the following prompt into your agent session:

Follow https://rsigear.xyz/docs/gear/quickstart to install Gear in my environment.
Install rsi-gear@latest and agent-hitch@latest using npm and verify that all required dependencies are available.
Install the complete Refine Skill bundled with Gear in my current agent environment and configure its connection to Gear.
Use my actual task paths, target harness, and model settings; ask me for any missing information.
Verify that the Refine Skill can connect to Gear, then report the verification result and explain how to start my first optimization run.

For manual installation, install Gear and [Hitch](https://github.com/rsi-gear/agent-hitch), the evaluation runner. The following example also installs DSH as the task agent runtime:

npm install --global rsi-gear@latest agent-hitch@latest @deepseek-ai/dsh@latest
hitch eval setup harbor

Follow the [setup guide](docs/guide/en/quickstart.md) to install the bundled [Refine Skill](skills/refine/SKILL.md) in your agent environment and configure your benchmark. Then invoke `/refine` where supported, or submit the following request:

Use the Refine Skill to improve performance on AutomationBench's Marketing tasks.
Use Codex + Astra to propose improvements and DSH + Luna to run the tasks.
Run one round of optimization.

The agent that proposes changes is called the **Meta agent**. It can use a different model from the task agent that executes the benchmark tasks.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 234 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. # Gear
  3. **A modular framework for recursive harness evolution.**
  4. [![npm version](https://img.shields.io/npm/v/rsi-gear/latest?cacheSeconds=300)](https://www.npmjs.com/package/rsi-gear)
  5. [![Project website](https://img.shields.io/badge/Project-website-2F6F5E)](https://rsi-gear.github.io/)
  6. [![Hugging Face](https://img.shields.io/badge/Hugging_Face-Paper-FFD21E?logo=huggingface&logoColor=black)](https://huggingface.co/spaces/WizardTY/GEAR)
  7. ![arXiv: Coming soon](https://img.shields.io/badge/arXiv-Coming_soon-B31B1B?logo=arxiv&logoColor=white)
  8. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  9. [![Discord](https://img.shields.io/badge/Discord-Join_chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/KH6D8Bezm)
  10. [English](README.md) | [简体中文](README.zh-CN.md) · [User guide](https://rsigear.xyz/docs/gear) · [Examples](https://rsigear.xyz/docs/gear/examples/evolution-search)
  11. </div>
  12. ![RSI in Action: AutomationBench Evolution Replay — animated replay](docs/guide/assets/automationbench-evolution-replay-en.gif)
  13. <p align="center">
  14. <strong>RSI in Action: AutomationBench Evolution Replay</strong>
  15. </p>
  16. Gear is an open-source optimization framework for improving AI agent performance on real-world tasks.
  17. To tailor an agent to a target scenario, first prepare a benchmark of representative tasks with clear success criteria. You can use an existing benchmark or [build your own task set](docs/guide/en/datasets.md). Run an algorithm through the Python SDK or the [Refine Skill](skills/refine/SKILL.md). Gear uses task feedback to improve the agent’s instructions, tools, and workflows; model training has a separate experimental lifecycle.
  18. The two examples below compare Luna Max with a Gear-optimized harness against Astra Max with Codex on the same AutomationBench tasks. Follow their execution from reading source information and applying rules to delivering the final result.
  19. <table>
  20. <tr>
  21. <th width="50%">Landing page alerts</th>
  22. <th width="50%">Featured snippet opportunities</th>
  23. </tr>
  24. <tr>
  25. <td><a href="docs/guide/assets/landing-page-alerts-replay.mp4"><img src="docs/guide/assets/landing-page-alerts-replay.gif" width="100%" alt="Trajectory replay: Luna Max with GEAR includes Careers in the alert; Astra Max with Codex misses it."></a></td>
  26. <td><a href="docs/guide/assets/featured-snippet-replay.mp4"><img src="docs/guide/assets/featured-snippet-replay.gif" width="100%" alt="Trajectory replay: Luna Max with GEAR queues crm pricing; Astra Max with Codex omits the user-requested keyword."></a></td>
  27. </tr>
  28. <tr>
  29. <td>Luna: <strong>5/5</strong> scored checks · Astra: <strong>4/5</strong><br><a href="docs/guide/assets/landing-page-alerts-replay.mp4">Watch full-size video</a></td>
  30. <td>Luna: <strong>2/2</strong> scored checks · Astra: <strong>1/2</strong><br><a href="docs/guide/assets/featured-snippet-replay.mp4">Watch full-size video</a></td>
  31. </tr>
  32. </table>
  33. ## Experimental results
  34. ![GPT 5.6 Luna + DSH task pass rates for Coding, Marketing, and Support, comparing Base (medium), Gear (medium), and Gear (max); Marketing task pass rate and objective completion across evaluated harness rounds.](https://rsi-gear.github.io/assets/marketing-evolution-overview.svg?v=f0a2e5849038)
  35. ### Same-model, same-effort harness comparison
  36. Each group keeps the model and reasoning effort fixed. Luna compares the base DSH harness with Gear's optimized DSH harness; Astra compares Codex with Gear's optimized DSH harness.
  37. | Model (effort) | Harness | Marketing pass rate | Marketing objective completion | Support pass rate | Support objective completion | Terminal-Bench 2.1 pass rate |
  38. | --- | --- | --- | --- | --- | --- | --- |
  39. | GPT 5.6 Luna (medium) | DSH (Base) | 27.0% | 75.4% | 17.0% | 72.9% | 52.8% |
  40. | GPT 5.6 Luna (medium) | DSH + Gear | **40.0%** | **83.9%** | **25.0%** | **81.3%** | **62.9%** |
  41. | Δ (percentage points) | | +13.0 | +8.5 | +8.0 | +8.4 | +10.1 |
  42. | GPT 6 Astra (max) | Codex | 57.0% | 84.1% | 35.0% | 88.4% | 86.7% |
  43. | GPT 6 Astra (max) | DSH + Gear | **61.0%** | **86.3%** | **39.0%** | **88.7%** | **87.6%** |
  44. | Δ (percentage points) | | +4.0 | +2.2 | +4.0 | +0.3 | +0.9 |
  45. ### Additional evaluation: Luna at max effort
  46. The optimized DSH harness was also evaluated with GPT 5.6 Luna at max reasoning effort:
  47. | Benchmark | Task pass rate | Objective completion |
  48. | --- | --- | --- |
  49. | AutomationBench / Marketing | **53.0%** | **88.9%** |
  50. | AutomationBench / Support | **27.0%** | **82.4%** |
  51. | Terminal-Bench 2.1 | **84.3%** | — |
  52. These are separate evaluations at a higher reasoning effort; improvements over Luna's medium baseline include both harness and effort changes. The dash means the metric is not reported.
  53. On Marketing, Luna max with Gear achieved **88.88% objective completion**, compared with **84.08%** for Astra max in Codex; their task pass rates were **53%** and **57%**, respectively. In a separate cost comparison with both models using the same optimized DSH harness (`a0740800`), **Luna max's API cost averaged $0.0568 per task, versus $1.1858 for Astra max — 95.21% lower**. See the [token usage and cost methodology](docs/marketing-token-cost.md).
  54. ## Quick start
  55. ### Python SDK
  56. Build the matching Gear source and prepare a project using the [quick start guide](docs/guide/en/quickstart.md). With a DSH project, benchmark, execution profiles and budgets configured:
  57. ```python
  58. from gear import Project
  59. from gear.algorithms import OPRO
  60. project = Project.open("./my-benchmark")
  61. run = project.refine(
  62. algorithm=OPRO(prompt_path="prompts/system.md"),
  63. rounds=2,
  64. )
  65. print(run.id, run.report.summary)
  66. ```
  67. Pi uses `AGENTS.md` for this prompt path. See [algorithm selection](docs/guide/en/algorithms.md), [component customization](docs/guide/en/example-algorithm.md) and [resuming a run](docs/guide/en/evolutions.md). The Python examples describe this source revision; use a package built from matching source.
  68. ### Refine Skill
  69. Use Gear through its **Refine Skill** in Codex, Claude Code, DSH, or another compatible agent environment. Start with an existing benchmark or provide your own tasks in [Harbor format](docs/guide/en/datasets.md).
  70. For installation and dependency setup, see the [quick start guide](docs/guide/en/quickstart.md).
  71. **Let your agent install Gear.** Paste the following prompt into your agent session:
  72. ```text
  73. Follow https://rsigear.xyz/docs/gear/quickstart to install Gear in my environment.
  74. Install matching Gear and Hitch builds that support this guide's APIs and required Hitch capabilities, and verify all required dependencies.
  75. Install the complete Refine Skill bundled with Gear in my current agent environment and configure its connection to Gear.
  76. Use my actual task paths, target harness, and model settings; ask me for any missing information.
  77. Verify that the Refine Skill can connect to Gear, then report the verification result and explain how to start my first optimization run.
  78. ```
  79. For manual installation, install Gear and [Hitch](https://github.com/rsi-gear/agent-hitch), the evaluation runner. The following example also installs DSH as the task agent runtime:
  80. ```bash
  81. npm install --global rsi-gear@latest agent-hitch@latest @deepseek-ai/dsh@latest
  82. hitch eval setup harbor
  83. ```
  84. The seven algorithms are included in Gear 0.2.4. Use Hitch 0.2.19 or later and confirm its `isolated_agent_run: "1"` and `generation_budget: "1"` capabilities with `gear doctor`. When upgrading, run `gear setup` to prepare the matching Python environment and update custom algorithm imports using the [author guide](docs/search-algorithm-authoring.zh-CN.md).
  85. Follow the [setup guide](docs/guide/en/quickstart.md) to install the bundled [Refine Skill](skills/refine/SKILL.md) in your agent environment and configure your benchmark. Then invoke `/refine` where supported, or submit the following request:
  86. ```text
  87. Use the Refine Skill to improve performance on AutomationBench's Marketing tasks.
  88. Use Codex + Astra to propose improvements and DSH + Luna to run the tasks.
  89. Run one round of optimization.
  90. ```
  91. The agent that proposes changes is called the **Meta agent**. It can use a different model from the task agent that executes the benchmark tasks.
  92. ## Algorithm design
  93. ![Gear's inner and outer learning loops: Serve, Diagnose, and Evolve the harness, seed tasks, and model.](docs/guide/assets/gear-loop-light.svg)
  94. Gear adopts a two-level architecture inspired by **meta-learning**, separating task-level execution from harness optimization guided by evaluation feedback.
  95. - **Inner loop: task execution and evaluation.** Given a fixed model and harness configuration, the task agent interacts with the task environment to produce execution trajectories and task outcomes. These are evaluated according to predefined criteria, providing evidence for the outer loop.
  96. - **Outer loop: harness optimization.** The Meta agent analyzes execution trajectories and evaluation feedback to identify failure modes and propose candidate harness modifications. Gear's optimization algorithm evaluates and selects candidates according to the configured objective and evaluation budget, determining the harness used in subsequent iterations.
  97. A model's **harness** consists of the instructions, tools, and workflows used to run it as an agent. Gear aims to **evolve the model and harness together**, improving agent behavior through harness modifications and model capabilities through training, with task feedback guiding both processes. Harness optimization is supported today. Model training is experimental, and the full joint optimization loop remains under development.
  98. ### What can evolve?
  99. Optimization is limited to the components you authorize Gear to modify.
  100. | Component | What can change | Status |
  101. | --- | --- | --- |
  102. | Prompts and policies | Task instructions, system prompts, and action policies. | Supported |
  103. | Tools and hooks | Tool implementations and hooks that run before or after tool execution. | Supported |
  104. | Skills and workflows | Reusable procedures, helper scripts, and execution order. | Supported |
  105. | Context management | Context selection and conversation history summarization. | Supported |
  106. | Model weights | Model parameters updated through training using task feedback. | Experimental; full training and evaluation loop under development |
  107. ### Customizable algorithm components
  108. Reusable operators live in `gear.core`, `gear.evaluation`, `gear.memory`, `gear.training` and `gear.search`; complete recipes live in `gear.algorithms`. For example, `ApplyEdits` and `CheckEdits` belong to `gear.core`. The six search strategy modules are:
  109. | Module | What you can customize |
  110. | --- | --- |
  111. | `search.parents` | Parent selection and candidate allocation. |
  112. | `search.sampling` | Task subsets, repetitions and weights. |
  113. | `search.proposal` | Diagnosis and candidate proposal planning. |
  114. | `search.ranking` | Candidate comparison over matching evaluation scopes. |
  115. | `search.stopping` | Search termination conditions. |
  116. | `search.workflow` | Stage order and strategy composition. |
  117. Task rewards are defined by the benchmark/scorer; objectives aggregate the declared measurements and constraints. Python components define the algorithm, and the runtime coordinates execution, budgets, persistence and recovery. See the [customization tutorial](docs/guide/en/example-algorithm.md) and [operator author guide](docs/algorithm-operators.zh-CN.md).
  118. [Define a weighted objective](docs/guide/en/configuration.md#weighted-objectives-and-protected-tasks) to combine declared pass rate, process scores, cost or tokens while retaining the original measurements.
  119. ## Supported algorithms
  120. Complete, callable implementations are available from `gear.algorithms`. Their components can be replaced independently.
  121. | Algorithm | Current implementation |
  122. | --- | --- |
  123. | [GEPA](docs/guide/en/algorithms.md#gepa) | Staged candidate evaluation and selection: local → bridge → global. |
  124. | [RandomSearch](docs/guide/en/algorithms.md#randomsearch) | Random parent selection, exploratory proposals and full-task evaluation. |
  125. | [OPRO](docs/guide/en/algorithms.md#opro) | Iterative prompt optimization using scored history. |
  126. | [ACE](docs/guide/en/algorithms.md#ace) | Incremental playbook updates, evaluated before adoption. |
  127. | [RRSI](docs/guide/en/algorithms.md#rrsi) | Edit checks and a Meta critic screen proposals before task evaluation. |
  128. | [DarwinX](docs/guide/en/algorithms.md#darwinx) | Prompt optimization with additional fresh-sample confirmation. |
  129. | [Harness2](docs/guide/en/algorithms.md#harness2) | Continual learning from target outputs and trajectories, with scores hidden from the algorithm. |
  130. ## Explore the examples
  131. - [Optimize a harness for Marketing](docs/guide/en/example-harness.md): follow five rounds of harness optimization, from the initial configuration to the final retained harness.
  132. - [Customize the optimization algorithm](docs/guide/en/example-algorithm.md): change how Gear proposes candidate modifications, selects tasks for evaluation, and retains candidates. The Marketing experiment uses a GEPA variant that allocates more evaluation budget to promising candidates.
  133. ## Architecture
  134. ![Gear architecture: the Task Registry and Agent provide input to the Optimization Engine. The Evaluator records trajectories in Trajectory Storage, which provides feedback to the engine and data to the Trainer. The engine updates the harness and seed tasks, and the Trainer updates the model. The animated Serve, Diagnose, Evolve loop illustrates the feedback cycle. Powered by Hitch.](docs/guide/assets/gear-architecture-light.svg)
  135. [Learn more about Hitch](https://github.com/rsi-gear/agent-hitch)
  136. ## Roadmap
  137. Gear supports harness optimization today. Two components of the broader learning loop remain under development:
  138. - [ ] **Iterative model training and evaluation.** Use task feedback to train the model, evaluate the updated model, and repeat. An [experimental training workflow](docs/guide/en/training.md) is available; the full model iteration loop is not yet complete.
  139. - [ ] **Automatic seed task generation.** Generate targeted practice tasks, or *seed tasks*, from task failures and incorporate them into subsequent optimization rounds. This automatic task generation loop is not yet complete.
  140. ## Citation
  141. If you use Gear in your research, please cite the following preprint. The [project website](https://rsi-gear.github.io/#citation) lists the current citation; the arXiv link is not yet available.
  142. ```bibtex
  143. @unpublished{tang2026gear,
  144. title = {{GEAR}: An Open General Evolutionary Architecture for
  145. Recursive Self-Improvement of {LLM} Agent Harness},
  146. author = {Tang, Yehui and Zhu, Guanqi and Xia, Shao-Jun and
  147. Chen, Xin and Geng, Mengzhe and Du, Hongyang and Tang, Yuhao},
  148. year = {2026},
  149. note = {Preprint},
  150. url = {https://github.com/rsi-gear/gear}
  151. }
  152. ```
  153. ## Build with us
  154. Start with the [user guide](docs/guide/en/index.md), browse the [example code](examples/evolution-search/README.md), or join [Discord](https://discord.gg/KH6D8Bezm).
  155. For local development:
  156. ```bash
  157. npm ci
  158. npm run typecheck
  159. npm run build
  160. npm test
  161. ```
  162. [Contributing](CONTRIBUTING.md) · [Documentation guidelines](docs/guide/README.md) · [GitHub issues](https://github.com/rsi-gear/gear/issues) · [MIT license](LICENSE)
  163. Model evaluation connects to [already deployed model endpoints](docs/training/standalone-inference.md), with immutable bindings for each candidate and configurable trial concurrency. SGLang and its official Model Gateway manage inference replicas outside Gear and Hitch.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.