Skip to main content

Safari SDK: the SDK for Google DeepMind Gemini Robotics models

Project description

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).

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/logging.

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

Libraries and binary related to accessing model checkpoints, upload data and request of model finetune can be found in safari/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/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/agent/framework/agents/): Base agent classes that integrate with the Gemini Live API to provide conversational interaction and tool use capabilities.

Embodiments (safari/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/agent/framework/tools/): Modular capabilities that agents can use, including:

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

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

Configuration (safari/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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safari_sdk-2.103.0.tar.gz (500.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

safari_sdk-2.103.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

safari_sdk-2.103.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

safari_sdk-2.103.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file safari_sdk-2.103.0.tar.gz.

File metadata

  • Download URL: safari_sdk-2.103.0.tar.gz
  • Upload date:
  • Size: 500.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for safari_sdk-2.103.0.tar.gz
Algorithm Hash digest
SHA256 0f1557131be3c0a1ceb98cd519bfbd495490e5252ac81e1110fff43d10378b59
MD5 16e3399b18539c79331f5d407588a397
BLAKE2b-256 4506c6b70e78a2991253a2abe392b1e5271b8281027ce0a221f591923a228f5e

See more details on using hashes here.

File details

Details for the file safari_sdk-2.103.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for safari_sdk-2.103.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 551482a7be20651a6cd9897e5a129e0bb7fe7521c77e4eb4900eb47c4746a232
MD5 0d52128cc54ec6218bafee5ffe74c196
BLAKE2b-256 97ef68516ccff32c2475ed6a07d8c2af868fc7b4b93be6b6db949d74b868ebb9

See more details on using hashes here.

File details

Details for the file safari_sdk-2.103.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for safari_sdk-2.103.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 becb09ad4948c122e36c8077802e46a27055216d68a43625b1c9ce0ce9dc3526
MD5 a9ae1ae1ed5e9e9da4a55d944b55a8bc
BLAKE2b-256 819dee478108d9230b28959b1c108cfc1f6261b2144aa17fa062fbb6aa18a2ea

See more details on using hashes here.

File details

Details for the file safari_sdk-2.103.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for safari_sdk-2.103.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b6a14e8ff764f8f7bd960693ebd2972211777f6bce61dfb9caaabc227019309
MD5 ed8ef0fa8c022b5f76d0c5506ebb820e
BLAKE2b-256 3c04b59be38d808286bfe24a279341ab2e678345ec26fc0e198fd8a3796a3680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page