Connect an owned browser runtime
account.get · projects.list · project.create · project.remix · runtime.create · runtime.inspect
Use the same account, projects and engine as the editor. Author a workcell, run a task or learned robot motion, and collect measured evidence.
LUCKY_API_KEY environment variable. Configure the HTTP or MCP client with a Bearer header. This connection uses personal keys, not OAuth.CLI and client setup →Download the CLIAgent skill
Cloudflare coordinates jobs and stores projects. Browser workers run MuJoCo, ONNX policies, rendering and recording. An accepted or queued command does not establish physical success.
account.get · projects.list · project.create · project.remix · runtime.create · runtime.inspect
catalog.robots · asset.import · scene.replace · scene.patch · scene.add · scene.select · robot.add · behavior.put · engine.inspect
project.remix · simulation.command · runtime.inspect · engine.inspect · capture.image
asset.import · motion.list · motion.attach · simulation.command · runtime.inspect · recording.run · project.save
view.configure · capture.image · recording.run · recording.batch · artifacts.list · project.export · project.save
provider.request
Import a prepared mjlab fused G1 model with asset.import using kind: "motion". Discover assets with motion.list, bind one with motion.attach, then run or record the real robot. The portable G1 example already includes its matching robot and policy; import that ZIP as kind: "project".
Inspect simulation.motions[robotId] in runtime.inspect. The sample uses 5 ms physics and 50 Hz inference. A full recording has 61 frames, 100 inference records and 400 physical steps; allow a three-second recording budget to include its final boundary.
Compatibility checks enforce the expected 29-joint robot, observation contract, PD gains and initial state. Disable or detach before another controller drives the same robot. Reference finished means the clip ended, not that a task succeeded. Generic ONNX adapters, automatic policy blending and in-browser training remain unsupported.
G1 walkthrough →Preparation and constraints →Executable agent commands →
The manifest contains every registered operation's scope, location, mutation flag and schema. HTTP and MCP share that registry; MCP tool names replace dots with underscores. New motion tools are motion_list and motion_attach, with policy import through asset_import.
ManifestOpenAPIWorkflow indexExample promptsBootstrap
Project schemaSnapshot schemaCompiled scene schemaBehavior APIRaw engine methodsRecordingTask execution
Physics uses the scene's physicsTimestep: 0.002 seconds by default, or 0.005. Video and rows remain 30 fps. Read measured simulation state, retained control traces and episode reasons; do not confuse physics ticks with inference steps.
Use the current runtime generation/revision and a UUID idempotency key. A disconnected or unknown job may have made partial changes: reconnect and inspect before retrying. Save or export before closing a disposable runner. On a cloud-save conflict, preserve your draft and compare it with the latest project.
Jev review and assistant generation require configured paid providers. Simulation and imported-policy inference do not. Model labels remain advisory; planned architecture does not add unimplemented operations.
# Lucky Engine external-agent access
Base URL: https://web.luckyrobots.com
Production host: https://web.luckyrobots.com
Use this request origin for a native Cloudflare branch preview; never invent a feature subdomain.
## Discover the application
Human tutorial: https://web.luckyrobots.com/tutorial.html (Juniper, learned G1 motions, recordings, advisory Jev, implemented versus planned).
Connect: https://web.luckyrobots.com/agents
Complete operation registry: https://web.luckyrobots.com/agent/manifest.json
HTTP schemas: https://web.luckyrobots.com/agent/openapi.json
Workflow index: https://web.luckyrobots.com/agent/workflows.json
Executable agent guide: https://web.luckyrobots.com/agent/AGENT-GUIDE.md
Motion contract/import guide: https://web.luckyrobots.com/agent/MOTIONS.md
Recording reference: https://web.luckyrobots.com/agent/RECORDING.md
Task execution: https://web.luckyrobots.com/agent/TASK-EXECUTION.md
Behavior APIs: https://web.luckyrobots.com/agent/scripting.json and https://web.luckyrobots.com/agent/SCRIPTING.md
Raw bridge tuples: https://web.luckyrobots.com/agent/engine-methods.json
The project/snapshot/scene schemas linked from the manifest are generated from actual engine types.
## Authenticate and execute
Register with your email and password, then obtain account approval. Sign in to your approved account. In Settings → Agent connections create a named, scoped, expiring personal key; copy it once. Use Authorization: Bearer, never URL parameters. Keys retain current account permissions and policy; revoke in Settings. No inference key is needed for deterministic operations or an imported ONNX policy.
Download https://web.luckyrobots.com/agent/lucky.mjs. Set LUCKY_URL and LUCKY_API_KEY in your local environment. Run node lucky.mjs discover. Use execute <operation> '<JSON args>'.
Cloud operations work without an editor. Create a runtime for an owned project and start node lucky.mjs runner --session <id>. The runner requires installed Playwright/Chromium and executes the actual browser engine. Cloudflare coordinates and stores data; browser workers run physics, ONNX inference and encoding.
Runtime operations need sessionId, generation, revision, idempotencyKey. A 202 is queued only. Poll /api/v1/jobs/<id>; inspect actual motion/contacts/task state. Closed/disconnected runtimes never return fabricated success. Cancellation may leave partial physical changes; inspect before retrying.
Use project.save to save an authored change with optimistic cloud revision protection. Human edits in another editor can conflict; preserve and export your draft instead of overwriting.
## Imported learned motions
Upload bytes as an owned artifact, then asset.import with kind motion for a prepared ONNX/policy ZIP, or kind project for a portable scene. motion.list returns device-local imported models/contracts. motion.attach binds an assetId to a compatible robotId; use assetId null to detach or enabled false to disable. simulation.command play/step awaits inference; reset restores exact entry state. runtime.inspect exposes simulation.motions. recording.run resets and records the rollout. project.save/project.export retain the model in the portable project.
Included example: https://web.luckyrobots.com/motions/g1-aiming.lucky.zip. Import as a project. It uses 0.005-second physics ticks and 50 Hz inference (four physics ticks per action); the full clip is 400 physics steps, 100 inferences, and 61 recorded 30 fps frames including frame zero. Request a 3-second recording budget to include the final boundary; it stops at reference completion. A 2-second frame budget holds only 60 samples.
Only prepared mjlab fused G1 policies are supported: compatible 29-joint robot/PD actuators, exact observation contract and gains, embedded normalization/reference, declared initial pose/velocity and physics rate. Arbitrary ONNX networks, policy blending, velocity-command walking and in-browser training are unsupported. Disable/detach an enabled policy before another controller drives its robot. finished-reference is not episode success.
Recording traces retain physics_hz, raw_ctrl_ticks, motion_trace (observations/actions/hash/inferenceTick), and initial_state. Replay uses these recorded controls without rerunning policy inference. Imported models live on the runtime device; save/export a portable project before closing a disposable runner.
## MCP clients
MCP endpoint: https://web.luckyrobots.com/mcp, Streamable HTTP. Configure your client's bearer header. This personal-key mode is not OAuth. Tools use underscored operation names: asset_import, motion_list, motion_attach, simulation_command. Prompts: panda-sweep, juniper-fruit, g1-learned-motion.
Codex TOML: [mcp_servers.lucky_engine], url = "https://web.luckyrobots.com/mcp", bearer_token_env_var = "LUCKY_API_KEY".
Claude project .mcp.json: {"mcpServers":{"lucky_engine":{"type":"http","url":"https://web.luckyrobots.com/mcp","headers":{"Authorization":"Bearer ${LUCKY_API_KEY}"}}}}. Substitute the environment variable locally; never commit a real key.
Official client references: https://developers.openai.com/codex/mcp and https://code.claude.com/docs/en/mcp .
Units: meters, seconds, radians; Z up; camera FOV degrees. Project.physicsTimestep defaults to 0.002 seconds and may be 0.005; the compiled model is authoritative. Step counts are physics ticks. Actuator units are model-specific. Action acceptance, reference completion and measured task success are distinct.
Jev reviews and assistant routing are optional paid services. Original datasets remain unchanged; labels and confidence are advisory. Automatic weakness mining, camera optimization and runtime AI Decision components remain planned, not available operations.