CodeControl serves an embodiment’s parts to a Python kernel and the kernel’s robot.move follows Code Control. It is attached the way DirectControl is in the Direct Control guide, and it takes the same embodiments.
1
Write a single-env bridge
Code 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 CodeControl to the endpoint
env.py
DirectControl takes, so a robot with its own embodiment can check more than a contract does. sim.capabilities() now returns robot and control, an mcp capability with the tools python, view_image and done. control.result_extra() adds the sandbox mode, the cells run and the robot calls to the episode’s result.3
Point a tool-calling agent at it
Any agent that opens
control and calls its tools works:4
Or use a language-model agent
create_code_agent builds a HUD gateway agent with the Code Control prompt. It needs HUD_API_KEY:view_image. For another model, pass images_kept=None.RUA_CC_<NAME> variables, or from the settings argument of CodeControl(embodiment, settings=...), which wins. They are in the reference.
The agent now has python and view_image, 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.