A working turntable
Download the complete tool-call example. It creates a grabbable box, a numeric toggle, and a speed slider, installs a scoped program, and resumes the world. Ask the agent to execute the calls in order throughar_world after choosing a clear origin. The file contains tool calls, so do not use the world Import button for it.
Its JavaScript source is:
0 is off and 1 is on.
Use the same pattern with a Blender asset: obtain its ID from ar_world observe, substitute that ID for turntable.model, and include it in the program’s entityIds. This controls the imported asset’s scene transform. It is not direct access to Blender’s Python process or every internal mesh node.
Install through the agent
Callar_world with command: "program" and a payload containing command: "install" and program:
Create the objects before installing their program. For manual experiments, select an object, open Objects → Programs, enter source, and choose Run on selected object. That editor scopes the program to the selected object only; use the agent API when a program needs multiple objects and controls.
Runtime API
An
event(event) handler receives scoped grab, release, control, collision, and edit events. Events include type, target, actor, and data; a control change supplies data.value. Read the current capabilities result for the full contract.
Programs can patch transforms, geometry, materials, visibility, and controls, apply impulses, and drive joints whose bodies are both in scope. They cannot create or delete objects, install more programs, use the DOM, import code, or access the network. The runtime also rejects changes to held objects even if a program forgets to check heldBy.
Inspect, pause, and resume
pause, resume, remove, or parameters with its ID. The parameters command takes a params object. Pause all creations with ar_world pause or the Pause creations button.
World exports retain source, parameters, JSON state, and simulation time. Imported and restored programs remain paused until resumed. Local programs stop stepping while the page is hidden.
The runtime allows 12 programs and 64,000 source characters per program. A worker that fails or exceeds its 500 ms response budget terminates without blocking the main scene. Keep work per tick small; use instancing or authored GLB animation for repeated visual structure.