DirectControl serves an embodiment’s parts as one MCP move tool, following Direct Control. The steps serve one arm, and a later section serves two.
1
Write a single-env bridge
Direct control drives single-env sims. The action needs a control kind,
names, and bounds, as the PointArm bridge in Writing a bridge has.2
Attach DirectControl to the endpoint
env.py
ContractEmbodiment builds the arm and gripper parts from the contract alone, with the arm in the contract’s own space (space= picks ee_delta for a hand-pose contract), so it has no model of the arm’s reach or collisions. It checks the contract’s limits and the speeds you give it. A robot with its own embodiment can veto more. sim.capabilities() now returns robot and control, an mcp capability.3
Point a tool-calling agent at it
Any agent that opens
control and calls its tools works:Two arms
A robot with several arms is served the same way.contract_arms builds one ContractEmbodiment per arm from a contract whose action columns are named <arm>.<column>, and Composite joins them into one robot with the parts left_arm, left_hand, right_arm and right_hand. Save the bridge as sim.py:
sim.py
env.py, the embodiment is the only change. The hooks and the template are the same, with TwoArms in place of PointArm:
env.py
ended, because the task succeeds while the second keyframe plays.
contract_arms checks each arm on its own, so nothing vetoes one arm hitting the other. Say in the task prompt that the arms can collide. An env can opt in to hand_clearance= to keep the hands apart. Arms in different spaces, and the other options, are in the reference.
The agent now has move and replies as described in the reference. Every played tick also streams to the rollout’s trace when HUD_API_KEY is set in the environment’s process.