Client-side SDK for working with R2 Sidekicks.
For more details on how to download and run, see our Notion page.
To install a specific version without cloning, download the wheel and constraints from GitHub Releases using the GitHub CLI:
VERSION=0.1.0
TAG=r2-labs-v${VERSION}
gh release download ${TAG} --repo Reimagine-Robotics/r2_labs --pattern "*.whl" --pattern "constraints.txt"
pip install "r2_labs-${VERSION}-py3-none-any.whl" -c constraints.txtOr without pinned dependencies:
gh release download r2-labs-v0.1.0 --repo Reimagine-Robotics/r2_labs --pattern "*.whl"
pip install r2_labs-0.1.0-py3-none-any.whlThis package uses uv for dependency management.
curl -LsSf https://astral.sh/uv/install.sh | shgit clone https://github.com/Reimagine-Robotics/r2_labs.git
cd r2_labs
uv syncuv run python -c "import r2_labs; print('ok')"To use r2_labs in Jupyter notebooks, register a kernel that runs from the uv environment.
Create a directory for the kernel:
mkdir -p ~/Library/Jupyter/kernels/r2-labs # macOS
mkdir -p ~/.local/share/jupyter/kernels/r2-labs # LinuxCreate kernel.json in that directory with the following content, replacing /path/to/r2_labs with the absolute path to your cloned repository:
{
"argv": [
"uv",
"run",
"--project",
"/path/to/r2_labs",
"python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "R2 Labs",
"language": "python",
"env": {
"LOGURU_LEVEL": "WARNING"
}
}The "R2 Labs" kernel will now appear in Jupyter, JupyterLab, and VS Code notebook kernel pickers.
The SDK includes an MCP server that exposes robot tools to AI agents. Install with the mcp extra:
uv sync --extra mcpIf you have the Reimagine Robotics VS Code extension installed, enable the MCP server in settings:
- Open Settings (
Cmd+,/Ctrl+,) - Search for "reimagine robotics mcp"
- Enable Reimagine Robotics: MCP Server: Enabled
The MCP server will start automatically when you connect to a robot and is available in Copilot agent mode.
Register the MCP server manually so Claude Code can discover and start it:
claude mcp add r2-robot -e R2_SERVER_HOST=your-robot-hostname -- uv --directory /path/to/r2_labs run --extra mcp r2-mcpTo enable UI navigation tools (opening pages, pre-filling wizards) when running inside VS Code with the Reimagine Robotics extension, pass the IDE bridge port:
claude mcp add r2-robot -e R2_SERVER_HOST=your-robot-hostname -e R2_IDE_BRIDGE_PORT=8001 -- uv --directory /path/to/r2_labs run --extra mcp r2-mcpNote: Avoid running the VS Code MCP server and Claude Code against the same robot simultaneously — concurrent behaviour commands can conflict. Disable the VS Code MCP setting when using Claude Code.