Day 1 & 2: Building the "Glass Box" for Ambient AI
We are thrilled to share the first major milestone for Project Resonance. Our goal is to turn the Amazon ecosystem into a proactive nervous system for human well-being, but to do that, we first needed to build a rock-solid foundation.
Today, we completed Phase 1 and Phase 2 of our architecture.
The "Glass Box" Dashboard
The biggest challenge with AI agents is that they are "black boxes"—users don't know what they are thinking. We solved this by building a real-time Streamlit "Glass Box" UI .
It visualizes the three pillars of our system:
- Biometrics (Bee): Real-time arousal state tokens.
- Agent Brain (MCP): The reasoning trace of our server.
- Actuation (Fire TV): The environmental interventions.
Under the Hood
We are building a self-hosted Alexa+ MCP Server using the new Streamable HTTP specification.
- Zero-Knowledge Privacy: We designed our Pydantic schemas so that raw biometric data never leaves the edge. Only anonymized "State Tokens" (e.g.,
{"state": "critical", "confidence": 0.94}) are sent to the cloud. - AWS Integration: We successfully integrated Amazon Bedrock (Nova) to act as the "eyes" of the system, classifying environmental context to prevent false positives.
- Strict TDD: We wrote tests before code. We currently have 32 passing unit tests ensuring our data layer and API handlers are bulletproof.
️ The Challenge: Taming the MCP SDK
We hit a major wall with the official MCP Python SDK. The StreamableHTTPSessionManager relies on anyio task groups that don't play nicely with standard FastAPI test clients, causing our integration tests to crash with lifecycle errors.
The Fix: Instead of fighting the framework, we pivoted to an "Option C" architecture. We decoupled the tool handlers from the HTTP transport, allowing us to unit test the core logic in isolation. This not only fixed the tests but made our code 10x more modular and easier to debug.
What's Next?
Tomorrow, we wire up the brain. We will be integrating Claude 3.5 Sonnet via Amazon Bedrock to create the agentic loop that chains these tools together, allowing the AI to reason: "User is stressed + User is sitting still = Trigger Calming Protocol."
Stay tuned!
Log in or sign up for Devpost to join the conversation.