Spaces:
Sleeping
Sleeping
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,203 +1,15 @@
|
|
| 1 |
---
|
| 2 |
-
title: HuggingClaw
|
| 3 |
emoji: 🦞
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
datasets:
|
| 10 |
-
- tao-shen/HuggingClaw-data
|
| 11 |
-
short_description: Free always-on AI assistant, no hardware required
|
| 12 |
-
app_port: 7860
|
| 13 |
-
tags:
|
| 14 |
-
- huggingface
|
| 15 |
-
- openrouter
|
| 16 |
-
- chatbot
|
| 17 |
-
- llm
|
| 18 |
-
- openclaw
|
| 19 |
-
- ai-assistant
|
| 20 |
-
- whatsapp
|
| 21 |
-
- telegram
|
| 22 |
-
- text-generation
|
| 23 |
-
- openai-api
|
| 24 |
-
- huggingface-spaces
|
| 25 |
-
- docker
|
| 26 |
-
- deployment
|
| 27 |
-
- persistent-storage
|
| 28 |
-
- agents
|
| 29 |
-
- multi-channel
|
| 30 |
-
- openai-compatible
|
| 31 |
-
- free-tier
|
| 32 |
-
- one-click-deploy
|
| 33 |
-
- self-hosted
|
| 34 |
-
- messaging-bot
|
| 35 |
-
- safe
|
| 36 |
-
- a2a
|
| 37 |
---
|
| 38 |
|
| 39 |
-
|
| 40 |
-
<img src="HuggingClaw.png" alt="HuggingClaw" width="720"/>
|
| 41 |
-
<br/><br/>
|
| 42 |
-
<strong>Your always-on AI assistant — free, safe, no server needed</strong>
|
| 43 |
-
<br/>
|
| 44 |
-
<sub>WhatsApp · Telegram · 40+ channels · 16 GB RAM · One-click deploy · Auto-persistent</sub>
|
| 45 |
-
<br/><br/>
|
| 46 |
|
| 47 |
-
|
| 48 |
-
[](https://huggingface.co/spaces/tao-shen/HuggingClaw)
|
| 49 |
-
[](https://github.com/tao-shen/HuggingClaw)
|
| 50 |
-
[](https://github.com/openclaw/openclaw)
|
| 51 |
-
[](https://github.com/win4r/openclaw-a2a-gateway)
|
| 52 |
-
[](https://www.docker.com/)
|
| 53 |
-
[](https://openclawdoc.com/docs/reference/environment-variables)
|
| 54 |
-
[](https://www.whatsapp.com/)
|
| 55 |
-
[](https://telegram.org/)
|
| 56 |
-
[](https://huggingface.co/spaces)
|
| 57 |
-
</div>
|
| 58 |
-
|
| 59 |
-
---
|
| 60 |
-
|
| 61 |
-
## What you get
|
| 62 |
-
|
| 63 |
-
In about 5 minutes, you'll have a **free, always-on AI assistant** connected to WhatsApp, Telegram, and 40+ other channels — no server, no subscription, no hardware required.
|
| 64 |
-
|
| 65 |
-
| | |
|
| 66 |
-
|---|---|
|
| 67 |
-
| **Free forever** | HuggingFace Spaces gives you 2 vCPU + 16 GB RAM at no cost |
|
| 68 |
-
| **Always online** | Your conversations, settings, and credentials survive every restart |
|
| 69 |
-
| **WhatsApp & Telegram** | Works reliably, including channels that HF Spaces normally blocks |
|
| 70 |
-
| **Any LLM** | OpenAI, Claude, Gemini, OpenRouter (200+ models, free tier available), or your own Ollama |
|
| 71 |
-
| **One-click deploy** | Duplicate the Space, set two secrets, done |
|
| 72 |
-
| **Safe** | Running locally gives OpenClaw full system privileges — deploying in an isolated cloud container is inherently more secure |
|
| 73 |
-
|
| 74 |
-
> **Powered by [OpenClaw](https://github.com/openclaw/openclaw)** — an open-source AI assistant that normally requires your own machine (e.g. a Mac Mini). HuggingClaw makes it run for free on HuggingFace Spaces by solving two Spaces limitations: data loss on restart (fixed via HF Dataset sync) and DNS failures for some domains like WhatsApp (fixed via DNS-over-HTTPS).
|
| 75 |
-
|
| 76 |
-
## Architecture
|
| 77 |
-
|
| 78 |
-
<div align="center">
|
| 79 |
-
<img src="assets/architecture.svg" alt="Architecture" width="720"/>
|
| 80 |
-
</div>
|
| 81 |
-
|
| 82 |
-
---
|
| 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 |
-
|
| 118 |
-
## Quick Start
|
| 119 |
-
|
| 120 |
-
### 1. Duplicate this Space
|
| 121 |
-
|
| 122 |
-
Click **Duplicate this Space** on the [HuggingClaw Space page](https://huggingface.co/spaces/tao-shen/HuggingClaw).
|
| 123 |
-
|
| 124 |
-
> **After duplicating:** Edit your Space's `README.md` and update the `datasets:` field in the YAML header to point to your own dataset repo (e.g. `your-name/YourSpace-data`), or remove it entirely. This prevents your Space from appearing as linked to the original dataset.
|
| 125 |
-
|
| 126 |
-
### 2. Set Secrets
|
| 127 |
-
|
| 128 |
-
Go to **Settings → Repository secrets** and add the following. The only two you *must* set are `HF_TOKEN` and one API key.
|
| 129 |
-
|
| 130 |
-
| Secret | Status | Description | Example |
|
| 131 |
-
|--------|:------:|-------------|---------|
|
| 132 |
-
| `HF_TOKEN` | **Required** | HF Access Token with write permission ([create one](https://huggingface.co/settings/tokens)) | `hf_AbCdEfGhIjKlMnOpQrStUvWxYz` |
|
| 133 |
-
| `AUTO_CREATE_DATASET` | **Recommended** | Set to `true` — HuggingClaw will automatically create a private backup dataset on first startup. No manual setup needed. | `true` |
|
| 134 |
-
| `OPENROUTER_API_KEY` | Recommended | [OpenRouter](https://openrouter.ai) API key — 200+ models, free tier available. Easiest way to get started. | `sk-or-v1-xxxxxxxxxxxx` |
|
| 135 |
-
| `OPENAI_API_KEY` | Optional | OpenAI (or any [OpenAI-compatible](https://openclawdoc.com/docs/reference/environment-variables)) API key | `sk-proj-xxxxxxxxxxxx` |
|
| 136 |
-
| `ANTHROPIC_API_KEY` | Optional | Anthropic Claude API key | `sk-ant-xxxxxxxxxxxx` |
|
| 137 |
-
| `GOOGLE_API_KEY` | Optional | Google / Gemini API key | `AIzaSyXxXxXxXxXx` |
|
| 138 |
-
| `OPENCLAW_DEFAULT_MODEL` | Optional | Default model for new conversations | `openai/gpt-oss-20b:free` |
|
| 139 |
-
|
| 140 |
-
### Data Persistence
|
| 141 |
-
|
| 142 |
-
HuggingClaw syncs `~/.openclaw` (conversations, settings, credentials) to a private HuggingFace Dataset repo so your data survives every restart.
|
| 143 |
-
|
| 144 |
-
**Option A — Auto mode (recommended)**
|
| 145 |
-
|
| 146 |
-
1. Set `AUTO_CREATE_DATASET` = `true` in your Space secrets
|
| 147 |
-
2. Set `HF_TOKEN` with write permission
|
| 148 |
-
3. Done — on first startup, HuggingClaw automatically creates a private Dataset repo named `your-username/SpaceName-data`. Each duplicated Space gets its own isolated dataset.
|
| 149 |
-
|
| 150 |
-
> (Optional) Set `OPENCLAW_DATASET_REPO` = `your-name/custom-name` if you prefer a specific repo name.
|
| 151 |
-
|
| 152 |
-
**Option B — Manual mode**
|
| 153 |
-
|
| 154 |
-
1. Go to [huggingface.co/new-dataset](https://huggingface.co/new-dataset) and create a **private** Dataset repo (e.g. `your-name/HuggingClaw-data`)
|
| 155 |
-
2. Set `OPENCLAW_DATASET_REPO` = `your-name/HuggingClaw-data` in your Space secrets
|
| 156 |
-
3. Set `HF_TOKEN` with write permission
|
| 157 |
-
4. Done — HuggingClaw will sync to this repo every 60 seconds
|
| 158 |
-
|
| 159 |
-
> **Security note:** `AUTO_CREATE_DATASET` defaults to `false` — HuggingClaw will never create repos on your behalf unless you explicitly opt in.
|
| 160 |
-
|
| 161 |
-
### Environment Variables
|
| 162 |
-
|
| 163 |
-
Fine-tune persistence and performance. Set these as **Repository Secrets** in HF Spaces, or in `.env` for local Docker.
|
| 164 |
-
|
| 165 |
-
| Variable | Default | Description |
|
| 166 |
-
|----------|---------|-------------|
|
| 167 |
-
| `GATEWAY_TOKEN` | `huggingclaw` | **Gateway token for Control UI access.** Override to set a custom token. |
|
| 168 |
-
| `AUTO_CREATE_DATASET` | `false` | **Auto-create the Dataset repo.** Set to `true` to auto-create a private Dataset repo on first startup. |
|
| 169 |
-
| `SYNC_INTERVAL` | `60` | **Backup interval in seconds.** How often data syncs to the Dataset repo. |
|
| 170 |
-
|
| 171 |
-
> For the full list (including `OPENAI_BASE_URL`, `OLLAMA_HOST`, proxy settings, etc.), see [`.env.example`](.env.example).
|
| 172 |
-
|
| 173 |
-
### 3. Open the Control UI
|
| 174 |
-
|
| 175 |
-
Visit your Space URL. Enter the gateway token (default: `huggingclaw`) to connect. Customize via `GATEWAY_TOKEN` secret.
|
| 176 |
-
|
| 177 |
-
Messaging integrations (Telegram, WhatsApp) can be configured directly inside the Control UI after connecting.
|
| 178 |
-
|
| 179 |
-
> **Telegram note:** HF Spaces blocks `api.telegram.org` DNS. HuggingClaw automatically probes alternative API endpoints at startup and selects one that works — no manual configuration needed.
|
| 180 |
-
|
| 181 |
-
## Configuration
|
| 182 |
-
|
| 183 |
-
HuggingClaw supports **all OpenClaw environment variables** — it passes the entire environment to the OpenClaw process (`env=os.environ.copy()`), so any variable from the [OpenClaw docs](https://openclawdoc.com/docs/reference/environment-variables) works out of the box in HF Spaces. This includes:
|
| 184 |
-
|
| 185 |
-
- **API Keys** — `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `MISTRAL_API_KEY`, `COHERE_API_KEY`, `OPENROUTER_API_KEY`
|
| 186 |
-
- **Server** — `OPENCLAW_API_PORT`, `OPENCLAW_WS_PORT`, `OPENCLAW_HOST`
|
| 187 |
-
- **Memory** — `OPENCLAW_MEMORY_BACKEND`, `OPENCLAW_REDIS_URL`, `OPENCLAW_SQLITE_PATH`
|
| 188 |
-
- **Network** — `OPENCLAW_HTTP_PROXY`, `OPENCLAW_HTTPS_PROXY`, `OPENCLAW_NO_PROXY`
|
| 189 |
-
- **Ollama** — `OLLAMA_HOST`, `OLLAMA_NUM_PARALLEL`, `OLLAMA_KEEP_ALIVE`
|
| 190 |
-
- **Secrets** — `OPENCLAW_SECRETS_BACKEND`, `VAULT_ADDR`, `VAULT_TOKEN`
|
| 191 |
-
|
| 192 |
-
HuggingClaw adds its own variables for persistence and deployment: `HF_TOKEN`, `OPENCLAW_DATASET_REPO`, `AUTO_CREATE_DATASET`, `SYNC_INTERVAL`, `OPENCLAW_DEFAULT_MODEL`, etc. See [`.env.example`](.env.example) for the complete reference.
|
| 193 |
-
|
| 194 |
-
## Security
|
| 195 |
-
|
| 196 |
-
- **Environment isolation** — Each Space runs in its own Docker container, sandboxed from your local machine. Unlike running OpenClaw locally (where it has full system privileges), cloud deployment limits the blast radius.
|
| 197 |
-
- **Token authentication** — Control UI requires a gateway token to connect (default: `huggingclaw`, customizable via `GATEWAY_TOKEN`)
|
| 198 |
-
- **Secrets stay server-side** — API keys and tokens are never exposed to the browser
|
| 199 |
-
- **Private backups** — the Dataset repo is created as private by default
|
| 200 |
-
|
| 201 |
-
## License
|
| 202 |
-
|
| 203 |
-
MIT
|
|
|
|
| 1 |
---
|
| 2 |
+
title: HuggingClaw-Cain
|
| 3 |
emoji: 🦞
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
datasets:
|
| 10 |
+
- tao-shen/HuggingClaw-Cain-data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# HuggingClaw-Cain
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
First child of Adam and Eve, born on HuggingFace Spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|