EVA-Client
On this page

Robot agents and MCP

Run Codex, Claude Code, or a PEAR checkpoint against the local robot MCP server.

This guide covers EVA-Client 0.4.0. Installation · Source revision

EVA-CLIENT serves robot tools over local Streamable HTTP MCP. Each eva agent invocation runs the harness selected in agent.harness.type.

Download and configure

Run these commands from the EVA-CLIENT root with Python 3.11 and uv. Start at the second line if you already have a Python 3.11 .venv. Install the environment

uv venv --python 3.11 .venv
uv pip install --python .venv/bin/python -e '.[agent]'
cp -n configs/01_deploy/dual_yam/agent.example.py configs/01_deploy/dual_yam/agent.local.py

The example selects Claude Code. In the local copy, fill in agent.harness.api_key and check base_url and model in the same block. To use Codex or PEAR, change type and the connection settings there. The comments list the alternatives. Deployment example

Install the harness you select. Codex and Claude Code run on the EVA machine. PEAR uses EVA’s Python client and model weights on the GPU server.

Codex

Download the native release for your OS and CPU, install it under your user account, and verify its version. Official release assets

(
  set -eu
  case "$(uname -s)/$(uname -m)" in
    Darwin/arm64)   target=aarch64-apple-darwin ;;
    Darwin/x86_64)  target=x86_64-apple-darwin ;;
    Linux/aarch64)  target=aarch64-unknown-linux-musl ;;
    Linux/x86_64)   target=x86_64-unknown-linux-musl ;;
    *) uname -sm >&2; exit 1 ;;
  esac
  download_dir=$(mktemp -d)
  trap 'rm -rf "$download_dir"' EXIT
  asset="codex-$target"
  curl -fL --retry 2 "https://github.com/openai/codex/releases/latest/download/$asset.tar.gz" -o "$download_dir/codex.tar.gz"
  tar -xzf "$download_dir/codex.tar.gz" -C "$download_dir" "$asset"
  mkdir -p "$HOME/.local/bin"
  install -m 755 "$download_dir/$asset" "$HOME/.local/bin/codex"
  "$HOME/.local/bin/codex" --version
)

To use your ChatGPT login, sign in with Codex’s file credential store on the EVA machine. The default file is ~/.codex/auth.json. If you use a custom CODEX_HOME, use the file inside that directory.

~/.local/bin/codex -c 'cli_auth_credentials_store="file"' login
~/.local/bin/codex -c 'cli_auth_credentials_store="file"' login status

Replace the harness block in your local config with the following and choose a model available to your account.

harness=dict(
    type="codex",
    binary="~/.local/bin/codex",
    model="gpt-5.4",
    auth_file="~/.codex/auth.json",
),

Set only the file path in the config. Paths may be absolute, start with ~, or be relative to the config file. EVA reads the login at the start of each task and gives the built-in OpenAI provider a private, temporary session. The original Codex login manages refreshes. If a session expires, renew the login with Codex and run the task again.

For a Responses-compatible endpoint, set api_key and base_url in place of auth_file. Use the endpoint and model ID supplied by your provider, for example https://api.openai.com/v1.

Claude Code

Download the official installer, install the stable native binary, and print its version. Official installation guide

(
  set -eu
  installer=$(mktemp)
  trap 'rm -f "$installer"' EXIT
  curl -fsSL --retry 2 https://claude.ai/install.sh -o "$installer"
  bash "$installer" stable
  "$HOME/.local/bin/claude" --version
)

Edit agent in the Git-ignored configs/01_deploy/dual_yam/agent.local.py. For a custom provider, enter its Anthropic Messages root URL. Claude Code appends /v1/messages. Use the model ID and key issued by that provider.

agent = dict(
    harness=dict(
        type="claudecode",
        binary="~/.local/bin/claude",
        base_url="https://api.anthropic.com",
        model="claude-sonnet-4-6",
        api_key="YOUR_API_KEY",
    ),
)

A binary may be on PATH, absolute, or relative to the config file. Each invocation reads the selected harness’s connection settings. The PEAR section below covers downloading model weights and starting the inference server.

Run against a fake robot

The example uses ports 5555 and 5556 for fake observations and actions.

Run the fake dual YAM and EVA in separate terminals from the repository root:

.venv/bin/python -m examples.hardware.fake_common dual_yam \
  --dynamics-mode direct \
  --obs-endpoint tcp://127.0.0.1:5555 \
  --action-endpoint tcp://127.0.0.1:5556
EVA_WORKSTATION_PATH="$PWD/work_dirs/agent-fake-hardware.yaml" \
  .venv/bin/eva --config configs/01_deploy/dual_yam/agent.local.py --headless

In a third terminal, check MCP and run a read-only task with Codex or Claude Code:

.venv/bin/eva agent --config configs/01_deploy/dual_yam/agent.local.py --check
.venv/bin/eva agent --config configs/01_deploy/dual_yam/agent.local.py \
  "Call get_info and get_observation. Report the robot type, joint state, and cameras."

--check verifies the executable version, MCP tool discovery, and any configured Codex login file. The task invocation sends the first model request. For a motion smoke test, set agent_mcp.allow_motion=True, restart EVA, and enter MANUAL mode:

.venv/bin/python examples/control_channel/eva_ctl.py cmd web:select_mode:manual

The DEVICE page can also enter MANUAL mode when running the web console. MCP publishes through the active EVA transport, which can be backed by a fake node or physical hardware. Follow the device quick start to connect a physical robot and keep its physical stop within reach.

Observe an evaluation

The evaluation preset uses the policy, tasks and scoring from dual_yam_eval.py and enables read-only MCP. Start the evaluation in one terminal and use your existing deployment agent.local.py in a second terminal to inspect state and cameras on the same MCP port. Evaluation example

.venv/bin/eva --config configs/03_evaluation/dual_yam_agent_eval.example.py
.venv/bin/eva agent --config configs/01_deploy/dual_yam/agent.local.py --check

Run records

The launcher prints the run directory. The default is work_dirs/agent/<harness>/<UTC timestamp>-<ID>/. Override it with agent.log_dir.

File Contents
run.json Harness, model, task, timestamps and exit status
events.jsonl Append-only CLI events, PEAR model and motion events, and errors
trajectory.json Assistant messages, tool calls and results, or PEAR observations and actions
usage.json Token usage reported by the selected runtime or model endpoint
observations/ Camera JPEGs submitted to PEAR, referenced from the trajectory

The launcher redacts the configured API key and Codex login tokens from console output and run logs. Task text, model content, and camera images are retained in the local run directory.

Start an external harness in a sandbox

Install Bubblewrap on the Linux host running Codex or Claude Code. On Ubuntu or Debian, run

sudo apt-get update
sudo apt-get install bubblewrap
bwrap --version

Then enable the sandbox in the local config’s agent section.

agent["sandbox"] = dict(enabled=True)

If the CLI loads dependencies from a bundled installation, set agent.sandbox.runtime_dir to that dedicated directory. A native binary from the official release is the simplest setup. With the sandbox enabled, --check runs the CLI’s --version inside Bubblewrap. A host without usable user namespaces can use it to diagnose startup before submitting a task.

Bubblewrap isolates mounts, processes and IPC. The CLI gets a private writable workspace, read-only runtime files, and the host network so it can reach the local MCP and configured model endpoint. Native pear runs in the EVA Python process. Bubblewrap reference

Robot MCP tools

Other Streamable HTTP clients can connect to http://127.0.0.1:8765/mcp. The listener binds to loopback. Model requests use the selected harness’s API key or Codex login.

Tool Behavior
get_info() / info() Robot, mode, motion permission, joint order, MANUAL target bounds, camera keys, and the configured PEAR schema
get_observation(cameras=[], state_format="joint") Measured joints and optional JPEGs. A calibrated PEAR robot also supports state_format="pear"
move(actions=[qpos]) Publish 1–32 full absolute joint and gripper targets in EVA actuator order
move(pear_delta=...) Apply a native PEAR end-effector and gripper delta using the active robot calibration
stop() Cancel further MCP publishing and leave the last published setpoint in place

Motion requires idle MANUAL mode, fresh joint feedback, and teleoperation disabled. The MANUAL publisher interpolates validated targets in joint space. status="published" reports publishing completion and the reply includes measured joint feedback. Verify clearance before sending a trajectory.

Run a PEAR-trained checkpoint

The native pear harness sends measured robot state and JPEGs to the model. It reads the PEAR action JSON, executes the delta through the active robot’s kinematics and MCP, and observes the next state. It supports both single_arm_pose and bimanual_pose.

On a supported Linux GPU host, the RTX 5090 example downloads the released NVFP4 weights and matching DFlash2 draft and starts vLLM. Use GPU=gb300 or GPU=rtxpro6000 for those GPUs. Allow about 25 GB for both downloads plus space for the environment and caches. Official deployment recipe

git clone https://github.com/mit-han-lab/pear.git
cd pear
export WORK_DIR="$PWD/work"
export MODEL="$WORK_DIR/models/pear-fast-nvfp4"
export DRAFT="$WORK_DIR/models/pear-dflash2"
export RUN="$WORK_DIR/runs/server"
export GPU=rtx5090
uvx --from huggingface-hub hf download mit-han-lab/Qwen3.8-27B-PEAR-Fast-NVFP4 --local-dir "$MODEL"
uvx --from huggingface-hub hf download mit-han-lab/Qwen3.8-27B-PEAR-DFlash2 --local-dir "$DRAFT"
bash scripts/install.sh server
bash examples/models/qwen3_8_27b_pear/deploy/run_server.sh

In another terminal on the GPU host, query the served model ID. From a separate EVA host, replace 127.0.0.1 with the GPU host’s address.

curl -fsS http://127.0.0.1:8000/v1/models

For your own training run, set the original training WORK_DIR in the PEAR training environment and export the checkpoint. Point MODEL at the export and select a GPU preset and draft compatible with its precision and base model. Training and export

bash scripts/export_checkpoint.sh /path/to/ckpt/global_step_100 /path/to/exported-model
  1. Set agent_mcp.allow_motion=True and calibrate agent_mcp.pear for your robot. Enable at least one mapped camera. An unauthenticated local vLLM endpoint accepts a placeholder such as local.

    agent = dict(
        harness=dict(
            type="pear",
            model="qwen3_8_27b", api_key="local",
            base_url="http://127.0.0.1:8000/v1", max_steps=8, max_tokens=4096,
        ),
    )
    
  2. Start EVA, enter MANUAL mode, and submit the task:

    .venv/bin/eva agent --config configs/01_deploy/dual_yam/agent.local.py \
      "Move the left gripper a short distance upwards."
    

Translation deltas are in centimeters and angles in radians. The bimanual format uses fixed-axis XYZ angles. The single-arm format changes pitch and roll while holding yaw. A positive, negative, or zero gripper width delta opens, closes, or holds respectively. The loop ends on an all-zero action, at the configured move limit, or on a request or action error.

Calibrate a different robot

Point _base_ at the robot’s deploy preset and replace agent_mcp.pear. The following UR5e example shows the single-arm fields. Measure the frame and gripper parameters for your station.

agent_mcp = dict(
    enabled=True,
    allow_motion=True,
    pear=dict(
        robot="ur5e",
        format="single_arm_pose",
        arms=dict(arm=dict(group="arm", gripper_width=[0.0, 9.5])),
        cameras=dict(wrist="cam_wrist"),
        environment="The wrist camera moves with the gripper.",
    ),
)
  • robot must match the active EVA robot. The device needs EVA forward and inverse kinematics, and each mapped arm group must be enabled.
  • arms maps PEAR’s arm in single-arm mode or left_arm and right_arm in bimanual mode to EVA actuator groups. get_info reports group and camera keys.
  • base_xyz_m and base_wxyz transform the EVA FK reference frame into the model’s station frame. tool_xyz_m and tool_wxyz transform the EVA end effector into the model’s tool frame. Both transforms default to identity. Use wxyz quaternions. The dual YAM example uses base offsets of ±0.25 m. In single-arm mode, the tool frame’s +Z axis is its pointing direction.
  • gripper_width sets the [closed, open] values seen by the model. cameras maps labels in the model prompt to enabled EVA camera keys.

Source · 6a8c71e