ESP-Brookesia Introduction
ESP Brookesia Framework
ESP-Brookesia is an intelligent interaction and expression driving framework designed for the ESP32 series SoC, used to build embedded applications with service management, intelligent agents, and expression/emotion expression capabilities.
This framework emphasizes modularity, extensibility, and unified interface design, suitable for running on resource-constrained devices that require a rich interactive experience (such as electronic badges, emotional robots, smart terminals, etc.).
The framework deeply integrates AI large model technology, endowing intelligent screen display applications with voice recognition, natural language dialogue, anthropomorphic feedback capabilities, and is built on top of ESP-IDF and LVGL, supporting UI development from small round screens to complex large screens. It consists of core modules such as Service, Agent, Expression, and provides complete examples for quick integration and secondary development.
Architecture Composition
Service (Service Layer)
Code Repository: esp-brookesia/service
The Service layer provides system-level and business-level service management capabilities, used to uniformly dispatch functional modules in the device, such as command processing, status management, task coordination, etc., and is the functional hub of the device.
Features:
Unified service interface contract: All service modules follow standardized registration, startup, stop, and event publishing/subscription interfaces, ensuring the coordination and manageability of services
Modular service registration and management: Supports dynamic registration, discovery, and lifecycle management of services
Supports console / command interaction: Provides a unified console interaction interface, convenient for debugging and device control
Suitable as a device logic hub or system service layer: Reduces system complexity through unified scheduling by the service manager
Agent (Intelligent Agent Layer)
Code Repository: esp-brookesia/agent
The Agent layer is used to implement “intelligent behavior” agent modules, which can respond based on events, states, or external inputs (such as voice dialogue), and is the core of building interactive logic and behavior decisions.
Features:
Standardized Agent lifecycle management: Provides unified initialization, operation, stop, etc. interfaces, convenient for unified scheduling by the framework and building multi-Agent systems
Event-driven behavior model: The intelligent entity can respond to specific events and execute predetermined logic
Composable, extensible Agent design: Supports access to various AI platforms (such as XiaoZhi, DouBao, etc.), realizing natural language dialogue and intelligent control
Applicable to human-computer interaction, automatic response, state-driven logic
Expression (Expression and Emotion Expression)
Code Repository: esp-brookesia/expression
The Expression module focuses on emotion and expression logic, which can be used to drive screen animations, graphic expressions, or other feedback forms (such as expression changes, status prompts, etc.), making device interaction more anthropomorphic and emotionally warm.
Features:
Standardized expression driving interface: Defines unified expression triggering, status query, animation control interfaces, convenient for seamless integration with GUI systems or animation engines such as LVGL
Expression / Emotion abstract model: Abstracts emotional states into configurable parameters and models
Dynamic expression system: Can switch expressions in real time according to semantic changes or interaction context, simulating emotional feedback
Suitable for electronic expressions, anthropomorphic UI, emotional feedback systems
Example Project
Service Console Example
Example path: service_console
This example demonstrates how to build an interactive console application based on the Brookesia Service framework, used to demonstrate service registration, command handling, and system interaction processes.
Example Highlights:
Quickly understand the usage and unified interface design of the Service layer
Suitable as a debugging entry or system control interface
Can be expanded into a device CLI or debugging console
Applicable Scenarios
Smart electronic badges / expression terminals: Combine with the Expression module to provide vivid expression feedback
Anthropomorphic interactive devices (such as smart speakers, interactive toys, screen-equipped controllers): Utilize the voice dialogue and intelligent decision-making capabilities of the Agent layer, as well as the emotional expression of the Expression module
Embedded systems requiring service-oriented architecture + behavioral logic + expression feedback: The framework provides a complete solution
HMI solutions combined with LVGL, animation players (such as EAF): Easy to integrate based on unified interfaces