Give Your .NET Agent a Face: Building an AI Desk Companion with M5Stack
In this demo-driven session from dotnet, an M5Stack/StackChan robot becomes a Tamagotchi-style desk companion with a physical face, a voice, and reactions to its environment. The session follows the architecture and an end-to-end interaction, showing how embedded hardware connects to a modern .NET agent.
Architecture: embedded controls and a .NET backend
The companion separates device control from the services that support its AI behavior:
- M5Stack/StackChan hardware: C++ running on the device controls its display, movement, and sensors.
- .NET 11 backend: Hosts the services behind the companion experience.
- Aspire: Orchestrates those services and provides telemetry to observe their operation.
The session includes a live end-to-end interaction and a look at Aspire telemetry, alongside the design decisions involved in connecting embedded hardware to the backend.
Models, agent behavior, and developer tools
The architecture brings together several components with distinct roles:
- Microsoft Foundry models provide chat and vision capabilities.
- Microsoft Agent Framework supports agent behavior.
- GitHub Copilot SDK supports tool-driven developer scenarios.
These components extend the experience beyond a chat window, connecting the agent’s responses and behavior to a physical device.
Using work context safely
The session also examines how an agent can use work context through WorkIQ. The demonstration uses synthetic or sanitized data rather than exposing private information, making data handling an explicit part of the companion’s design.
Building or adapting the companion
The project is accompanied by sample code and a setup guide so developers can build their own companion or adapt the architecture to other devices. The session, BRK040, covers both the complete architecture and the decisions required to connect device controls, backend services, and agent capabilities.