Generate candidates, evaluate their performance, and iterate in one framework, from agent harnesses to AI infrastructure.
English | 中文
When to use · Experiment results · Overview · How it works · Everything is a plugin · Installation · Using arsi · Built-in RSI strategies · User guides
When you want AI to help continuously improve agents, models, or AI infrastructure, arsi provides built-in strategies, an extensible plugin system, and a companion Skill to help you quickly start experiments in Agent Skill optimization, inference engine tuning, and more.
| Typical scenario | Environment and integration setup | What to tell AI |
|---|---|---|
| Evolve Harness Skills through task feedback | Prepare a working Harness, tasks, and evaluation criteria, and reuse or implement execution and evaluation plugins. | “Use arsi to improve this Harness's Skills, edit only Skill files, iterate on my tasks within my budget, and test the results on new tasks.” |
| Automatically search for configuration parameters that fit your needs | Provide parameter ranges, optimization metrics, and constraints, and integrate plugins that apply configurations and evaluate their effects. | “Use arsi to tune this configuration within the given ranges and budget, optimize the target metric while meeting constraints, and deliver the best configuration measured in this experiment with comparison results.” |
| Evolve an operator toward a correct implementation with lower latency | Prepare the operator source and a test environment, integrate evaluation plugins, and extend the proposal plugin and Policy to invoke Memory and Reflection. | “Use arsi to iterate on this operator: have Memory summarize effective optimizations and lessons from failures, and Reflection refine the proposing Agent's prompts and guidance for later rounds; check correctness and compare latency within budget, then independently re-evaluate against the baseline.” |
- Harness experiments use Pi with
deepseek-v4.1-flash-1017for internal agent calls. The Optimization target column identifies the model version evaluated with DeepSeek Harness (DSH). The Method column lists the training, test, and validation task counts for each benchmark subset. - Infra experiments use Codex with
GPT-6.1 Solfor internal agent calls. The inference experiment runsdeepseek-v4-flash-0731on vLLM and uses AISBench with 4,096 input tokens, 2,048 output tokens, and a concurrency of 330. The representative operator dataset coversbias-gelu-tanh,bias-gelu,transpose-copy,bias-tanh-gate, andtransposed-bias-add. Operator evaluation checks correctness and records mean device execution time. The performance score isbaseline time / optimized time. - Scores compare the baseline with the selected configuration. The selected score is the higher of the baseline and candidate scores. Operator and inference scores are normalized to a baseline of 100.0%. Green indicates improvement, and gray indicates no change. Changes are measured in percentage points (pp).
| Optimization type | Benchmark | Optimization target | Method | Benchmark score |
|---|---|---|---|---|
| Harness optimization | WorkBuddy Bench Code Subset |
DSH +deepseek-v4.1-flash-1017 |
WikiSkill 10 training tasks / 5 validation tasks |
92.9% → 96.0% |
| Harness² 10 validation tasks |
78.5% → 78.5% |
|||
| GEPA 10 training tasks / 5 validation tasks |
94.5% → 94.5% |
|||
| WorkBuddy Bench Office Subset |
DSH +deepseek-v4.1-flash-1017 |
WikiSkill 16 training tasks / 4 test tasks / 10 validation tasks |
87.4% → 89.5% |
|
| Harness² 30 validation tasks |
83.2% → 83.2% |
|||
| GEPA 16 training tasks / 4 test tasks / 10 validation tasks |
84.2% → 92.6% |
|||
| Terminal-Bench 4.0 | DSH +deepseek-v4.1-flash-1017 |
WikiSkill 10 training tasks / 10 test tasks / 5 validation tasks |
20.0% → 40.0% |
|
| Harness² 25 validation tasks |
12.0% → 28.0% |
|||
| GEPA 16 training tasks / 4 test tasks / 10 validation tasks |
50.0% → 50.0% |
|||
| Infra optimization | Representative operator dataset | Triton kernels | operator-searchReflection disabled |
100.0% → 111.0% |
operator-searchReflection enabled |
100.0% → 113.2% |
|||
| AISBench | vLLM +deepseek-v4-flash-0731 |
parameter-agentReflection and Memory enabled |
100.0% → 171.0% |
arsi is a pluggable framework for recursive self-improvement experiments on agents and AI infrastructure.
- Recipe-driven self-improvement. A declarative Recipe (
recipe.yaml) connects an optimization target (Application), a strategy (Policy), and an Evaluator. Each experiment runs within explicit edit boundaries and a fixed budget. - Built-in strategies and extensions. Built-in strategies include Harness², WikiSkill, and GEPA for agent harness optimization, plus inference parameter search and operator optimization. You can bring other targets into the same framework by defining allowed changes, generating candidates, and measuring their performance.
- For developers and coding agents. Developers can configure and run experiments from the CLI and inspect the results in the web viewer. Coding agents can use the same tools through the RSI Skill. Our goal is for them to plan, validate, run, and diagnose experiments, then choose the next step based on evaluation results within the scope and budget a developer authorizes.
- Define the optimization target. Select an Application in the Recipe and configure the baseline and allowed edits. The Application also defines how to turn a candidate into an instance for the Evaluator.
- Run the optimization loop. The Runtime follows the Policy. The Application initializes the baseline, validates and commits edits from the Proposer, and provides and releases instances for the Evaluator. The Selector uses evaluation results or deliverables to choose the next starting point.
- Improve the components. A Policy can use Memory to retain experience and Reflection to improve component prompts, resources, or configuration from execution evidence.
Harness² example · The Proposer references the agent binding. Changing that binding in the Recipe routes the same call from agent.pi to agent.codex on the next run.
- Application (optimization target and instantiation) is the core plugin selected under
applicationin the Recipe. It defines what to optimize, what may change, and how to prepare and release candidate instances for evaluation. Built-in Applications manage Agent Bundles, inference service configurations, and Triton-Ascend kernels. - Policy (optimization strategy) defines the RSI loop, stopping conditions, and the contract each plugin binding requires.
- Plugin implements a contract. The contract specifies the inputs and outputs, and implementations that satisfy it can be swapped.
- Recipe selects the Application and Policy, binds the plugins used by the flow, and supplies configuration and budgets.
- Choose an Application
- Write a Policy
- Write a plugin
- Assemble an experiment with a Recipe
Copy this instruction into your coding agent:
Install the arsi CLI and companion skill from https://github.com/ARSI-LAB/ARSI.
Follow the README's manual CLI installation instructions: check prerequisites, clone the repository, install dependencies, build, and install the CLI.
Copy the complete skills/arsi directory, including references and templates, into a skill directory supported by this agent. Ask before replacing an existing skill with the same name.
Run arsi --help and confirm that this agent can discover and read the skill. Complete installation only; do not start experiments or make model calls.
Requirements
- Node.js >= 24.19.0 and < 25.
- pnpm 11.22.0.
- Git, required to fetch the AgentBundle and Evaluator SDK dependencies.
# Clone and build arsi.
git clone git@github.com:ARSI-LAB/ARSI.git
cd ARSI
pnpm install --frozen-lockfile
pnpm build
pnpm add -g .
# Verify that the installed CLI is available.
arsi --help
Run this from your target project and select the coding agent to install to:
npx skills add ARSI-LAB/ARSI --skill arsi
Add -g for a user-wide installation. Reload or restart your agent as required, then confirm that it can discover and read the arsi skill.
Load the RSI Skill in a coding agent and provide the optimization goal, permitted edits, and budget. The agent can choose or write a Recipe, validate the configuration, and, once authorized, run the experiment, inspect results, and diagnose failures.
- RSI Skill starts at SKILL.md. Keep the complete
skills/arsi/directory when loading it so the agent can access its reference material and templates. Use the minimal example to check that the Recipe and plugins work together.
Run all subsequent commands from the arsi repository root using the installed arsi CLI.
This walkthrough uses the WorkBuddy Office scenario from the Harness² example. Follow the Evaluator's WorkBuddy setup guide to prepare Docker, the dataset, and container images. Make sure both the host and the evaluation containers can reach the model endpoint.
# Set these variables in the terminal where you run arsi. arsi does not load .env files automatically.
# Optimizer model used to propose candidate changes.
export MODEL_NAME="your-optimizer-model"
# Model used by the evaluated agent. There is no fixed default.
# Set this to a model supported by your endpoint.
export EVALUATOR_MODEL_NAME="your-evaluation-model"
# Endpoint and API key shared by both models by default.
export MODEL_ENDPOINT="https://your-model-service.example/v1"
export MODEL_API_KEY="your-api-key"
The Harness² example optimizes an AgentBundle baseline across 10 tasks, with up to 40 evaluations and a 72-hour time budget. For a first run, keep just the first task in policy.config.dataset.taskIds in recipe.yaml.
# Validate the Recipe without starting the experiment.
arsi doctor examples/harness/dsh-harness2/recipe.yaml
# Start the experiment with this ID. This makes real model calls.
arsi run examples/harness/dsh-harness2/recipe.yaml --id my-harness2-task
- Candidates, evaluation metrics, call receipts, and evidence are stored in
.rsi/in the current directory by default. Review the evaluation status, scores, and deliverables together. - For details, see the getting started guide, Reflection guide, and runtime events guide.
Resume an interrupted experiment from the original working directory using the same Recipe and experiment ID.
# Resume from the saved checkpoint.
arsi run examples/harness/dsh-harness2/recipe.yaml --id my-harness2-task --resume
Run both commands from the same directory where you ran arsi run. They read experiment data from that directory's .rsi/ folder.
To check an experiment's status in the terminal, pass its ID to show.
arsi show my-harness2-task
To view progress in the browser, start the local read-only dashboard and open the address printed in the terminal.
arsi dashboard
| Optimization type | Policy | How it improves the target | Example Recipe | Replaceable plugins |
|---|---|---|---|---|
| Harness | harness2 | Proposes general and domain-specific improvements, combines them, then compares deliverables anonymously. | DSH Harness² |
agent.piproposer.agentevaluator.agentbenchselector.artifactmemory.agent
|
| wikiskill | Builds a wiki from training experience, selects skill edits by validation performance, then independently tests the final candidate after the search. | DSH WikiSkill |
agent.piproposer.agentmemory.agentevaluator.agentbenchselector.metric
|
|
| gepa | Generates prompt variants from execution feedback and selects improvements through Pareto-frontier sampling and population search. | DSH GEPA |
agent.piproposer.agentproposer.pareto-evolutionevaluator.agentbench
|
|
| Inference engine parameters | parameter-grid | Searches a parameter grid for the highest throughput within constraints such as latency SLOs. | Inference grid search |
proposer.gridevaluator.inferencebenchselector.metric
|
| parameter-optuna | Searches inference parameters with Optuna TPE or random sampling. | Inference TPE search |
proposer.optunaevaluator.inferencebenchselector.metric
|
|
| Operators | operator-search | Searches for Triton-Ascend operator improvements and independently rechecks the selected candidate. | Transpose-copy operator optimization |
agent.piproposer.operatorevaluator.operatorbenchselector.metric
|
- Getting started
- Architecture and core concepts
- Built-in components
- Configure an experiment
- Run and inspect experiments
- Use skills
- Memory guide
- Reflection guide
- Write a Policy
- Write a plugin
- Runtime events guide
Thanks to the maintainers and contributors of the Cordis project. arsi uses Cordis to register plugins, isolate experiment contexts, and dispatch runtime events.



