alloy
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ALLOY_CACHE | No | Moves the folder that downloaded Hub library objects are cached in (default is `~/.cache/alloy/imports/<library>/`). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Alloy is a GPU physics engine for robots and objects (rigid, cloth, liquid). Units are SI (m, kg, s), z is up. Typical flow: list (scenes/objects/materials/robots) -> scene (check a description, fast) -> build (returns a sim id; the first build of a new scene compiles kernels, about a minute) -> step / run / state / targets -> check -> render (returns a PNG) -> close. While it runs: drive (kinematic objects), pose, wrench, settle, heater, controls. vary writes n variants of a scene (objects moved, textures swapped) as Scene JSON files that every tool takes as scene. A scene is a library scene name, a file path (.yaml card, .xml MJCF, .urdf, .usd, Scene .json), or a recipe: {"objects": [{"add": "ground"}, {"add": "box", "name": "cube", "size": [0.1, 0.1, 0.1], "pos": [0, 0, 0.5], "mass": 1.0}]} (list kind=adds shows every add kind and its arguments; a robot's path can be a name from list kind=robots; "set": [{"set": "heater", ...}] rows call Scene.set_*). Every error says what to change in its "fix".
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| listB | List library scenes, objects, materials or robots, recipe add kinds, or these operations. Example arguments: {"kind": "objects", "match": "peg"} |
| sceneA | Check a scene description without building it (fast); optionally save it as JSON or cards. Example arguments: {"scene": {"objects": [{"add": "ground"}, {"add": "sphere", "name": "ball", "radius": 0.05, "pos": [0, 0, 0.3]}]}} |
| buildA | Build a scene (first build of a new scene compiles kernels: about a minute). Later calls pass the returned id as sim. Names list every body, joint and particle object. Example arguments: {"scene": "demo_peg_d12", "worlds": 4} |
| stepB | Advance a simulation some control periods; returns state and health. Example arguments: {"sim": "sim1", "steps": 50, "names": ["cube"]} |
| runB | Run some simulated seconds, recording frames; saves them to an .npz and samples a few. Example arguments: {"scene": "demo_peg_d12", "seconds": 1.0, "names": ["peg_d12"], "out": "traj.npz"} |
| stateC | Read the current state of bodies, joints and particle objects. Example arguments: {"sim": "sim1", "names": ["cube"], "world": 0} |
| targetsB | Set joint position or velocity targets (kept until changed). Example arguments: {"sim": "sim1", "targets": {"arm/lift": 0.1}} |
| resetC | Put every world of a simulation back to its start state. Example arguments: {"sim": "sim1"} |
| driveA | Move a kinematic object at a constant velocity from now (Sim.drive); stop=true ends all drives. Example arguments: {"sim": "sim1", "name": "belt", "velocity": [0.25, 0, 0], "duration": 2.0} |
| poseB | Teleport a free or kinematic body now, at rest (Sim.set_pose). Example arguments: {"sim": "sim1", "name": "cube", "pos": [0, 0, 0.5]} |
| wrenchA | Hold a force and torque on a body until changed; zeros remove it (Sim.apply_wrench). Example arguments: {"sim": "sim1", "name": "cube", "force": [0, 0, 5]} |
| settleA | Run some seconds with no new commands; the settled state becomes the one reset returns to. Example arguments: {"sim": "sim1", "seconds": 0.5} |
| heaterB | Change a heater's temperature (K) or power (W) while running (Sim.set_heater). Example arguments: {"sim": "sim1", "name": "burner", "temperature": 370.0} |
| controlsA | Set raw actuator inputs by actuator name (Sim.set_controls); targets is the usual way. Example arguments: {"sim": "sim1", "controls": {"arm/actuator1": 0.5}} |
| closeC | Close an open simulation. Example arguments: {"sim": "sim1"} |
| checkA | Check a scene: card validation, overlap at load, rest drift, penetration, health events and energy drift, each finding with what to change. With sim (or after build) it checks the open simulation now. Example arguments: {"scene": "demo_peg_d12", "quick": true} |
| renderB | Render a PNG of one world (auto-framed unless look_at is given). Example arguments: {"scene": "demo_peg_d12", "out": "peg.png", "width": 320, "height": 240} |
| estimateB | Estimate memory, step time and wall time of a run before running it. Example arguments: {"scene": "demo_peg_d12", "worlds": 1024, "seconds": 2.0} |
| importB | Import an MJCF, URDF or USD file into object, material and scene cards. Example arguments: {"file": "robot.urdf", "out": "my_library"} |
| exportA | Export a scene or a library object to MJCF, URDF and USD (each checked by loading it). Example arguments: {"scene": "demo_peg_d12", "out": "out/peg", "formats": ["mjcf", "usd"]} |
| varyA | Make n edited copies of one scene for visual and placement diversity, the same for the same seed: each free object (not robots, static, kinematic or held ones) moves within +-pos in x, y and +-yaw degrees, objects that touch move together, and a draw that overlaps or loses its support is redrawn; each look takes another texture of its family plus a small tint. Writes variant_000.json ... (pass one as scene to build, run or render) and variants.json (moves and textures); sheet adds contact_sheet.png. Example arguments: {"scene": "demo_peg_d12", "n": 4, "pos": 0.01, "yaw": 10, "seed": 3, "out": "variants", "sheet": true} |
| composeA | Pick objects from the card library (Alloy's, alloy-assets, every imported library and your own folders), place them with support, clearance and clutter rules, run alloy.check after every placement and a full check at the end, and fix what the checks flag. Liquids and grains fill containers by volume or mass ('a mug with 200 ml of water'), pour as a stream, or pile at their angle of repose; cloth lies flat, drapes or hangs over the table edge; cables have a length, a gauge and ends plugged into objects. Returns every scene with its objects, soft items (amounts, routes, estimates), check report and metrics. Example arguments: {"sentence": "a mug and two cubes on a table", "variations": 1, "out": "my_scenes"} |
| createA | Turn a mesh file, a photo or a text into an object card with a repaired watertight mesh, convex hulls, a visual GLB, and mass, friction and restitution with their sources (USER, CITED, LIBRARY or ESTIMATE with a range). Nothing is refused for a missing citation: estimates are labelled and listed under 'verify'. The card is drop-tested with alloy.check and written to |
| auditA | Audit a scene the way a reviewer would, but automatically and with numbers: alloy.check over |
| fetchA | Files go to $ALLOY_CACHE/imports// (default ~/.cache/alloy/imports//), where scenes, compose and the API find them; files already there with the right sha256 are not downloaded again. An object whose model uses another object's files (a composed cabinet's door panel and handle) brings that object too ( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Several clusters overlap in purpose: check vs. scene vs. audit all validate scenes (differing only in depth/timing), step vs. run vs. settle all advance time, and targets vs. controls both set actuator inputs. The long descriptions do draw the lines, but an agent must read carefully to pick correctly, and terse names like pose/wrench/drive give little help on their own.
All names are single lowercase words, which is stylistically uniform, but there is no verb_noun pattern and the set mixes verbs (build, step, render, fetch) with bare nouns (scene, state, targets, heater, controls). Names are readable in context yet cryptic out of it.
25 tools sits at the heavy end for what is essentially a physics-simulation workbench spanning authoring, asset import, runtime control and validation. Each tool maps to a real operation, but the surface is broad enough that discovery is a burden and consolidation (e.g. check/scene/audit, step/run) would help.
Coverage is strong: scene authoring (scene, build, compose, create, import, fetch, list, vary, export), runtime control (pose, wrench, drive, targets, controls, heater, step, run, settle, reset, state, close), validation (check, audit, estimate) and rendering. Gaps are minor — no explicit removal of bodies/objects mid-simulation and no sensor/camera readout beyond state.