
Write HTML. Render video. Built for agents.
py-xiaozhi is a cross-platform assistant stack built around async Python, with voice streaming, vision-language features, MCP tools, and hardware control. It includes a GUI, CLI, and GPIO modes, plus plugin support for extending audio, protocol, and tool behavior.
Builders who want one codebase for a voice assistant that can call tools and control devices.
You can build a cross-platform agent that hears, sees, calls tools, and talks to hardware without stitching the pieces together yourself.
Uses Opus audio, async streaming, and wake-word support for live voice conversations.
Provides a modular MCP server and tool modules for music, camera, screenshots, app control, weather, and volume.
Combines camera capture with vision-language model support for image understanding and scene perception.
Runs on Windows, macOS, Linux, Raspberry Pi, Jetson Nano, and other ARM edge boards.
Offers GUI, CLI, and GPIO modes so the same project can fit desktop, headless, or embedded setups.
Loads audio, UI, MCP, wake-word, and shortcut features through an event-driven plugin system.
Includes GPIO and device-control paths for sensors, actuators, and embodied AI use cases.
Supports encrypted WebSocket and MQTT communication with auto-reconnect behavior.
English | 简体中文
Thanks to GitDo.net for sponsoring this project! GitDo.net is an AI API aggregation platform — one API Key for Claude, Gemini, GPT and other major models. Direct connection, no proxy needed, stable and efficient. An ideal choice for enterprise-grade AI programming. Visit GitDo.net
| Token能量站 | Thanks to Token能量站 (Factory.pub) for sponsoring this project! Providing API relay for GPT, Grok, Claude and other major models — stable, reliable, and affordable. Register here |
| 良心AI | Thanks to 良心AI for sponsoring this project! Providing API relay for GPT, Claude, Gemini and other major models — direct connection, stable and high-speed. Register here |
py-xiaozhi is a lightweight, cross-platform multi-modal AI interaction framework built on Python's async architecture. It supports real-time voice streaming, vision-language tasks, and IoT device control. Deployable across Windows, macOS, Linux desktops, and ARM embedded platforms (Raspberry Pi, Horizon Robotics RDK, Jetson Nano), it bridges the gap between Large Language Models and physical hardware — out of the box.
Evolved from the xiaozhi-esp32 firmware project. Officially adopted by D-Robotics (xiaozhi-in-rdk) as an upstream dependency.

Zero to Xiaozhi Client (Video Tutorial)
py-xiaozhi/
├── main.py # Application entry point
├── src/
│ ├── activation/ # Device activation
│ ├── audio_codecs/ # Audio codecs
│ ├── audio_processing/ # Wake word detection
│ ├── bootstrap/ # Application bootstrap & dependency injection
│ ├── constants/ # Constants
│ ├── core/ # Core infrastructure (event bus, state management, task management, etc.)
│ ├── logging/ # Logging subsystem
│ ├── mcp/ # MCP tool system
│ │ ├── mcp_server.py # MCP server
│ │ └── tools/ # Tool modules (music/camera/screenshot/app/weather/volume)
│ ├── plugins/ # Plugin system (audio, UI, MCP, wake word, shortcuts)
│ ├── protocols/ # Communication protocols (WebSocket/MQTT)
│ ├── ui/ # User interface
│ │ ├── gui/ # PySide6 + QML graphical interface
│ │ ├── cli/ # Command line interface
│ │ └── gpio/ # GPIO embedded interface
│ └── utils/ # Utility functions
├── libs/ # Third-party native libraries
│ ├── libopus/ # Opus audio codec library
│ └── webrtc_apm/ # WebRTC audio processing module
├── models/ # Wake word models
├── assets/ # Static resources
├── scripts/ # Auxiliary scripts
├── documents/ # VitePress documentation site
├── pyproject.toml # Project configuration
└── build.json # Build configuration
# Clone project
git clone https://github.com/huangjunsen0406/py-xiaozhi.git
cd py-xiaozhi
# Base install (CLI / GPIO mode)
uv sync # Recommended (uv users)
# or: pip install -e . # pip users
# GUI mode (extra: PySide6 + qasync)
uv sync --extra gui # Recommended (uv users)
# or: pip install -e '.[gui]' # pip users
# Full development environment (GUI + test / packaging tools)
uv sync --extra gui --group dev
# Code formatting
./format_code.sh
# Run program - GUI mode (default; requires gui extra)
python main.py
# Run program - CLI mode (base install is enough)
python main.py --mode cli
# Specify communication protocol
python main.py --protocol websocket # WebSocket (default)
python main.py --protocol mqtt # MQTT protocol
async/await syntax, avoid blocking operationsConfigManager for unified configuration accesssrc/mcp/tools/ directoryProtocol abstract base classsrc/plugins/ +----------------+
| |
v |
+------+ Wake/Button +------------+ | +------------+
| IDLE | -----------> | CONNECTING | --+-> | LISTENING |
+------+ +------------+ +------------+
^ |
| | Voice Recognition Complete
| +------------+ v
+--------- | SPEAKING | <-----------------+
Playback +------------+
Complete
bug, feature, docs, refactor, or maintenanceIn no particular order
Xiaoxia zhh827 SmartArduino-Li Honggang HonestQiao vonweller Sun Weigong isamu2025 Rain120 kejily Radio bilibili Jun Cyber Intelligence
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents — swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!