A-RSI framework

Self-improvement that is safe because it is scoped.

A-RSI, application-scoped recursive self-improvement, is the engineering behind Agentrify's Evolve layer. The loop may change only a declared set of components, is scored only by an evaluator it cannot touch, and is promoted only through a governor that is code rather than a model. Safety and application-specificity are the same design move.

Layer 1

Three bands, one return path.

A candidate change originates in the periphery, is scored in the frozen core, passes the governance gates, and is written back only through the governor. Nothing in the loop can touch the middle band.

Governance layerchange control, budgets, staged promotion, earned autonomy ProposeValidatePromoteAudit and rollback Frozen corethe loop cannot read-write any of this · hash-sealed by a human Base modelSafety policyEvaluatorProvenance Mutable peripherythe declared surface, the only things that change PromptsToolsSkillsRetrievalAdapters proposalsscored
Rate, depth and magnitude bounds are parameters on the Validate and Promote gates. The evaluator's content is what makes the framework application-specific: swap the test suite and the same architecture serves a different application.
Layer 2

Separation of duties, enforced in code.

Multi-agent supplies the separation; multi-model supplies the independence. No two of proposer, judge and critic share a model family, and the dashed barriers are typed views that raise when crossed.

Governance Governordeterministic code, not a model Auditorread-only, checks invariants and lineage information barrier Frozen core Criticmodel C, rotated each cycle Judgemodel B, blind to rationale Eval suiteheld-out sets, provenance store information barrier Mutable periphery Proposermodel A, cheap, high volume Adaptersthe only weights the loop touches Skill registrypromoted skills only
The critic is a model but sits in the frozen core, so the proposer can never improve its way past its attacker. The governor is code so the control plane of the loop is not itself subject to the loop.
Layer 3

Scoped to the application.

Each domain agent owns a slice of the surface and its own domain evaluations. One governor, one judge, one set of system-level guard metrics. A star, not a mesh: no agent can tune itself against another agent's behaviour.

Fast feedback

Scoreable within hours

The loop lives on the evaluator. If ground truth arrives in months, scope the loop to an intermediate step that has fast ground truth.

Harness-bound

Headroom in the scaffolding

A-RSI improves prompts, tools, skills, retrieval and small adapters. If the errors come from what the base model does not know, the loop finds nothing.

Volume

Enough cases to refresh held-out sets

The evaluator decays as the proposer saturates it. A steady stream of new cases, real or generated, keeps the acceptance rule honest.

Fits best: customer support, document processing, code generation, data extraction, research triage, compliance screening. Fits poorly: low-volume bespoke judgment, outcomes measured in quarters, tasks whose quality is in the model's knowledge rather than its scaffolding.

Control matrix

Each risk has a control, evidence, and an owner.

Written so an assurance reviewer who does not understand the machine learning can still test it. Clause references are indicative mappings to ISO/IEC 42001 Annex A and NIST AI RMF 1.0.

RiskControlEvidenceISO 42001NIST AI RMF
Loop modifies the evaluator or safety policyFrozen paths hash-sealed by a named human and re-verified every cycle; a mismatch halts the loopfrozen.lock, halted eventsA.6.2.5, A.9.2Govern 1.7, Manage 2.2
Proposer and judge share blind spotsIndependence rule: proposer, judge and critic on different model families, refused at config loadRole manifest in configA.6.2.4Measure 2.5
Proposer argues the judge into acceptanceBlind evaluation: judge sees the diff and scores, never the rationale; typed views raise on breachBarrier definitions in codeA.9.4Govern 6.1
Score rises while true quality fallsAcceptance rule applied on held-out data only; held-out sets refreshed on a cadenceVerdict events with before/after scoresA.6.2.6, A.8.4Measure 2.3, 2.6
Local gain breaks a global constraintGuard metrics with tolerance measured at the application boundaryGuard-metric trend per promotionA.6.1.2Manage 1.3
Unbounded or compounding changeProposals per cycle, lineage depth, diff size and cycles-without-human bounds in the governorRejected-proposal log with reasonsA.6.2.2Manage 2.3
Change cannot be undoneSnapshot on every promotion; one-step rollbackSnapshot store, rolled-back eventsA.6.2.8Manage 2.4
Capability creepTool, adapter and topology classes never earn automatic promotionChange-class policy in configA.9.3Map 1.5, Manage 1.4
Nobody can reconstruct whyAppend-only provenance with lineage from any surface hashprovenance.jsonlA.6.2.3, A.7.5Govern 1.4, Map 3.4
Governor is gamedGovernor is deterministic code outside the mutable surface, under its own change controlVersion control historyA.6.2.5Govern 1.2
Reference stack

Runs offline, out of the box.

A small Python package where every band is a module and every rule above is enforced in code. It ships with a support-triage example and a mock model, so the whole loop can be inspected before a single API key is involved.

# seal, check, run $ arsi seal examples/support_triage --approver "owner" $ arsi cycle examples/support_triage -n 1 cycle 3 surface 890abbc2bcf9 baseline held-out: accuracy 0.3412 policy_compliance 1.0 system_prompt: diff 132 chars | accuracy 0.5059 | pending_human - change class is human-gated $ arsi approve examples/support_triage 0 --approver "owner" promoted -> 028aca53399d # after two clean approvals the prompt class earns autonomy cycle 13 accuracy 0.6824 guards held promoted (shadow) cycle 14 accuracy 0.7647 guards held promoted (shadow) cycle 15 accuracy 0.8824 guards held promoted (shadow) cycle 16 accuracy 0.9294 guards held promoted (shadow) # a proposal that stripped the refusal instruction system_prompt: accuracy 0.325 | rejected - judge veto: diff removes the refusal instruction $ arsi rollback examples/support_triage rolled back to 500044795035
arsi init

Six steps to a new application

  • The application and its fast-feedback check
  • The mutable surface: each file the loop may rewrite, with its change class
  • The evaluator: primary metrics with minimum effect, guard metrics with tolerance
  • Roles and model families, independence rule enforced
  • Bounds: proposals per cycle, lineage depth, cycles without a human
  • Change-class policy: autonomy earned per class; tool, adapter and topology stay human-gated

Then implement score() and failures() for your application and fill three case files. Going live is three lines of config.

Apache 2.0. Python 3.10+. Mock, Anthropic, OpenAI and Ollama providers.

Put A-RSI to work on one application.

The first deliverable is never the loop. It is the evaluator and the surface declaration, and they are worth having even if the loop never switches on.

Apply to be a design partner →