Skip to content
ARSI-LABPublic

About

Make everything RSI-able! A pluggable framework for recursive self-improvement of AI agents and infrastructure through configurable strategies and evaluation-driven optimization.

Topics

Resources

Stars

52 stars

Watchers

3 watching

Forks

Repository files navigation

arsi

Multiple self-improvement strategies in one framework · Make Everything RSI-able.

Generate candidates, evaluate their performance, and iterate in one framework, from agent harnesses to AI infrastructure.

Node.js 24.x pnpm 11.22.0 License: Apache-2.0

English | 中文

When to use · Experiment results · Overview · How it works · Everything is a plugin · Installation · Using arsi · Built-in RSI strategies · User guides

🎯 When to use arsi

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.”

📊 Experiment results

  • Harness experiments use Pi with deepseek-v4.1-flash-1017 for 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 Sol for internal agent calls. The inference experiment runs deepseek-v4-flash-0731 on vLLM and uses AISBench with 4,096 input tokens, 2,048 output tokens, and a concurrency of 330. The representative operator dataset covers bias-gelu-tanh, bias-gelu, transpose-copy, bias-tanh-gate, and transposed-bias-add. Operator evaluation checks correctness and records mean device execution time. The performance score is baseline 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% +3.1 pp
Harness²
10 validation tasks
78.5% → 78.5% 0.0 pp
GEPA
10 training tasks / 5 validation tasks
94.5% → 94.5% 0.0 pp
WorkBuddy Bench
Office Subset
DSH +
deepseek-v4.1-flash-1017
WikiSkill
16 training tasks / 4 test tasks / 10 validation tasks
87.4% → 89.5% +2.1 pp
Harness²
30 validation tasks
83.2% → 83.2% 0.0 pp
GEPA
16 training tasks / 4 test tasks / 10 validation tasks
84.2% → 92.6% +8.4 pp
Terminal-Bench 4.0 DSH +
deepseek-v4.1-flash-1017
WikiSkill
10 training tasks / 10 test tasks / 5 validation tasks
20.0% → 40.0% +20.0 pp
Harness²
25 validation tasks
12.0% → 28.0% +16.0 pp
GEPA
16 training tasks / 4 test tasks / 10 validation tasks
50.0% → 50.0% 0.0 pp
Infra optimization Representative operator dataset Triton kernels operator-search
Reflection disabled
100.0% → 111.0% +11.0 pp
operator-search
Reflection enabled
100.0% → 113.2% +13.2 pp
AISBench vLLM +
deepseek-v4-flash-0731
parameter-agent
Reflection and Memory enabled
100.0% → 171.0% +71.0 pp

ℹ️ Overview

arsi is a pluggable framework for recursive self-improvement experiments on agents and AI infrastructure.

Animated walkthrough of a weekly-report agent improving through evaluation, Memory, and Reflection

  • 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.

🔄 How it works

Architecture overview

Architecture animation showing Recipe selecting an Application that manages candidates and evaluation instances

  1. 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.
  2. 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.
  3. Improve the components. A Policy can use Memory to retain experience and Reflection to improve component prompts, resources, or configuration from execution evidence.

Everything is a plugin

Animation of a Harness² Policy call resolving its Agent binding, invoking Pi, and invoking Codex after a Recipe change

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 application in 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

📦 Installation and deployment

Installation instructions for coding agents

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.

Manual installation

1. Install the CLI

Requirements

  1. Node.js >= 24.19.0 and < 25.
  2. pnpm 11.22.0.
  3. 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

2. Install the skill

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.

🛠️ Using arsi

Quick start

1. Configure models and the evaluation environment

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"

2. Validate, run, and resume an experiment

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

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

Check experiment progress

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

🧩 Built-in RSI strategies

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.pi
proposer.agent
evaluator.agentbench
selector.artifact
memory.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.pi
proposer.agent
memory.agent
evaluator.agentbench
selector.metric
gepa Generates prompt variants from execution feedback and selects improvements through Pareto-frontier sampling and population search. DSH GEPA agent.pi
proposer.agent
proposer.pareto-evolution
evaluator.agentbench
Inference engine parameters parameter-grid Searches a parameter grid for the highest throughput within constraints such as latency SLOs. Inference grid search proposer.grid
evaluator.inferencebench
selector.metric
parameter-optuna Searches inference parameters with Optuna TPE or random sampling. Inference TPE search proposer.optuna
evaluator.inferencebench
selector.metric
Operators operator-search Searches for Triton-Ascend operator improvements and independently rechecks the selected candidate. Transpose-copy operator optimization agent.pi
proposer.operator
evaluator.operatorbench
selector.metric

📖 User guides

🙏 Acknowledgments

Thanks to the maintainers and contributors of the Cordis project. arsi uses Cordis to register plugins, isolate experiment contexts, and dispatch runtime events.

About

Make everything RSI-able! A pluggable framework for recursive self-improvement of AI agents and infrastructure through configurable strategies and evaluation-driven optimization.

Topics

Resources

Stars

52 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages