The X-Harness core runtime, built-in mock benchmark, guided CLI wizard, and browser HTML replay exporter run on a standard laptop CPU with Python 3.10+. Real simulation benchmarks additionally require their external simulator, perception server, and base policy server — see Full Environment Setup.
#1. Start in 60 seconds (CPU only)
Install the package in editable mode, let the interactive wizard verify your environment and pick a recipe, then compare the base policy alone against frozen stateful policy code with an instant browser replay:
git clone https://github.com/google-research/x-as-policies.git
cd x-as-policies
pip install -e .
# Guided preflight check & recipe recommendation
xharness wizard
# Base policy alone (0/10) vs. frozen stateful policy code (10/10) + HTML replay
xharness run --program programs/mock/button_unmask_swap/policy_alone.py
xharness run --program programs/mock/button_unmask_swap/reference.py \
--replay replay.html
# Watch triggered Semi-online rescue recover a buggy program (0/5 -> 5/5)
python examples/01_quickstart.py
#2. Verify & replay released HF artifacts (CPU)
Download the companion Hugging Face dataset (yuxianglai117/x-as-policies) to verify SHA-256 checksums and rollout logs offline on CPU or dry-run/replay any released policy (see Released Policies & Rollout Logs):
hf download yuxianglai117/x-as-policies --repo-type dataset \
--local-dir ./x-as-policies
python scripts/verify_released_logs.py --local-dir ./x-as-policies \
--check-integrity --summary
python scripts/replay_released_policy.py --local-dir ./x-as-policies \
--list --benchmark libero --runnable-only
python scripts/replay_released_policy.py --local-dir ./x-as-policies \
--program-id <program_id> --dry-run
#3. Full benchmark setup (simulators & localhost servers)
Install each real simulator in its own isolated conda/venv environment, and run the 3D perception server and base policy server locally on 127.0.0.1 in separate terminals (see Full Environment Setup for all 8 simulation suites):
# Terminal 1 (perception env, localhost: Grounding DINO + SAM 2; CoTracker optional)
pip install -e ".[perception]"
python scripts/serve_perception.py --port 8765
# Terminal 2 (isolated simulator env, e.g. libero)
pip install -e ".[ws,vertex]"
export XHARNESS_PERCEPTION_URL=http://127.0.0.1:8765
export XHARNESS_POLICY_URL=ws://127.0.0.1:8000 # local VLA / WAM server
xharness doctor libero
#Guided setup wizard & browser replay
xharness wizard
Runs machine preflight checks (check_requirements), maps your VLA + VLM + budget regime via xh.recommend_tier(...), optionally scaffolds a clean Program starter file (--write-starter), and prints exact copy-paste run and evolve commands.
xharness wizard --non-interactive --vla shift --vlm lighter --write-starter starter.py
--replay replay.html
Exports a self-contained single-file HTML viewer using pure Python stdlib + NumPy PNG encoding. Scrub camera RGB frames, TCP/gripper state, executed actions, outcomes, and Semi-online rescue takeovers directly in your browser without a server.
xh.export_replay(report, "replay.html", benchmark="mock", task="pick_cube")
#Choose your path
15-Minute Human Guide →
Hands-on CPU tutorial covering the 3-method contract, Semi-online rescue, gated evolution, and recipe flowchart.
Bring Your RobotExtend Policies, Tools & Sims →
7 concise recipes to plug in your own VLA server, perception tool, custom simulator, code form, or watchdog trigger.
AI Coding AgentsAGENTS.md + Playbooks + Skill →
11 architectural invariants, exact data schemas, 7 playbooks, and the auto-discovered xharness-quickstart Agent Skill.
#Six layers at a glance
Every policy program implements one uniform Python contract (set_task, get_action, update_step) running through an audited ProgramHost at native control rate (16.7–25 Hz) with zero in-loop VLM stalls.
#Install optional extras
| Extra | Purpose | Install command |
|---|---|---|
| Core (default) | Lightweight core runtime, CLI wizard, HTML replay, mock benchmark | pip install -e . |
dev | Full CPU regression & release-hygiene test suite (pytest -q) | pip install -e ".[dev]" |
ws | OpenPI WebSocket policy servers (websockets, msgpack) | pip install -e ".[ws]" |
perception | Perception HTTP server (Grounding DINO, SAM 2, Depth Anything V2) | pip install -e ".[perception]" |
vertex | Gemini on Vertex AI with ADC credentials | pip install -e ".[vertex]" |
yam | Real YAM wire client (hardware ZMQ bridge & OpenPI WebSocket policy server) | pip install -e ".[yam]" |