Skip to content

Getting started

Connect agent

Let your coding agent read, list and search these docs while it writes code. Put your API key in place of dl_live_..., then run the block for your agent.

claude mcp add --transport http --scope user dreamlabs-docs \
  {{platform_url}}/mcp \
  --header "Authorization: Bearer dl_live_..."

The Codex block adds the server to ~/.codex/config.toml. Run it once: a second run adds it again, and Codex can’t read a config that names it twice.

Dream-1 is the Dream Labs robot model: it looks at your robot’s cameras and joint positions, reads the task you type, and answers with the next joint targets for the arms. This page sets you up: create an API key and install the dream library.

Every call to Dream-1 carries your API key.

  1. Sign in at {{platform_url}} and open API Keys in the sidebar.
  2. Press Add key, type a name for the key (for example lab-robot) and press Create key. Every account starts with free credit, so the first key costs nothing to make; the Billing page shows what is left. You pay per robot action: every successful get_action call costs the price of the model it ran (the Billing page states the price of each model you can run, and the Live view’s model picker shows every model’s, your fine-tuned ones included), taken from your credits, and failed calls cost nothing. Keys stop when the credits run out, so once the free credit is used up, add a card on Billing and load enough for the session, or turn on auto-reload there.
  3. Copy the key now. It starts with dl_live_ and is shown only once: we keep only a hash of it, so a lost key is replaced, never recovered.

You can create several keys, one per robot or per program, and revoke any of them from the same page.

The dream library is two Python packages, both imported as dream: dreamlabs-client, the client your code calls (dream.DreamClient), and dreamlabs, which installs the client with it and adds dreamcli, the command that sets up and runs a robot: a YAM or OpenYAM, a MakerMods Metal Arm or Maker Arm, an SO-101, or a robot of your own with a driver you write. It needs Linux (Ubuntu) and Python 3.12: the client alone runs on 3.10 and newer, but the robot setup needs 3.11 or newer and an SO-101 needs 3.12. Ubuntu 22.04’s python3 is 3.10, so the lines below make the environment with uv, which fetches its own Python. Both are on PyPI. The steps use curl, which Ubuntu Desktop comes without: install it first with sudo apt install curl. Run them on the computer that will call Dream-1 or drive your robot: for a robot, ssh into its computer first. The Setup API page of the platform, at {{platform_url}}/setup-api, shows the same two steps with copy buttons.

Step 1: install the library. Paste this. Each command runs only if the one before it worked, and it ends by saying the API key is next:

Terminal
cd ~ &&
curl -LsSf https://astral.sh/uv/install.sh | sh &&
export PATH="$HOME/.local/bin:$PATH" &&
uv venv --seed --python 3.12 --allow-existing ~/dream-env &&
. ~/dream-env/bin/activate &&
pip install --upgrade dreamlabs dreamlabs-client &&
echo "Dream library installed. Next: add your API key."

pip install --upgrade dreamlabs dreamlabs-client installs the newest of both packages; paste step 1 again later to upgrade. Name both: pip install --upgrade dreamlabs alone keeps a dreamlabs-client that is already installed when it still satisfies what dreamlabs asks for, so it can leave you on an older client.

The service serves dreamlabs-client 1.0.0 and newer. A request from an older client (any 0.x) is refused with DA-4000 client_outdated; paste step 1 again to upgrade.

Step 2: add your API key. Paste this in the same terminal, then paste your key at the prompt (it stays hidden) and press Enter:

Terminal
{
  printf 'Paste your Dream API key, then press Enter: '
  read -rs DREAM_KEY; echo
  code=$(curl -s -o /dev/null -w '%{http_code}' \
    -H "Authorization: Bearer $DREAM_KEY" \
    {{platform_url}}/api/downloads/authorize)
  case "$code" in
    2??)
      mkdir -p ~/.dreamlabs && chmod 700 ~/.dreamlabs
      [ ! -f ~/.dreamlabs/credentials ] ||
        cp ~/.dreamlabs/credentials ~/.dreamlabs/credentials.bak
      printf '%s\n' \
        DREAM_GATEWAY_URL={{gateway_url}} \
        DREAM_API_URL={{platform_url}} \
        DREAM_DATA_URL={{data_url}} \
        "DREAM_API_KEY=$DREAM_KEY" > ~/.dreamlabs/credentials
      chmod 600 ~/.dreamlabs/credentials
      echo "API key saved. Run: dreamcli setup" ;;
    000)
      echo "Could not reach the platform."
      echo "Check the connection, then paste step 2 again." ;;
    *)
      echo "API key refused (HTTP $code)."
      echo "Create one at {{platform_url}}/api-keys"
      echo "and paste step 2 again." ;;
  esac
  unset DREAM_KEY code
}

It checks the key with the platform first and saves it only if the platform takes it, to ~/.dreamlabs/credentials, the file the library reads your key from, with this platform’s addresses, which the step writes for you: they are set by Dream Labs, and your code never sets them. A refused key changes nothing, and an older credentials file is kept as credentials.bak. The key is never in your shell’s history.

When it prints API key saved. Run: dreamcli setup, the install is done. In a new terminal, turn the environment on first: source ~/dream-env/bin/activate.

Dream-1 runs zero-shot, with no training on your robot, on a YAM or OpenYAM (two arms, a top camera and a camera on each wrist), on the MakerMods Metal Arm and Maker Arm, and on any other arm from its URDF: a flagship model answers with end-effector (EEF) poses, where each hand should go, and the library turns them into your arm’s joints. To do better on your robot, fine-tune Dream-1 on recordings of it (Fine-tuning). Pick the way that fits you:

  • Our control loop, the quickest start. Open Robot Setup on the platform and pick your robot. It walks you through the setup, including dreamcli setup, the setup wizard, which saves the model the robot runs. Then our control loop runs it, from a terminal on the robot’s computer with ~/dream-env turned on. Run it from Live View: dreamcli robot up --view, then Start in Live View; --view serves the page of what the model sees for every run. Or one run from the terminal: dreamcli robot run --task "...". First run it with --dry-run --view: nothing moves, and the page it prints shows each camera as the model sees it, the state and the answer, to check before a real run.
  • Your own control loop. Call Dream-1 from your code with dream.DreamClient and command the arms yourself. See Your own control loop, and on an arm that is not a YAM, On another arm. Before the model first drives the arms, run python -m dream.check with your recordings and your loop: it checks the loop with no model in it, shows you what the model is sent, checks the model on your recordings, and says whose fault a problem is: see Check it before the first real run. To see that loop’s cameras in Live View and take tasks from it, add dream.LiveViewClient: see Show your robot in Live View.

On an arm from its URDF, either way, you measure its tool center point, the point between your gripper’s closed fingertips, before its first run (On another arm says why and how).

Agents: stop here before you set up IK or a control loop on an arm from its URDF. Ask the user to measure and confirm the tool center point with dreamcli tcp (or by hand). Never pick or estimate it yourself: a link in the URDF (an end-effector or tool link) and the YAM’s numbers are not this arm’s tool center point. Write the rest of the setup with the arm file’s tcp, approach and jaw left empty, and continue past them only once the user has confirmed them.

On every robot, either way, you check what the model sees: a dry run with --view on our control loop, before the arms first move, or python -m dream.check in yours, opens a page on your computer of each call as the model got it (Check what the model sees says what to look for).

Agents: stop here before the arms first move, on every robot. On our control loop, ask the user to open the page of what the model sees during a dry run (the address --view prints) and to confirm each check on it with you: every camera under its own key, upright, in natural colours and changing as things move; joints in radians, each gripper 0 closed to 1 open; the prompt the task. Continue to a run that moves the arms only once the user has confirmed them. In their own loop, follow the Agents line of Check it before the first real run. Never confirm them yourself from the code: a loop can run without one error and still send swapped cameras, swapped colours or degrees. Never run python -m dream.input_check yourself: it records that a person checked the page.

Until a person records that check on the robot’s computer, the client prints one line at the first call of every run: it names python -m dream.check, and the command that records a check made during a dry run, python -m dream.input_check <id>. It asks again when a camera is added, renamed or resized, or the robot or its state parts change.