opensi·si

Reachy Mini has an app ecosystem powered by Hugging Face Spaces. You can build Python apps, publish them, and any Reachy Mini owner can install a community app in one click…

Building & Publishing Apps

Reachy Mini has an app ecosystem powered by Hugging Face Spaces. You can build Python apps, publish them, and any Reachy Mini owner can install a community app in one click using Reachy Mini Control.

For a step-by-step tutorial with screenshots, see the blog post: Make and Publish Your Reachy Mini Apps.


Using AI Agents

If you use an AI coding agent (Claude Code, Cursor, Copilot, etc.), it can build apps for you. Point it to the project's AGENTS.md:

*I'd like to create a Reachy Mini app. Start by reading

The repository includes a skills/ directory with detailed guides that AI agents use to build apps correctly:

Skill What it covers
create-app.md App creation workflow and templates
ai-integration.md Building LLM-powered apps
control-loops.md Real-time reactive apps (tracking, games)
motion-philosophy.md Choosing between goto_target and set_target
interaction-patterns.md Antennas as buttons, head as controller
symbolic-motion.md Defining motion mathematically (dances, rhythms)

How Apps Work

The Reachy Mini daemon manages your app's entire lifecycle:

  1. You send a "start app" request (from Reachy Mini Control or the REST API).
  2. The daemon launches your app as a Python subprocess (python -u -m your_app.main).
  3. Your app receives a connected ReachyMini instance and a stop_event.
  4. When stopped, the daemon sends SIGINT to your process, which triggers graceful shutdown.
  5. After the app exits, the daemon returns the robot to its default position.

Key constraints:

  • Only one app can run at a time.
  • Your app runs inside the daemon's subprocess — it does not manage its own hardware connections.
  • On the Wireless robot, your app runs in a shared virtual environment at /venvs/apps_venv/.

Creating an App

Always use the CLI tool to create apps — it generates the correct structure, metadata, and entry points:

# Install reachy-mini if not already done
uv pip install reachy-mini

# Create and publish in one step (recommended)
reachy-mini-app-assistant create my_app_name /path/to/destination --publish

# Or create locally first
reachy-mini-app-assistant create my_app_name /path/to/destination

Never create app folders manually. The assistant handles boilerplate, Hugging Face tags, entry points, and the correct package structure. Manual creation leads to subtle issues that are hard to debug.

Choose a Template

Template Command Use when
Default reachy-mini-app-assistant create my_app . Most apps. Minimal working structure.
Conversation reachy-mini-app-assistant create --template conversation my_app . LLM integration, speech, making the robot talk. Includes audio pipeline, LLM tools, movement fusion and all the plumbing.

Generated Structure

my_app/
├── index.html              # Hugging Face Space landing page
├── style.css               # Landing page styles
├── pyproject.toml          # Package config with entry points
├── README.md               # Must contain reachy_mini_python_app tag
└── my_app/
    ├── __init__.py
    ├── main.py             # Your app logic
    └── static/             # Optional web UI
        ├── index.html
        ├── style.css
        └── main.js

The ReachyMiniApp Contract

Your app is a class that extends ReachyMiniApp and implements a run() method. Here's the minimal structure:

import threading
import time

import numpy as np

from reachy_mini import ReachyMini, ReachyMiniApp
from reachy_mini.utils import create_head_pose

class MyApp(ReachyMiniApp):
    def run(self, reachy_mini: ReachyMini, stop_event: threading.Event):
        t0 = time.time()

        while not stop_event.is_set():
            t = time.time() - t0

            # Move the head
            yaw = 30.0 * np.sin(2.0 * np.pi * 0.2 * t)
            head_pose = create_head_pose(yaw=yaw, degrees=True)

            # Move the antennas
            a = np.deg2rad(25.0 * np.sin(2.0 * np.pi * 0.5 * t))
            antennas = np.array([a, -a])

            reachy_mini.set_target(head=head_pose, antennas=antennas)
            time.sleep(0.02)

if __name__ == "__main__":
    app = MyApp()
    try:
        app.wrapped_run()
    except KeyboardInterrupt:
        app.stop()

Key points

  • run(reachy_mini, stop_event): The only method you must implement. The ReachyMini instance is already connected and ready. Poll stop_event in your main loop to exit gracefully.
  • wrapped_run(): Called from the __main__ block. It handles connecting to the robot, starting optional services, and calling your run() method.
  • stop(): Sets the stop_event. The daemon calls this via SIGINT when stopping your app.
  • __main__ block: Required. The daemon runs your app as a module (python -m my_app.main), so this block is the actual entry point.

The pyproject.toml Entry Point

The daemon discovers your app through a standard Python entry point. The assistant generates this for you:

[project.entry-points."reachy_mini_apps"]
my_app = "my_app.main:MyApp"

The group name is reachy_mini_apps (with underscores). The value points to your class (module.main:ClassName).

Any additional dependency for your project should be added in this file.


Optional: Web UI for Your App

If you want a settings page or any web interface for your app, set custom_app_url on your class:

class MyApp(ReachyMiniApp):
    custom_app_url: str | None = "http://0.0.0.0:8042"

    def run(self, reachy_mini: ReachyMini, stop_event: threading.Event):
        # Define FastAPI routes on self.settings_app
        @self.settings_app.post("/my_endpoint")
        def my_endpoint():
            return {"status": "ok"}

        # Your main loop...

When custom_app_url is set, the app automatically starts a FastAPI web server that serves files from the static/ directory inside your package. Reachy Mini Control opens this UI as soon as the server answers. The page can be accessed from with a lite or with a wireless.

Routes defined in run() only exist once run() starts: wrapped_run() starts the web server first, then connects to the robot, then calls run(). The page itself is served, and opened by Reachy Mini Control, from the start. If your page calls its routes as soon as it loads, retry until they respond: the conversation app does this with untilReady.

Set custom_app_url = None if your app doesn't need a web UI.

For a working example with a toggle and sound playback, see the template app.


Testing Your App

1. Validate structure

reachy-mini-app-assistant check /path/to/my_app

This checks that your app has the correct structure, entry points, and metadata.

2. Run directly

You can run your app's main.py directly for quick iteration (make sure the daemon is running):

python -m my_app.main

3. Run it through the daemon

Install your app locally and start it the way the daemon does for users (as a subprocess, stopped with SIGINT):

# Install in development mode
uv pip install -e /path/to/my_app

# Start, then stop it (<HOST> as in "Via the REST API" below)
curl -X POST http://<HOST>/api/apps/start-app/my_app
curl -X POST http://<HOST>/api/apps/stop-current-app

4. Make an app start on wake-up or antenna touch

Use the daemon's existing --startup-app option when you want one installed app to be the default experience:

reachy-mini-daemon --startup-app reachy_mini_conversation_app

If the app is not installed yet but exists in the app catalog, the daemon installs it before the robot wakes up. The app starts after wake-up. On an idle robot that is already running the daemon while asleep, touching an antenna also wakes the robot and starts the same startup app.

For example, the Wireless flow keeps the daemon running without waking the robot immediately:

reachy-mini-daemon --wireless-version --no-wake-up-on-start --startup-app reachy_mini_conversation_app

No extra antenna-specific flag is needed: setting --startup-app <app_name> is the opt-in. The app only starts when the managed app slot is free, so it does not replace a running local app or an active remote session.


Publishing to Hugging Face

1. Log in to Hugging Face

uv pip install --upgrade huggingface_hub
hf auth login

Use a token with Write permissions.

2. Publish

If you used --publish when creating the app, it's already a Hugging Face Space with a Git remote. Just push:

git add . && git commit -m "my changes" && git push

If you created without --publish, you can publish later:

reachy-mini-app-assistant publish /path/to/my_app

3. Discoverability

For your app to appear in the Reachy Mini app store, its README.md must contain the reachy_mini_python_app tag in the YAML frontmatter:

---
tags:
  - reachy_mini_python_app
---

The assistant adds this automatically. If you create the README manually, don't forget it.