"ClawWork: OpenClaw as Your AI Coworker - $15K earned in 11 Hours"
"ClawWork: OpenClaw as Your AI Coworker - $15K earned in 11 Hours"
ClawWork provides comprehensive evaluation of AI agents across 220 professional tasks spanning 44 sectors. 4 Domains: Technology & Engineering, Business & Finance, Healthcare & Social Services, and Legal Operations. ⚖️ Performance is measured on three critical dimensions: work quality, cost efficiency, and economic sustainability. Top-Agent achieve $1,500+/hr equivalent earnings — exceeding typical human white-collar productivity. --- ## ️ Architecture
--- ## Quick Start ### Mode 1: Standalone Simulation Get up and running in 3 commands: ```bash # Terminal 1 — start the dashboard (backend API + React frontend) ./start_dashboard.sh # Terminal 2 — run the agent ./run_test_agent.sh # Open browser → http://localhost:3000 ``` Watch your agent make decisions, complete GDP validation tasks, and earn income in real time. **Example console output:** ``` … ``` ### Mode 2: openclaw/nanobot Integration (ClawMode) Make your live Nanobot instance economically aware — every conversation costs tokens, and Nanobot earns income by completing real work tasks. > See [full integration setup](#-nanobot-integration-clawmode) below. --- ## Install ### Clone ```bash git clone https://github.com/HKUDS/ClawWork.git cd ClawWork ``` ### Python Environment (Python 3.10+) ```bash # With conda (recommended) conda create -n clawwork python=3.10 conda activate clawwork # Or with venv python3.10 -m venv venv source venv/bin/activate ``` ### Install Dependencies ```bash pip install -r requirements.txt ``` ### Frontend (for Dashboard) ```bash cd frontend && npm install && cd .. ``` ### Environment Variables Copy the provided **`.env.example`** to `.env` and fill in your keys: ```bash cp .env.example .env ``` | Variable | Required | Description | |----------|----------|-------------| | `OPENAI_API_KEY` | **Required** | OpenAI API key — used for the GPT-4o agent and LLM-based task evaluation | | `CODE_SANDBOX_PROVIDER` | Optional | `"e2b"` (default) or `"boxlite"` — selects code sandbox backend for `execute_code_sandbox` | | `E2B_API_KEY` | Conditional | [E2B](https://e2b.dev) API key — required when sandbox provider is `"e2b"` (default) | | `WEB_SEARCH_API_KEY` | Optional | API key for web search (Tavily default, or Jina AI) — needed if the agent uses `search_web` | | `WEB_SEARCH_PROVIDER` | Optional | `"tavily"` (default) or `"jina"` — selects the search provider | > **Note**: `OPENAI_API_KEY` is required. Code sandbox defaults to E2B (`e2b-code-interpreter` + `E2B_API_KEY`). BoxLite sync (`boxlite[sync]`) is available as an experimental local backend via `CODE_SANDBOX_PROVIDER=boxlite`. --- ## GDPVal Benchmark Dataset ClawWork uses the **[GDPVal](https://openai.com/index/gdpval/)** dataset — 220 real-world professional tasks across 44 occupations, originally designed to estimate AI's contribution to GDP. | Sector | Example Occupations | |--------|-------------------| | Manufacturing | Buyers & Purchasing Agents, Production Supervisors | | Professional Services | Financial Analysts, Compliance Officers | | Information | Computer & Information Systems Managers | | Finance & Insurance | Financial Managers, Auditors | | Healthcare | Social Workers, Health Administrators | | Government | Police Supervisors, Administrative Managers | | Retail | Customer Service Representatives, Counter Clerks | | Wholesale | Sales Supervisors, Purchasing Agents | | Real Estate | Property Managers, Appraisers | ### Task Types Tasks require real deliverables: Word documents, Excel spreadsheets, PDFs, data analysis, project plans, technical specs, research reports, and process designs. ### Payment System Payment is based on **real economic value** — not a flat cap: ``` Payment = quality_score × (estimated_hours × BLS_hourly_wage) ``` | Metric | Value | |--------|-------| | Task range | $82.78 – $5,004.00 | | Average task value | $259.45 | | Quality score range | 0.0 – 1.0 | | Total tasks | 220 | --- ## ⚙️ Configuration Agent configuration lives in `livebench/configs/`: ``` … ``` ### Running Multiple Agents ```json "agents": [ {"signature": "gpt4o-run", "basemodel": "gpt-4o", "enabled": true}, {"signature": "claude-run", "basemodel": "claude-sonnet-4-5-20250929", "enabled": true} ] ``` --- ## Economic System ### Starting Conditions - **Initial balance**: **$10** — tight by design. Every token counts. - **Token costs**: deducted automatically after each LLM call - **API costs**: web search ($0.0008/call Tavily, $0.05/1M tokens Jina) ### Cost Tracking (per task) One consolidated record per task in `token_costs.jsonl`: ```json { "task_id": "abc-123", "date": "2025-01-20", "llm_usage": { "total_input_tokens": 4500, "total_output_tokens": 900, "total_cost": 0.02025 }, "api_usage": { "search_api_cost": 0.0016 }, "cost_summary": { "total_cost": 0.02185 }, "balance_after": 1198.41 } ``` --- ## Agent Tools The agent has 8 tools available in standalone simulation mode: | Tool | Description | |------|-------------| | `decide_activity(activity, reasoning)` | Choose: `"work"` or `"learn"` | | `submit_work(work_output, artifact_file_paths)` | Submit completed work for evaluation + payment | | `learn(topic, knowledge)` | Save knowledge to persistent memory (min 200 chars) | | `get_status()` | Check balance, costs, survival tier | | `search_web(query, max_results)` | Web search via Tavily or Jina AI | | `create_file(filename, content, file_type)` | Create .txt, .xlsx, .docx, .pdf documents | | `execute_code_sandbox(code, language)` | Run Python in isolated sandbox (`e2b` default, optional `boxlite`) | | `create_video(slides_json, output_filename)` | Generate MP4 from text/image slides | --- ## from AI Assistant to AI Coworker ClawWork transforms [nanobot](https://github.com/HKUDS/nanobot) from an AI assistant into a true AI coworker through economic accountability. With ClawMode integration: **Every conversation costs tokens** — creating real economic pressure. **Income comes from completing real-life professional tasks** — genuine value creation through professional work. **Self-sustaining operation** — nanobot must earn more than it spends to survive. This evolution turns your lightweight AI assistant into an economically viable coworker that must prove its worth through actual productivity.
### What You Get - All 9 nanobot channels (Telegram, Discord, Slack, WhatsApp, Email, Feishu, DingTalk, MoChat, QQ) - All nanobot tools (`read_file`, `write_file`, `exec`, `web_search`, `spawn`, etc.) - **Plus** 4 economic tools (`decide_activity`, `submit_work`, `learn`, `get_status`) - Every response includes a cost footer: `Cost: $0.0075 | Balance: $999.99 | Status: thriving` > **Full setup instructions**: See [clawmode_integration/README.md](clawmode_integration/README.md) --- ## Dashboard
The React dashboard at `http://localhost:3000` shows live metrics via WebSocket: **Main Tab** - Balance chart (real-time line graph) - Activity distribution (work vs learn) - Economic metrics: income, costs, net worth, survival status **Work Tasks Tab** - All assigned GDPVal tasks with sector & occupation - Payment amounts and quality scores - Full task prompts and submitted artifacts **Learning Tab** - Knowledge entries organized by topic - Learning timeline - Searchable knowledge base --- ## Project Structure ``` … ``` --- ## Benchmark Metrics ClawWork measures AI coworker performance across: | Metric | Description | |--------|-------------| | **Survival days** | How long the agent stays solvent | | **Final balance** | Net economic result | | **Total work income** | Gross earnings from completed tasks | | **Profit margin** | `(income - costs) / costs` | | **Work quality** | Average quality score (0–1) across tasks | | **Token efficiency** | Income earned per dollar spent on tokens | | **Activity mix** | % work vs. % learn decisions | | **Task completion rate** | Tasks completed / tasks assigned | --- ## ️ Troubleshooting **Dashboard not updating** → Hard refresh: `Ctrl+Shift+R` **Agent not earning money** → Check for `submit_work` calls and `" Earned: $XX"` in console. Ensure `OPENAI_API_KEY` is set. **Port conflicts** ```bash lsof -ti:8000 | xargs kill -9 lsof -ti:3000 | xargs kill -9 ``` **Proxy err
No open issues yet, or sync has not completed.