DeskBot
A modular desktop companion robot powered by Raspberry Pi.
DeskBot is an asynchronous, event-driven Python application that brings a small robot to life on your desk. It combines an animated face on a circular TFT display, expressive servo-driven body language, camera-based perception, speech recognition and synthesis, and a conversational AI stack - all connected through an internal event bus.

Quick start
# Clone the repository
git clone https://github.com/well-it-wasnt-me/RON.git
cd RON
# Create a virtual environment (Python 3.12+)
python -m venv .venv
source .venv/bin/activate
# Install with development dependencies
pip install -e ".[dev]"
# Run in simulation mode (no hardware needed)
deskbot-simulate
See the Developer Setup guide for full instructions, including hardware wiring and deployment.
What's inside?
| Subsystem | Description |
|---|---|
| Face engine | Animated eyes, mouth, and expressions on a GC9A01 round display |
| Body language | Servo choreography for head pan/tilt and arm gestures |
| Behavior engine | State machine (idle → curious → listening → thinking → speaking) |
| Perception | YuNet face detection via USB camera |
| Speech | Whisper STT, Piper/eSpeak/OpenAI/ElevenLabs TTS, wake-word detection |
| Conversation | Ollama or OpenAI LLM with streaming, tools, and persistence |
| Learning | On-device neural network: experience recording, world model, action learning (Q-policy), preference learning |
| Preferences | Learns user name, volume, pace, formality, humour, and more |
| REST API | FastAPI server with WebSocket event streaming |
| Teaching | Human-in-the-loop teaching mode - demonstrate gestures, give spoken feedback, learn on device |
| MQTT bridge | Publishes events and receives commands over MQTT |
| Telegram bridge | Chat with the robot from Telegram |
| Home Assistant | MQTT Auto Discovery for native HA integration |
| Plugin system | Extend DeskBot via Python entry points |
| Lifecycle | Graceful degradation — robot never crashes on hardware failure |
Architecture
DeskBot uses a central event bus to decouple subsystems. Components publish immutable dataclass events and subscribe to the event types they care about. Hardware is abstracted behind protocol interfaces so the same application code runs on a Pi or in simulation.
Read the full Architecture Overview.
Documentation
- Getting Started: Developer Setup · Wiring Guide · Deployment · Contributing
- Architecture: Overview · Learning · Production Learning · Audio · Lifecycle
- Expression: Face · Animations · Eye Engine · Body Language · Animation
- Behavior: Behavior Engine · Behavior Library · Perception
- Conversation & AI: Conversation · Speech · Tools · Preferences · Vector Memory
- Learning: Local Brain · Teaching Mode
- Infrastructure: Events · Interfaces · Lifecycle · Services · Simulation · Performance
- Hardware: Servos
- Integration: Plugins · MQTT Bridge · Home Assistant · Telegram Bridge
- CLI: Overview · Interactive CLI
- Reference: Config · REST API · Errors · Events · Hardware · Performance
Contributing
We welcome contributions! See Contributing for guidelines.
License
DeskBot is released under the MIT License.