Skip to main content

inspect-robots-xpolicylab

Drive any XPolicyLab-served policy from Inspect Robots.

XPolicyLab unifies 40+ VLA and imitation-learning policies (π0 / π0.5, GR00T N1.7, OpenVLA-OFT, RDT-1B, SmolVLA, ACT, Diffusion Policy, …) behind one policy-server contract: each policy runs in its own conda/uv environment and serves inference over a websocket protocol. This plugin is the Inspect Robots side of that wire: a Policy adapter that connects to a running XPolicyLab policy server, so the whole policy zoo becomes evaluable with any Inspect Robots embodiment and task.

The adapter speaks XPolicyLab's msgpack-over-websocket protocol directly — it does not depend on the xpolicylab package (which is not on PyPI). Only the policy server needs an XPolicyLab checkout.

Install

pip install inspect-robots-xpolicylab

The xpolicylab policy then appears in inspect-robots list policies.

Quickstart

Terminal 1 — serve a policy from your XPolicyLab checkout (its own environment, possibly another machine; see the XPolicyLab README for per-policy install/checkpoint details):

cd XPolicyLab/policy/Pi_0
bash setup_eval_policy_server.sh <bench_name> <task_name> <ckpt_name> \
    <env_cfg_type> <action_type> <seed> <policy_gpu_id> <policy_env> 19000 0.0.0.0

Terminal 2 — evaluate it with Inspect Robots:

inspect-robots run --task my-task --policy xpolicylab --embodiment isaacsim \
    -P url=ws://gpu-box:19000 -P cameras=cam_head:base_rgb

or programmatically:

from inspect_robots import eval
from inspect_robots_xpolicylab import XPolicyLabPolicy

with XPolicyLabPolicy(url="ws://gpu-box:19000", cameras="cam_head:base_rgb") as policy:
    log = eval("my-task", policy, "isaacsim")

Constructing the policy and reading .info never touch the network — the websocket connects on first reset()/act(), with retries while the policy server cold-starts (loading VLA weights can take minutes).

Configuration

Arg Default Meaning
url ws://localhost:19000 policy server websocket URL
action_type joint joint → *arm_joint_state actions; ee → *ee_pose
arms 1 1 or 2 (dual-arm uses left_*/right_* keys)
arm_dim / ee_dim 7 / 1 per-arm joint dims / gripper dims
cameras cam_head:cam_head XPolicyLab camera slot → Inspect Robots camera name
state_map see below XPolicyLab state key → Inspect Robots state key
required_state_keys joint: joint_pos,gripper; ee: none state keys enforced by compatibility checking
action_keys + action_dim derived explicit ordered action-dict keys for exotic setups
camera_height / camera_width unset declare camera resolution for compatibility checks
control_hz unset chunk playback rate; also sent as additional_info.frequency
name xpolicylab policy name in logs (tag runs e.g. xpolicylab:pi0)
connect_timeout_s / request_timeout_s 30 / 120 client timeouts
connect_attempts / connect_retry_delay_s 10 / 5 cold-start retry budget

Mapping-valued args accept a compact string form for the CLI: -P cameras=cam_head:base_rgb,cam_wrist:wrist_rgb.

Default state_map (all XPolicyLab state fields are optional; mapped keys missing from an observation are simply not sent):

XPolicyLab key Inspect Robots key
arm_joint_state joint_pos
ee_joint_state gripper
ee_pose eef_pose

Action mapping

Each infer reply is an action chunk — one dict per future control step. Dicts flatten to vectors in a fixed order: for each arm (left then right), the arm key then the end-effector key. The default single-arm joint profile is concat(arm_joint_state, ee_joint_state) → dim 8, matching the inspect-robots-isaacsim default Franka profile.

Lifecycle notes

  • reset(scene) ends the previous trial server-side (trial_end) and starts a fresh trial_id; close() ends any open trial and says goodbye.
  • eval() closes embodiments it resolves, not policies — use with / close() in programmatic runs. A best-effort atexit hook covers registry-resolved CLI runs.
  • If the socket drops mid-eval, the trial in flight errors and the next reset()/act() reconnects (replaying the hello handshake).

Protocol compatibility

Validated against XPolicyLab commit fe71eb54675cef495fea817a637386a4f4529153. The protocol carries no version field; if upstream changes the wire format, _protocol.py is the single small module to diff and update.

Metadata

Release files for inspect-robots-xpolicylab 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inspect-robots-xpolicylab 0.1.0
File Size Uploaded Provenance
inspect_robots_xpolicylab-0.1.0.tar.gz 21.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for inspect-robots-xpolicylab 0.1.0
File Interpreter ABI Platform
inspect_robots_xpolicylab-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / inspect_robots_xpolicylab-0.1.0.tar.gz

Download URL inspect_robots_xpolicylab-0.1.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c1bdedcc29f76255be376118ce9e119214964b44764414361db953d82cfc0c13
BLAKE2b-256 checksum
How to use checksums
7f29a891ee46b575d7bde2c6ab38ac537e6b45e8b8d3cd52e50426ce44a527d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Release files / inspect_robots_xpolicylab-0.1.0-py3-none-any.whl

Download URL inspect_robots_xpolicylab-0.1.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3371178fec9f81d0654f3bb35c841bba7dd4cbea5fe3141ae40d8ff4c2916179
BLAKE2b-256 checksum
How to use checksums
eb4fdbde8ee8f6a42b092d74d5566820412f7afc1eda1001ed1c74caee173caa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Security for inspect-robots-xpolicylab 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for inspect_robots_xpolicylab-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page