Skill to bring your own OpenAI, Gemini, or local AI models to the Rabbit R1 via LiveKit
Overview
Use GPT-5.2, Claude, Gemini, Qwen3.5, or any other model as a real-time voice assistant on the R1 powered by LiveKit. By default, uses GPT-4.1-mini / Cartesia for voice. Pair it with local-voice-ai to run everything locally on your own hardware w/ no cloud providers needed. SKILL.md is a structured prompt that any AI coding assistant can follow to build a full R1 voice agent project from scratch. It works with -- just feed it the prompt and let it build. - A (scaffolded via lk app create) that runs STT -> LLM -> TTS - A (web-server.py) that serves the R1 frontend and provides a LiveKit token endpoint - An (creation/index.html) -- the 240x282px voice UI that runs on the device - An (creation/install.html) with a QR code for sideloading onto the R1 This installs SKILL.md so your AI coding assistant can use it automatically. Works with , and other tools that support the skills format.
README
Rabbit R1 LiveKit Voice Agent
Talk to any AI model from your Rabbit R1. Use GPT-5.2, Claude, Gemini, Qwen3.5, or any other model as a real-time voice assistant on the R1 powered by LiveKit. By default, uses GPT-4.1-mini / Cartesia for voice.
Pair it with local-voice-ai to run everything locally on your own hardware w/ no cloud providers needed.
What This Is
SKILL.md is a structured prompt that any AI coding assistant can follow to build a full R1 voice agent project from scratch. It works with Claude Code, Cursor, Windsurf, Copilot, Aider, or any LLM-powered coding tool – just feed it the prompt and let it build.
The resulting project includes:
- A Python voice agent (scaffolded via
lk app create) that runs STT -> LLM -> TTS - A web server (
web-server.py) that serves the R1 frontend and provides a LiveKit token endpoint - An R1 “creation” (
creation/index.html) – the 240x282px voice UI that runs on the device - An install page (
creation/install.html) with a QR code for sideloading onto the R1
How to Use
Install the Skill
npx skills add ShayneP/rabbit-r1-livekit-skill
This installs SKILL.md so your AI coding assistant can use it automatically. Works with Claude Code, Cursor, Windsurf, Copilot, Aider, and other tools that support the skills format.
Once installed, just tell your assistant what you want:
“Build me a voice assistant for my Rabbit R1 that answers trivia questions.”
In Claude Code, you can also invoke it directly:
/rabbit-r1-livekit
Manual Usage (Without Installing)
If you prefer not to install, copy the contents of SKILL.md into your assistant’s context (paste it into chat, add it as a reference file, etc.) and describe what you want.
What the Prompt Guides Your Assistant Through
- Install the LiveKit CLI (
lk) if needed - Scaffold the agent with
lk app create --template agent-starter-python agent - Set up LiveKit Cloud credentials via
lk cloud auth - Create the web server and R1 frontend files
- Start all services and open an HTTPS tunnel
- Provide an install link for the R1
Architecture
R1 WebView
--> web-server.py (port 8081, HTTPS via tunnelmole)
--> LiveKit Cloud (WebRTC SFU + Agent Dispatch)
--> Python Agent (STT -> LLM -> TTS)
Flow:
- User taps the R1 screen (required for mic access)
- Frontend fetches a LiveKit token from
/getToken - Token includes a
RoomConfigurationthat tells LiveKit which agent to dispatch - Frontend connects to a LiveKit room via WebRTC and publishes mic audio
- LiveKit Cloud dispatches the named agent into the room
- Agent processes audio through STT -> LLM -> TTS and publishes audio back
- R1 plays the response through its speaker
Project Structure (After Running)
project-root/
web-server.py # Static file server + /getToken token API
creation/
index.html # Voice agent UI for R1 (240x282px)
install.html # QR code page for R1 installation
agent/ # Scaffolded LiveKit agent
src/agent.py # Agent entry point
pyproject.toml # Dependencies (managed by uv)
Dockerfile # Production deployment
tests/ # Eval framework
Prerequisites
- Python 3.11+ with
uv - Node.js/npm (for tunnelmole)
- A LiveKit Cloud account (free tier available)
- A Rabbit R1 device (or a browser for testing)
Running Manually
If the project is already built and you want to run it yourself:
# 1. Install web server dependency
pip install livekit-api
# 2. Install agent dependencies
cd agent && uv sync && cd ..
# 3. Start the web server (terminal 1)
python web-server.py
# 4. Start HTTPS tunnel (terminal 2)
# Install first if needed: npm install -g tunnelmole
tmole 8081
# 5. Start the agent (terminal 3)
cd agent && uv run python src/agent.py dev
# 6. Install on R1
# Open https://YOUR_TMOLE_URL/creation/install.html in a browser
# Scan the QR code with your R1
Customization
| What | Where | Notes |
|---|---|---|
| Agent personality/instructions | agent/src/agent.py |
The instructions parameter |
| Agent name | agent/src/agent.py + creation/index.html |
Must match in both files |
| LLM model | agent/src/agent.py |
e.g. openai/gpt-4o, anthropic/claude-sonnet-4-20250514 |
| TTS voice | agent/src/agent.py |
Voice ID in inference.TTS(voice=...) |
| UI branding/colors | creation/index.html |
#brand div and #FE5000 accent color |
| Tools (function calling) | agent/src/agent.py |
Add tools to the Agent class |
R1 WebView Constraints
Key limitations to be aware of if modifying the frontend:
- HTTPS required – mic access (
getUserMedia) is undefined over HTTP. Use tunnelmole or similar. - No WebGL – the Flutter-based WebView only supports Canvas 2D.
- Screen size – 240x282 pixels exactly.
- Touch quirks – use
document.bodytouchstart withe.preventDefault(). Inlineonclickin dynamic HTML won’t fire. - Mic publishing – use manual
publishTrack()instead ofsetMicrophoneEnabled()for reliability.
R1 Native Bridges
The R1 WebView exposes these JavaScript globals:
PluginMessageHandler.postMessage()– send messages to R1 systemFlutterButtonHandler.postMessage()– button eventsCreationStorageHandler.postMessage()– persistent storagecloseWebView– close the creation
Custom events on window: sideClick, longPressStart, longPressEnd, scrollUp, scrollDown
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add shaynep/rabbit-r1-livekit-skill