The Problem

Many AI assistants can generate text but cannot autonomously complete real‑world work that incurs costs and generates revenue. Teams that need a self‑sufficient “AI coworker” must build the surrounding accounting, task‑selection, and sandbox infrastructure themselves.

What This Does

ClawWork bundles that infrastructure around the OpenClaw agent. The livebench package (≈8 k files) stores GDPVal tasks, tracks token expenses, and evaluates earnings. The frontend React app visualises balance, completed tasks, and survival metrics (frontend/src/App.jsx). The clawmode_integration module provides a CLI (clawmode_integration/cli.py) that launches an agent loop (clawmode_integration/agent_loop.py) and registers tools from clawmode_integration/tools.py. Supporting scripts in scripts/ automate data back‑fill and estimation.

Key files:

  • livebench/main.py – orchestrates the daily simulation.
  • livebench/agent/economic_tracker.py – holds the balance, logs income/expenses, and exposes log_message, start_task, end_task.
  • livebench/api/server.py – FastAPI entry point that serves the React dashboard.
  • clawmode_integration/cli.py – entry point for the “agent” command (python -m clawmode_integration.cli agent).

How It Is Wired

  1. Entry point – Running python -m clawmode_integration.cli agent executes clawmode_integration/cli.py:agent.
  2. The CLI loads configuration (clawmode_integration/config.py) and creates a ClawWorkAgentLoop.
  3. ClawWorkAgentLoop registers default tools (e.g., clawmode_integration/tools.py) and starts the message processing loop.
  4. Each tool eventually calls into livebench utilities: livebench/agent/economic_tracker.py functions log_message, start_task, end_task are invoked from 19, 15, 15 places respectively (largest blast radius). livebench/agent/economic_tracker.py also calls track_tokens, add_work_income, and write_json (13–9 callers each).
  5. When a task is completed, livebench/agent/economic_tracker.py writes JSON logs (write_json) and updates the balance file under livebench/data/.
  6. The dashboard (frontend) fetches those JSON files via the FastAPI server (livebench/api/server.py). The server currently allows any origin (allow_origins=["*"]) and reads the same JSON files to serve the UI.
  7. Model calls occur in a few places: livebench/agent/economic_tracker.py → generate_meta_prompt_for_category (model via client.chat.completions.create). clawmode_integration/tools.py → evaluate_artifact (model via self.client.chat.completions.create).

Cycles & hot spots – livebench/tools/direct_tools.py sits in a circular import with livebench/tools/productivity/code_execution_sandbox.py and file_reading.py. The most connected module frontend/src/App imports 10 others but is only used by the UI, while clawmode_integration/cli imports six modules and has an instability of 1, indicating a fragile entry point.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/ClawWork.git
cd ClawWork

# Python dependencies
pip install -r requirements.txt

# Frontend dependencies
cd frontend
npm ci            # uses package-lock.json
npm run build     # creates static assets for the dashboard
cd ..

# Start the FastAPI backend (reads .env.example for keys)
python -m livebench.main   # runs the daily simulation loop

# Run the AI coworker CLI (requires OpenRouter/other model keys in .env)
python -m clawmode_integration.cli agent

A .env.example file lists required variables (e.g., OPENROUTER_API_KEY). No Dockerfile is present, so containerisation must be added manually if desired.

Real‑World Use

A fintech team could embed the CLI in a nightly cron job. The job runs python -m clawmode_integration.cli agent, which pulls new tasks from livebench/data/agent_data/, lets the agent earn income, and writes task_completions.jsonl. The same file is consumed by the internal reporting dashboard, giving product managers a live view of cost‑per‑task and net profit.

# Example: programmatic trigger from another service
from clawmode_integration.cli import run_agent
run_agent()   # respects the same accounting logic as the CLI

Code Health & Issues

  • HIGH – Missing lockfile for livebench/data/agent_data/kimi‑k2.5‑test‑openrouter‑10dollar‑1/sandbox/2026‑06‑25/package.json.
  • HIGH – Wildcard CORS (allow_origins=["*"]) in livebench/api/server.py.
  • HIGH – CI workflow does not run the test suite (.github/workflows).
  • MEDIUM – No Dependabot/Renovate configuration.
  • MEDIUM – No dependency‑vulnerability scan in CI.
  • MEDIUM – Large binary blobs (e.g., livebench/data/agent_data/GLM-4.7‑test‑openrouter‑10dollar‑1/.../TAVARUA_FINAL_MIX.wav 30 MB) should be moved to LFS.
  • MEDIUM – Checkout step keeps credentials; persist-credentials: false missing in deploy.yml.
  • LOW – Workflow jobs lack timeout-minutes.
  • LOW – Repository lacks convention files (.editorconfig, formatter config).

The repo includes tests (≈6 k files) and a GitHub Actions CI definition, but the CI never executes them, reducing the reliability of automated checks.

The Bottom Line

ClawWork provides a ready‑to‑run stack that turns an LLM into an autonomous, cost‑aware worker, with a visual dashboard and a CLI. The core accounting logic is well‑centralised, but the codebase suffers from import cycles, deep nesting, and several high‑severity security/maintenance gaps (CORS, missing lockfiles, CI omissions). It is suitable for teams that want a research‑grade sandbox and are prepared to address the highlighted health issues before production deployment.