A workflow for evolving both target agents and the RSI system itself.
English · 简体中文
RSI-Flow is a recursive self-improvement (RSI) workflow that can evolve both target agents, such as Pi and DeepSeek Harness, and the RSI system itself. It uses task experience to build and evaluate changes to prompts, workflows, and other editable artifacts. It compares the original and candidate under a fixed evaluation protocol, applies accepted changes, and supports rollback.
Task execution, proposal generation, and evaluation use separate components. RSI-Flow coordinates the improvement process and records its results.
flowchart TD
A[1. Define object and protocol] --> B[2. Import experience]
B --> C[3. Diagnose observations]
C --> D[4. Build a candidate]
D --> E[5. Compare versions]
E --> F[6. Select and verify deployment]
F --> B
Each round defines what may change, how candidates will be evaluated, and the available budget.
| Framework or tool | Supported role |
|---|---|
| Pi | Native task execution. |
| DeepSeek Harness | Native task execution. |
| Harbor / Terminus-2 | Terminal-Bench task execution and result import. |
| Codex | Proposal generation. |
Use Python 3.10 or newer on macOS or Linux. From the repository root:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python examples/run_demo.py --workspace .rsi/quickstartThe local example covers task collection, evaluation, deployment, and rollback. It needs no API key and writes results to the specified workspace. Use a new workspace path for each run.
| Code | Responsibility |
|---|---|
| Engine | Coordinate the six-stage improvement process. |
| Extension contracts | Define interfaces for task execution, proposals, and evaluation. |
| Integrations | Connect agent frameworks and task environments. |
| Examples | Runnable examples and configuration files. |
| Tests | Core behavior and regression checks. |
python -m pip install -e '.[test]'
python -m pytest testsRSI-Flow is licensed under the MIT License.
