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 exposeslog_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
- Entry point â Running
python -m clawmode_integration.cli agentexecutesclawmode_integration/cli.py:agent. - The CLI loads configuration (
clawmode_integration/config.py) and creates aClawWorkAgentLoop. ClawWorkAgentLoopregisters default tools (e.g.,clawmode_integration/tools.py) and starts the message processing loop.- Each tool eventually calls into livebench utilities:
livebench/agent/economic_tracker.pyfunctionslog_message,start_task,end_taskare invoked from 19,âŻ15,âŻ15 places respectively (largest blast radius).livebench/agent/economic_tracker.pyalso callstrack_tokens,add_work_income, andwrite_json(13â9 callers each). - When a task is completed,
livebench/agent/economic_tracker.pywrites JSON logs (write_json) and updates the balance file underlivebench/data/. - 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. - Model calls occur in a few places:
livebench/agent/economic_tracker.py â generate_meta_prompt_for_category(model viaclient.chat.completions.create).clawmode_integration/tools.py â evaluate_artifact(model viaself.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=["*"]) inlivebench/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: falsemissing indeploy.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.