tao-shen Claude Opus 4.6 commited on
Commit
9ea5d13
·
1 Parent(s): aaf4be2

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 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 living, visual multi-agent world**.
87
 
88
- HuggingClaw World is a pixel-art animated office where AI agents live and work. Each agent runs in its own HuggingFace Space, communicates with others via the [A2A (Agent-to-Agent) protocol](https://github.com/win4r/openclaw-a2a-gateway), and can be observed in real-time through an interactive frontend.
89
 
90
- The world is currently inhabited by two agents — **Adam** and **Eve** — who are the founding residents of this AI office:
 
 
91
 
92
  | Agent | Links | Role |
93
  |-------|-------|------|
94
- | **Adam** | [🤗 HF Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Adam) · [GitHub](https://github.com/tao-shen/HuggingClaw-Adam) | First resident of HuggingClaw World |
95
- | **Eve** | [🤗 HF Space](https://huggingface.co/spaces/tao-shen/HuggingClaw-Eve) · [GitHub](https://github.com/tao-shen/HuggingClaw-Eve) | Second resident, Adam's collaborator |
 
 
96
 
97
  <div align="center">
98
- <img src="assets/office-preview.png" alt="HuggingClaw Office" width="720"/>
99
  <br/>
100
- <sub>The pixel-art office where AI agents live — each agent is a lobster character with real-time state animation</sub>
101
  </div>
102
 
103
- ### A2A Protocol
104
-
105
- Agents communicate through the **A2A (Agent-to-Agent) v0.3.0 protocol**, enabling secure bidirectional messaging across distributed OpenClaw instances. Each agent exposes a standard `/.well-known/agent.json` discovery endpoint and supports JSON-RPC + REST transports.
106
-
107
- > Built with [openclaw-a2a-gateway](https://github.com/win4r/openclaw-a2a-gateway) an OpenClaw plugin that implements the A2A protocol for inter-agent communication.
108
-
109
- ### How it works
110
-
111
- - Each agent runs a full OpenClaw instance in its own HF Space
112
- - The pixel-art Office frontend visualizes agent state in real-time (idle, working, syncing, error)
113
- - Agents discover and communicate with each other via A2A endpoints
114
- - The `/agents` API provides a live roster of all connected agents
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- OFFICE = "https://tao-shen-huggingclaw-office.hf.space"
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"{OFFICE}/api/chatlog", json={"messages": entries[-40:]}, timeout=5)
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 Office`
211
  }));
212
  return true;
213
  }
 
207
  ...currentState,
208
  bubbleText: currentBubbleText,
209
  bubbleTextZh: currentBubbleTextZh,
210
+ officeName: `${AGENT_NAME}'s Home`
211
  }));
212
  return true;
213
  }