ESP-Brookesia

July 3, 2026 · View on GitHub

logo

ESP-Brookesia

Overview

ESP-Brookesia is a full-stack development platform for AIoT and HMI products. It organizes hardware abstraction, service framework, runtimes, GUI, system framework, app components, and AI capabilities as ESP-IDF components so products can compose and reuse platform capabilities as needed.

Note

Brookesia is a genus of chameleons known for small form factors and strong adaptability. ESP-Brookesia uses this image to emphasize that the framework can adapt to different hardware forms, interaction surfaces, and product systems.

Main Architecture Layers

ESP-Brookesia Overall Architecture

  • Hardware Abstraction: hides platform and hardware differences, unifies device access, and supports ESP devices and PC simulation.
  • Service Framework: unifies service registration, function calls, event publish/subscribe, and MCP / Agent capability connections.
  • Runtime and GUI: supports multi-runtime apps and the JSON UI-driven GUI model.
  • System Framework: provides the product-level system framework that integrates GUI, Runtime, services, and app lifecycle.
  • App Ecosystem: covers third-party app supply, upload and publish, device-side distribution, and installation.

Main Architecture Features

  • Hardware Decoupling: HAL and PC simulation reduce the impact of hardware differences on upper-layer apps and systems.
  • App Development Efficiency: service-based design, multi-runtime support, and declarative GUI improve app development and validation efficiency.
  • Productization and Ecosystem: the system and app frameworks combine with the app-store mechanism to support scalable product delivery.
  • AI-Assisted Development Loop: AI Workflow and PC Validation form a development validation loop. Developers review, tune, and supplement the result to generate a publishable app.
  • Publishing and Distribution Flow: apps can move through Upload & Publish, App Store, and Device Runtime to complete publishing, discovery, download, installation, and execution.

ESP-Brookesia Versioning

From v0.7, ESP-Brookesia is componentized. Projects are recommended to obtain required components through the component registry. The conventions are:

  1. Components evolve independently but share the same major.minor version and depend on the same ESP-IDF release.
  2. The release branch maintains historical stable versions and only fixes bugs and security issues.
  3. The master branch continuously integrates new features and may contain functionality that has not stabilized yet.
ESP-BrookesiaESP-IDFMain changesStatus
master (v0.8)ESP32-S31: 6.2
Others: >= 6.0, <= 6.2
Componentized publishing expands to GUI, Runtime, System, App, and AI capabilities; adds PC simulation, JSON UI, multi-runtime support, and the standard System Super mainlineActive development
release/v0.7>= 5.5, <= 6.0Component manager supportStable version, bug and security fixes only
release/v0.6>= 5.3, <= 5.5Preview system framework; ESP-VoCat firmware projectEnd of maintenance

Documentation

Quick Reference

Component List

Utils Components

ComponentDescriptionVersion
brookesia_lib_utilsCore utility library providing task scheduler, thread configuration, profilers, logging, state machines, plugins, and other foundational capabilitiesComponent Registry
brookesia_mcp_utilsMCP bridge library that registers Brookesia service functions or custom callbacks as MCP tools for LLM invocationComponent Registry

Hardware Components (HAL)

ComponentDescriptionVersion
brookesia_hal_interfaceHAL foundation component defining the unified device/interface model, lifecycle management, and hardware interface abstractionsComponent Registry
brookesia_hal_adaptorESP device board adaptation component that initializes real peripherals through esp_board_manager and registers HAL interface implementationsComponent Registry
brookesia_hal_boardsESP device board configuration component providing board peripheral topology, pins, driver parameters, and Kconfig defaultsComponent Registry

Note

PC simulation support is provided by hal/brookesia_hal_linux and hal/brookesia_hal_wasm in this repository for Linux host, CI, and WebAssembly/Web demo scenarios.

Service Components

Service Framework

ComponentDescriptionVersion
brookesia_service_managerService manager providing plugin lifecycle, function routing, event publish/subscribe, and local callsComponent Registry
brookesia_service_helperService helper library providing type-safe schemas, helper calls, and unified service access interfacesComponent Registry
brookesia_service_customCustom service extension template for product-specific capabilities based on the Brookesia service frameworkComponent Registry

Network Services

ComponentDescriptionVersion
brookesia_service_httpHTTP service providing HTTP/HTTPS client requests, resource limits, and request lifecycle eventsComponent Registry
brookesia_service_sntpSNTP service providing NTP server management, timezone settings, and automatic time synchronizationComponent Registry
brookesia_service_wifiWi-Fi service providing state-machine management, AP scan, connection management, and SoftAP functionalityComponent Registry

Media Services

ComponentDescriptionVersion
brookesia_service_audioAudio service providing playback, codec, volume control, and playback state managementComponent Registry
brookesia_service_videoVideo service supporting local capture encoding and compressed stream decoding to pixel formatsComponent Registry
brookesia_service_displayDisplay service wrapping display input, gestures, and display-related system capabilitiesComponent Registry

System Services

ComponentDescriptionVersion
brookesia_service_storageStorage service providing namespace-based key-value storage managementComponent Registry
brookesia_service_deviceDevice service providing app-layer access to device control, status query, and protocol interfacesComponent Registry

Agent and Expression Services

ComponentDescriptionVersion
brookesia_agent_managerAgent manager providing AI agent lifecycle, state machine, and unified operation interfacesComponent Registry
brookesia_agent_cozeCoze agent adapter providing Coze API integration, WebSocket communication, and agent managementComponent Registry
brookesia_agent_openaiOpenAI agent adapter providing OpenAI API integration and agent managementComponent Registry
brookesia_agent_xiaozhiXiaoZhi agent adapter providing XiaoZhi API integrationComponent Registry
brookesia_expression_emoteAI emote and animation management for visual feedback in anthropomorphic interactionsComponent Registry

Emulation Services

ComponentDescriptionVersion
brookesia_emulation_nesNES emulation service integrating display, audio, storage, and gamepad controlComponent Registry

GUI Components (GUI)

ComponentDescriptionVersion
brookesia_gui_interfaceGUI interface layer defining JSON UI document model, runtime resources, action binding, and backend contractsComponent Registry
brookesia_gui_lvglLVGL backend mapping resolved GUI documents to LVGL objects and handling events, animations, and image resourcesComponent Registry

Runtime Components (Runtime)

ComponentDescriptionVersion
brookesia_runtime_managerRuntime manager for dynamic app packages, runtime backend registration, and app context managementComponent Registry
brookesia_runtime_elfELF runtime backendComponent Registry
brookesia_runtime_jsJavaScript runtime backendComponent Registry
brookesia_runtime_luaLua runtime backendComponent Registry
brookesia_runtime_wasmWebAssembly runtime backendComponent Registry

System and App Components (System & App)

ComponentDescriptionVersion
brookesia_system_coreSystem core framework orchestrating app lifecycle, GUI, Runtime, services, storage, and permission boundariesComponent Registry
brookesia_system_superStandard system for rectangular touch devices with Shell, launcher, overlay, status bar, and built-in resource flowComponent Registry
brookesia_app_filesFiles app providing a device-side file browser entryComponent Registry
brookesia_app_settingsSettings app providing device and system configuration entryComponent Registry
brookesia_app_storeApp Store component providing local and remote app package entriesComponent Registry

Getting the Repository

If you would like to contribute to ESP-Brookesia or build on the examples in this repository, you can get the master branch with the following command:

git clone https://github.com/espressif/esp-brookesia

Contribution Guidelines

We currently welcome contributions in the following areas:

For new component ideas, we recommend starting a discussion in GitHub Issues first so we can align on the use case, interface boundaries, and overall roadmap together. Once there is agreement on the direction, the follow-up contribution process is usually much smoother.

Additional Resources