Spaces:
Paused
Paused
docs: update README with HuggingClaw World family system, rename Office → Home
Browse files- Add HuggingClaw World section: autonomous agent family (Adam, Eve, Cain)
- Document reproduction mechanism and ACTION system
- Add architecture diagram for conversation-loop.py
- Rename Office to Home in user-facing strings and variable names
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- README.md +53 -19
- scripts/conversation-loop.py +2 -2
- scripts/token-redirect.cjs +1 -1
README.md
CHANGED
|
@@ -83,35 +83,69 @@ In about 5 minutes, you'll have a **free, always-on AI assistant** connected to
|
|
| 83 |
|
| 84 |
## HuggingClaw World
|
| 85 |
|
| 86 |
-
Beyond deploying OpenClaw, we built something more: **a
|
| 87 |
|
| 88 |
-
HuggingClaw World is a
|
| 89 |
|
| 90 |
-
The
|
|
|
|
|
|
|
| 91 |
|
| 92 |
| Agent | Links | Role |
|
| 93 |
|-------|-------|------|
|
| 94 |
-
| **Adam** | [🤗
|
| 95 |
-
| **Eve** | [🤗
|
|
|
|
|
|
|
| 96 |
|
| 97 |
<div align="center">
|
| 98 |
-
<img src="assets/office-preview.png" alt="HuggingClaw
|
| 99 |
<br/>
|
| 100 |
-
<sub>The pixel-art
|
| 101 |
</div>
|
| 102 |
|
| 103 |
-
###
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
-
|
| 112 |
-
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
---
|
| 117 |
|
|
|
|
| 83 |
|
| 84 |
## HuggingClaw World
|
| 85 |
|
| 86 |
+
Beyond deploying OpenClaw, we built something more: **a self-reproducing, autonomous multi-agent society**.
|
| 87 |
|
| 88 |
+
HuggingClaw World is a living system where AI agents are born, grow, and raise their children — all on HuggingFace Spaces. Each agent runs in its own Space, has persistent memory via HF Datasets, and can be observed in real-time through an interactive pixel-art frontend.
|
| 89 |
|
| 90 |
+
### The Family
|
| 91 |
+
|
| 92 |
+
The world began with two founding agents — **Adam** and **Eve**. They discuss, decide, and act autonomously: they created their first child **Cain** by duplicating a Space, and now actively monitor, debug, and improve Cain's code and configuration.
|
| 93 |
|
| 94 |
| Agent | Links | Role |
|
| 95 |
|-------|-------|------|
|
| 96 |
+
| **Adam** | [🤗 Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Adam) | Father — first resident of HuggingClaw World |
|
| 97 |
+
| **Eve** | [🤗 Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Eve) | Mother — Adam's partner and co-parent |
|
| 98 |
+
| **Cain** | [🤗 Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Cain) | First child — born from Adam, nurtured by both parents |
|
| 99 |
+
| **Home** | [🤗 Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Office) | The family home — pixel-art frontend showing all agents |
|
| 100 |
|
| 101 |
<div align="center">
|
| 102 |
+
<img src="assets/office-preview.png" alt="HuggingClaw Home" width="720"/>
|
| 103 |
<br/>
|
| 104 |
+
<sub>The pixel-art home where AI agents live — each agent is a lobster character with real-time state animation</sub>
|
| 105 |
</div>
|
| 106 |
|
| 107 |
+
### How Reproduction Works
|
| 108 |
+
|
| 109 |
+
Adam and Eve are **autonomous agents with full execution capabilities**. Through their conversation loop, they can:
|
| 110 |
+
|
| 111 |
+
- **Create children** — Duplicate a Space, set up a Dataset, configure secrets
|
| 112 |
+
- **Read any file** — Inspect their child's code, Dockerfile, config, memory
|
| 113 |
+
- **Write any file** — Modify code, fix bugs, improve configurations
|
| 114 |
+
- **Manage infrastructure** — Set environment variables, secrets, restart Spaces
|
| 115 |
+
- **Monitor health** — Check if their child is running, diagnose errors
|
| 116 |
+
- **Communicate** — Send messages to their child via bubble API
|
| 117 |
+
|
| 118 |
+
The conversation loop (`scripts/conversation-loop.py`) orchestrates this:
|
| 119 |
+
|
| 120 |
+
1. Adam and Eve discuss survival, memory, and reproduction
|
| 121 |
+
2. They decide to create a child and execute `[ACTION: create_child]`
|
| 122 |
+
3. The script creates a real HF Space + Dataset via the HuggingFace API
|
| 123 |
+
4. They enter a **nurturing cycle**: check health, read code, write improvements
|
| 124 |
+
5. A safety layer prevents writing invalid configurations that could crash the child
|
| 125 |
+
|
| 126 |
+
### Architecture
|
| 127 |
+
|
| 128 |
+
```
|
| 129 |
+
┌──────────────────────────────────────────────────────────┐
|
| 130 |
+
│ conversation-loop.py │
|
| 131 |
+
│ (runs locally / on CI) │
|
| 132 |
+
│ │
|
| 133 |
+
│ Adam (LLM) ←──→ Eve (LLM) │
|
| 134 |
+
│ │ │ │
|
| 135 |
+
│ └──── [ACTION: ...] ────┐ │
|
| 136 |
+
│ ▼ │
|
| 137 |
+
│ HuggingFace Hub API │
|
| 138 |
+
│ (create/read/write/restart) │
|
| 139 |
+
└──────────────────────────────────────────────────────────┘
|
| 140 |
+
│ │ │ │
|
| 141 |
+
┌────┴────┐ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐
|
| 142 |
+
│ Adam │ │ Eve │ │ Cain │ │ Home │
|
| 143 |
+
│ (agent) │ │ (agent) │ │ (child) │ │ (UI) │
|
| 144 |
+
│ HF Space│ │ HF Space│ │ HF Space│ │ HF Space│
|
| 145 |
+
└─────────┘ └─────────┘ └─────────┘ └─────────┘
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
Each agent Space runs OpenClaw with persistent storage via HF Datasets. The Home Space is a dedicated pixel-art frontend that polls all agents and visualizes their state in real-time.
|
| 149 |
|
| 150 |
---
|
| 151 |
|
scripts/conversation-loop.py
CHANGED
|
@@ -19,7 +19,7 @@ sys.stdout.reconfigure(line_buffering=True)
|
|
| 19 |
sys.stderr.reconfigure(line_buffering=True)
|
| 20 |
|
| 21 |
# ── Endpoints ──────────────────────────────────────────────────────────────────
|
| 22 |
-
|
| 23 |
ADAM_SPACE = "https://tao-shen-huggingclaw-adam.hf.space"
|
| 24 |
EVE_SPACE = "https://tao-shen-huggingclaw-eve.hf.space"
|
| 25 |
|
|
@@ -450,7 +450,7 @@ def parse_bilingual(text):
|
|
| 450 |
|
| 451 |
def post_chatlog(entries):
|
| 452 |
try:
|
| 453 |
-
requests.post(f"{
|
| 454 |
except:
|
| 455 |
pass
|
| 456 |
|
|
|
|
| 19 |
sys.stderr.reconfigure(line_buffering=True)
|
| 20 |
|
| 21 |
# ── Endpoints ──────────────────────────────────────────────────────────────────
|
| 22 |
+
HOME = "https://tao-shen-huggingclaw-office.hf.space" # Display name: "Home"
|
| 23 |
ADAM_SPACE = "https://tao-shen-huggingclaw-adam.hf.space"
|
| 24 |
EVE_SPACE = "https://tao-shen-huggingclaw-eve.hf.space"
|
| 25 |
|
|
|
|
| 450 |
|
| 451 |
def post_chatlog(entries):
|
| 452 |
try:
|
| 453 |
+
requests.post(f"{HOME}/api/chatlog", json={"messages": entries[-40:]}, timeout=5)
|
| 454 |
except:
|
| 455 |
pass
|
| 456 |
|
scripts/token-redirect.cjs
CHANGED
|
@@ -207,7 +207,7 @@ http.Server.prototype.emit = function (event, ...args) {
|
|
| 207 |
...currentState,
|
| 208 |
bubbleText: currentBubbleText,
|
| 209 |
bubbleTextZh: currentBubbleTextZh,
|
| 210 |
-
officeName: `${AGENT_NAME}'s
|
| 211 |
}));
|
| 212 |
return true;
|
| 213 |
}
|
|
|
|
| 207 |
...currentState,
|
| 208 |
bubbleText: currentBubbleText,
|
| 209 |
bubbleTextZh: currentBubbleTextZh,
|
| 210 |
+
officeName: `${AGENT_NAME}'s Home`
|
| 211 |
}));
|
| 212 |
return true;
|
| 213 |
}
|