You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,205 +14,52 @@ Reploid is a **self-modifying AI substrate** that demonstrates recursive self-im
14
14
15
15
**How:** The agent reads code from its VFS → analyzes & improves it → writes back to VFS → hot-reloads → evolves.
16
16
17
-
The agent's "brain" is data in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). It can modify this data (its own code) while running. The original source code is just the evolutionary starting point ("genesis").
18
-
19
-
**RSI stages:**
20
-
1.**Level 1:** Agent creates new tools at runtime.
21
-
2.**Level 2:** Agent improves its own tool creation mechanism.
The agent's "brain" is data in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). It can modify this data (its own code) while running.
23
18
24
19
---
25
20
26
-
## Why?
27
-
28
-
Most AI systems are frozen at deployment. REPLOID can:
29
-
30
-
- Create new tools during execution
31
-
- Improve its own tool creation mechanism
32
-
- Modify its core cognitive loop
33
-
- Persist its evolution locally (no cloud)
34
-
35
-
This is one of many research projects exploring what happens when you give an AI the ability to rewrite itself, which is a step towards "[AGI](https://en.wikipedia.org/wiki/Artificial_general_intelligence)"
36
-
37
-
---
21
+
## Architecture
38
22
39
23
```mermaid
40
24
graph TD
41
-
%% --- Styles ---
42
-
classDef foundation fill:#000000,stroke:#FFD700,stroke-width:3px,color:#FFD700;
*`agent-loop.js`: The main cognitive cycle (Think -> Act -> Observe).
44
+
*`vfs.js`: Browser-native file system using IndexedDB.
45
+
*`llm-client.js`: Unified interface for Cloud (Proxy) and Local (WebLLM) models.
168
46
169
-
Agent -- Update Goal --> StateMgr
170
-
StateMgr -- Read/Write --> StateFile
171
-
172
-
Agent -- "improve_core_module" --> MetaTool
173
-
MetaTool -- Read Source --> CoreFile
174
-
MetaTool -- Validate --> Verify
175
-
176
-
Verify -- Load --> WorkerFile
177
-
Verify -- "postMessage({snapshot})" --> Worker
178
-
Worker -- "onmessage(passed)" --> Verify
179
-
180
-
Verify -- Success --> MetaTool
181
-
MetaTool -- Write Update --> CoreFile
182
-
183
-
StateMgr -- Audit Events --> AuditLog
184
-
```
185
-
186
-
## Safety
187
-
188
-
RSI must be observable and reversible.
189
-
190
-
-**Substrate / Capability boundary:** Immutable genesis modules (agent loop, response parser, context manager) live in an “untouchable” zone. Everything else is fair game for the agent to rewrite.
191
-
-**Pre-flight verification:** Code changes are compiled and tested inside an isolated [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) before they touch the main thread. If the worker crashes, the change is rejected.
192
-
-**Safe Mode bootloader:** When everything still goes wrong, the bootloader detects crash loops and offers to boot from the immutable Genesis Kernel—your built-in lifeboat.
193
-
-**Cats/Dogs protocol:** All code changes flow through structured bundles. Humans (or other agents) review diffs before they hit VFS.
194
-
-**Checkpointed VFS:** Git-style snapshots in IndexedDB plus StateManager checkpoints give you an immediate undo button—even mid-iteration.
195
-
196
-
These guardrails make it safe to watch the "[Ship of Theseus](https://en.wikipedia.org/wiki/Ship_of_Theseus)" rebuild itself in real time.
47
+
2.**Safety Mechanisms**:
48
+
***Verification Worker**: Runs proposed code changes in a sandboxed Web Worker to check for syntax errors and malicious patterns (infinite loops, `eval`) before writing to VFS.
49
+
***Genesis Factory**: Creates immutable snapshots ("Lifeboats") of the kernel for recovery.
197
50
198
-
---
199
-
200
-
## Governance
201
-
202
-
PAWS is the structured handshake between human and agent that keeps RSI sane. Instead of letting the agent hack files directly, every action flows through two artifacts:
203
-
204
-
-**Cats bundle (input):** A curated snapshot of the files relevant to the current task. The agent never “sees” the entire project; it reasons over a focused view.
205
-
-**Dogs bundle (output):** A transactional change proposal with explicit CREATE/MODIFY/DELETE blocks.
51
+
3.**Tools**:
52
+
*`code_intel`: Lightweight structural analysis (imports/exports) to save context tokens.
53
+
*`read/write_file`: VFS manipulation.
54
+
*`python_tool`: Execute Python via Pyodide (WASM).
206
55
207
56
---
208
57
209
-
## Learn More
210
-
211
-
- Genesis tiers, module maps, and wiring diagrams live in `/core/README.md` and `/blueprints/README.md`.
212
-
- Connection modes, proxies, and local LLM guidance are documented in `/boot/README.md` and `/docs/OPERATIONAL_MODES.md`.
213
-
- Blueprints, personas, and promotion protocols are in `/blueprints/` and `/upgrades/`.
58
+
## RSI Levels
214
59
215
-
Skim those when you want the full reference manual; the rest of this README stays focused on behavior, experiments, and positioning.
60
+
1.**Level 1 (Tools):** Agent creates new tools at runtime using `create_tool`.
61
+
2.**Level 2 (Meta):** Agent improves its own tool creation mechanism.
62
+
3.**Level 3 (Substrate):** Agent re-architects its entire loop or memory system.
216
63
217
64
---
218
65
@@ -302,7 +149,7 @@ WebLLM is the inference engine reploid can stand on: deterministic WebGPU execut
302
149
OpenHands embraces Docker power (shell, compilers, sudo) to tackle arbitrary repos, yet that freedom kills safety—the agent can brick its container with a single bad edit. REPLOID trades GCC for transactional rollback: everything lives inside a browser tab, checkpoints live in IndexedDB, and humans approve cats/dogs diffs before mutations land. We prioritize experimentation accessibility and undo guarantees over unrestricted OS access.
303
150
304
151
### Gödel Agent
305
-
Gödel Agent explores theoretical RSI by letting reward functions and logic rewrite themselves. It is fascinating math, but it lacks persistent state management, tooling, or human guardrails, so “reward hacking” is inevitable. REPLOID focuses on engineering: reproducible bundles, hot-reloadable modules, and EventBus-driven UI so observers can inspect every mutation. We sacrifice unconstrained search space for transparency and hands-on controllability.
152
+
Gödel Agent explores theoretical RSI by letting reward functions and logic rewrite themselves. It is fascinating math, but it lacks persistent state management, tooling, or human guardrails, so "reward hacking" is inevitable. REPLOID focuses on engineering: reproducible bundles, hot-reloadable modules, and EventBus-driven UI so observers can inspect every mutation. We sacrifice unconstrained search space for transparency and hands-on controllability.
306
153
307
154
### Devin (Cognition)
308
155
Devin shows what proprietary, cloud-scale orchestration can deliver: GPT-4-class reasoning, hosted shells, and long-running plans. But it is a black box—you cannot audit, fork, or run Devin offline. REPLOID is the opposite: a glass-box brain stored locally, fully inspectable and modifiable by its owner. We bet that sovereign, user-controlled RSI will outpace closed SaaS once users can watch and influence every self-improvement step.
@@ -314,7 +161,7 @@ Devin shows what proprietary, cloud-scale orchestration can deliver: GPT-4-class
314
161
| Human Control |**Granular (PAWS review)**| Moderate (Stop btn) | Low (automated) | Moderate (chat)|
**Why REPLOID is different:** Explores the “Ship of Theseus” problem in a tab. Capabilities can mutate aggressively, but the substrate remains recoverable thanks to immutable genesis modules, and IndexedDB checkpoints.
164
+
**Why REPLOID is different:** Explores the "Ship of Theseus" problem in a tab. Capabilities can mutate aggressively, but the substrate remains recoverable thanks to immutable genesis modules, and IndexedDB checkpoints.
318
165
319
166
---
320
167
@@ -337,27 +184,6 @@ Reploid is an experiment in [**substrate-independent RSI**](https://www.edge.org
337
184
338
185
---
339
186
340
-
## Limitations
341
-
342
-
-**Browser-only:** No Node.js backend required (except optional proxy)
343
-
-**Storage:** IndexedDB typically ~50MB-unlimited (browser-dependent)
344
-
-**WebLLM models:** May be limited to 1-3B params due to browser VRAM constraints
345
-
-**Multi-model consensus:** Basic implementation, agent can improve it
346
-
347
-
---
348
-
349
-
## Research questions
350
-
351
-
- Can Level 2 RSI emerge from Level 1 without explicit tools?
352
-
- How many iterations until agent creates meta-tools?
353
-
- Does TABULA RASA lead to novel RSI patterns?
354
-
- Can agent discover RSI capabilities without blueprints?
355
-
- What happens after 10000+ iterations of self-improvement?
0 commit comments