AI Agent Components
This section documents ESP-Brookesia agent framework components. The framework consists of an agent framework layer and a concrete-agents layer. Their component hierarchy is shown below:
flowchart TD
A["App / Service / Example"]
B["**brookesia_service_helper**<br/>· Agent helper contracts<br/>· Argument and schema wrapping<br/>· Business-facing call entry"]
C["**brookesia_agent_manager**<br/>· Plugin lifecycle<br/>· Agent state machine<br/>· Shared service access"]
D["Concrete Agents"]
E["**Coze**<br/>· Cloud agent integration<br/>· Conversation and tool calls<br/>· Product extension entry"]
F["**OpenAI**<br/>· LLM chat integration<br/>· Tool-call adaptation<br/>· Streaming response handling"]
G["**XiaoZhi**<br/>· Local device interaction<br/>· Voice/expression coordination<br/>· Device-side agent form"]
H["**Shared Services**<br/>· Audio<br/>· Device time sync<br/>· Storage"]
A -->|"Calls helper"| B
B -->|"Delegates to manager"| C
C -->|"Creates and drives"| D
D -->|"Integrates Coze"| E
D -->|"Integrates OpenAI"| F
D -->|"Integrates XiaoZhi"| G
C -->|"Reuses system capabilities"| H
brookesia_agent_manager: The agent framework core, responsible for plugin registration, state machine lifecycle control, and integration of audio and time-sync services.brookesia_service_helper: The shared helper component that now owns the agent helper contracts.Agents: Concrete AI platform integrations implemented on top of
agent_manager, registered into the framework and managed uniformly by upper layers.