Skip to main content

Safari SDK: the SDK for Google DeepMind Gemini Robotics models 🦓🦄🐘🐒🐍

Disclaimer

This is not an officially supported Google product.

Safari SDK provides full lifecycle toolings necessary for using Gemini Robotics models, including but not limited to, access checkpoint, serving a model, evaluate the model on robot and in sim, upload data, finetuning the model, download the finetuned checkpoint, etc. Most of the functionality requires you to join Gemini Robotics Trusted Tester Program to use. See details in Gemini Robotics main page.

Source Code

The source code can be found in GitHub.

Note: Unless stated otherwise, the commands below assume that your working directory is the root of your repository clone (ie, the same directory which contains the pyproject.toml file).

Code Structure

The safari-sdk is structured and distributed as a single Python pip package. It contains both the Python source code and compiled C++ logging extensions.

Installing the SDK

Installing Pip Dependencies

The pyproject.toml file specifies the dependencies for the Safari SDK, including allowed version ranges for some packages. The requirements.txt file specifies exact versions and hashes of each of those dependencies; internal unit tests use these versions, and installing them in a virtual environment before installing the SDK is recommended to avoid failures due to upstream package changes:

pip install -r requirements.txt

Updating Pip Dependencies

A script is provided which updates the requirements.txt file to the most recent versions of dependencies which satisfy the constraints in the pyproject.toml file. This allows those updates to be done at discrete times (rather than whenever those updates are pushed to PyPi) and tested in isolation before being pushed to all users. To run that script:

scripts/update_pip_dependencies.sh

Installing from PyPi

The Safari SDK can be easily installed via PyPI.

pip install safari-sdk

Installing from Source Code

The Safari SDK can also be installed from the source code.

pip install -e .[dev]

Building the Wheel

To build a Python wheel, run the following command from the root of the repository.

scripts/build_wheel.sh

This script will build a pip installable wheel for the Safari SDK, and print the file's path to stdout.

Model support

Safari SDK aims to support all models in the Gemini Robotics model series.

Trusted Testers can access the Gemini Robotics On Device model from SDK v2.4.1.

Libraries

Libraries related to robot data logging is in safari_sdk/logging.

Libraries related to model inference and interface with model servers are in safari_sdk/model.

Libraries and binary related to accessing model checkpoints, upload data and request of model finetune can be found in safari_sdk/flywheel.

Examples, including robot and simulation evaluation of models are in examples/. Aloha specific eval code are in examples/aloha.

Flywheel CLI

The flywheel CLI is a convenient CLI tool available after installation of the pip package. It provides a set of commands to interact with the Gemini Robotics platform, such as training models, serving models, managing data, and downloading artifacts.

To use the CLI

flywheel-cli <command> [--flags] [--flags]

Supported commands are:

  • train: Train a model. Requires specifying task ID, start date, and end date.
  • serve: Serve a model. Requires specifying the training job ID.
  • list: List available training jobs.
  • list_serve: List available serving jobs.
  • data_stats: Show data statistics available for training.
  • download: Download artifacts from a training job or a specific artifact ID.
  • upload_data: Upload data to the data ingestion service.
  • version: Show the version of the SDK.
  • help: Show this help message with all the available commands and flags.

Agent

The Safari SDK includes a comprehensive agent framework for building interactive robotics agents powered by Gemini models. See YouTube Video: Gemini Robotics 1.5: Using agentic capabilities. The framework is located in safari_sdk/agent/framework and provides a modular architecture for creating agents that can perceive their environment, reason about tasks, and control robot hardware.

Key Components

Agents (safari_sdk/agent/framework/agents/): Base agent classes that integrate with the Gemini Live API to provide conversational interaction and tool use capabilities.

Embodiments (safari_sdk/agent/framework/embodiments/): Hardware-specific interfaces that connect agents to physical robot systems (e.g., Aloha robot). Each embodiment provides tools for robot control.

Tools (safari_sdk/agent/framework/tools/): Modular capabilities that agents can use, including:

  • Run instruction
  • Success detection
  • Scene description
  • etc.

Event Bus (safari_sdk/agent/framework/event_bus/): Asynchronous publish-subscribe system for communication between agent components.

Configuration (safari_sdk/agent/framework/config.py): Centralized configuration management using AgentFrameworkConfig, supporting both programmatic configuration and flag-based setup.

Aloha Agent Example

The examples/aloha/agent/ directory contains agent implementations for the Aloha robot platform.

The primary example is simple_agent.py, which provides a conversational agent that can control the Aloha robot using natural language instructions.

To run the Aloha agent, use the provided run.py script:

python examples/aloha/agent/run.py --agent_name=simple_agent

The Aloha agent demonstrates integration of vision-based robot control, multi-camera perception, and conversational interaction with Gemini models.

Alternatively, you build your own agent using the agent framework.

The codebase is still in active development. We will update our most updated user guide with Trusted Testers of Gemini Robotics.

Release files for safari-sdk 2.152.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for safari-sdk 2.152.0
File Size Uploaded
safari_sdk-2.152.0.tar.gz 514.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for safari-sdk 2.152.0
File Interpreter ABI Platform
safari_sdk-2.152.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
safari_sdk-2.152.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
safari_sdk-2.152.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 175.4 MB

Release files / safari_sdk-2.152.0.tar.gz

Download URL safari_sdk-2.152.0.tar.gz
Size 514.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe321cbf9398cda9ce954e6fab3b9a946c8ba265bf7dbaafbac6d3bec0ccbf47
BLAKE2b-256 checksum
How to use checksums
32726d168fbaf6c5882f1da9ffa4f799fabf897b8382ea749677512141b3d8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release files / safari_sdk-2.152.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL safari_sdk-2.152.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 58.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
485a22d89fe6754cb6d52351bd8f2faf20a6cb32f95c1d9ade999056c7c970d8
BLAKE2b-256 checksum
How to use checksums
d883f63dfda5e62ed50a7ed06cf9303efc2c29689a53cdcc8149cf33e668f204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release files / safari_sdk-2.152.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL safari_sdk-2.152.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 58.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d1ef6ee741ec26a509584669da4b54e635f78205b4c345f7233435c22f5e1aec
BLAKE2b-256 checksum
How to use checksums
c65e415e9fbc0a5d741dfc07d997b61266ae45865f6699c32dab60378a7107c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release files / safari_sdk-2.152.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL safari_sdk-2.152.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 58.3 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e5a7f11d9a8b76d30e3af2a6933e81a2a8ba3eccd4afac7d22f1199633e028c4
BLAKE2b-256 checksum
How to use checksums
ef6a835bd845780d852bb7eec76955a892dc394aa05e7a5bd0e2a2b83be13eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

2.152.0 This release

4 release files

2.97.0

4 release files

2.96.0

4 release files

2.95.0

1 release file

2.86.0

1 release file

2.85.0

1 release file

2.79.0

1 release file

2.78.0

1 release file

2.77.0

1 release file

2.74.0

1 release file

2.59.0

1 release file

2.56.0

1 release file

2.51.0

1 release file

2.46.0

1 release file

2.35.0

1 release file

2.34.0

1 release file

2.29.0

1 release file

2.22.0

1 release file

2.21.0

1 release file

2.20.0

1 release file

2.19.0

1 release file

2.18.0

1 release file

2.13.0

1 release file

2.12.0

1 release file

2.11.0

1 release file

2.10.0

1 release file

2.5.0

1 release file

2.4.1

1 release file

2.4.0

1 release file

2.3.0

1 release file

0.0.0a2

1 release file

0.0.0a1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page