Inspiration
Most AI applications today suffer from digital "amnesia"—they treat every conversation as a completely blank slate, or they rely on messy, expensive prompt-stuffing to remember who you are. As a team of four engineering students, we wanted to fix this. We were inspired to build a true cognitive long-term memory layer for AI agents.
What it does
Our project, the Hyper-Context Engine, silently tracks real-time user behavior (clicks, views, and dismissals), runs background synthesis to construct an evolving user persona, and matches it with semantic vector memory to hyper-personalize every chat interaction autonomously.
How we built it
To ensure everyone got a robust, full-stack learning experience, we skipped traditional vertical siloes and split the project into horizontal feature slices. Every team member wrote code across the entire repository footprint:
The Orchestration Brain: Built natively using the Google Agent Development Kit (ADK) to manage the multi-turn conversational reasoning loop via gemini-2.0-flash. We leveraged the SDK's structured outputs (response_schema) bound to explicit Pydantic models to guarantee valid JSON processing.
The Memory Cluster: Powered by Elasticsearch running locally in Docker containers. We configured two main schemas: a sequential index for raw interaction streams and a structured index for synthesized user personas featuring a dense profile vector v∈R768 to support future semantic search.
The Gateway & Protocol: A unified FastAPI backend that served as our Model Context Protocol (MCP) server via FastMCP, exposing native functions like log_action() and fetch_user_context() directly over the wire to Gemini.
The Control Interface: An interactive Streamlit web application equipped with event logging simulation buttons, a live color-coded interest tag sidebar, and a collapsible "Thought Trace" debugger that parses raw JSON streams from the ADK to show judges the agent's real-time reasoning.
Challenges we ran into
The Streamlit Execution Trap: We initially ran into tight coupling where LLM orchestration was trapped inside Streamlit's UI rendering loops. We had to drastically refactor our code to keep the frontend completely "dumb," encapsulating the heavy Gemini synthesis logic entirely within separate backend modules.
Upstream 500/503 Cascading Failures: During aggressive multi-turn chat loops, we hit frequent upstream rate limits and cold-start gateway timeouts. Instead of letting our application crash, we designed asynchronous exception-handling middleware to catch upstream API disruptions gracefully, passing helpful fallbacks back to the UI without blowing up the client session.
Accomplishments that we're proud of
True Horizontal Collaboration: Instead of siloing our team members into strict "frontend" or "backend" isolation, we successfully executed a horizontal feature-slice workflow. Every single one of us gained hands-on experience configuring Elasticsearch schemas, wrapping FastMCP tools, tuning Gemini prompts, and building interactive UI containers.
Native ADK & Structural Mastery: We are incredibly proud of migrating away from visual builders to implement a fully native codebase using Google's Python Agent Development Kit (ADK). Overcoming the strict constraints of client.aio asynchronous structured outputs to guarantee deterministic JSON processing was a massive milestone for us.
The "Thought Trace" Debugger: We successfully built a fully transparent execution pipeline. Our collapsible UI panel doesn't just display final answers; it dynamically captures and exposes the raw JSON payloads passing back and forth between Gemini and the Model Context Protocol (MCP) server, proving our agent's underlying reasoning loops to the judges.
What we learned
This hackathon was a massive paradigm shift for us. We moved away from telling the computer exactly how to execute, and learned how to give an AI model the tools and instructions to solve problems dynamically.
On the engineering side, we mastered asynchronous Python execution, handled tricky cross-origin resource sharing (CORS) configurations over independent microservices on Google Cloud Run, and learned the legal importance of shipping public code with an official Apache 2.0 open-source license.
What's next for Google Agentic Hackathon
Activating Semantic Vector Memory: While our Elasticsearch indices are successfully running, our next immediate upgrade is utilizing the pre-configured profile_vector mapping field. We plan to integrate Google’s text-embedding-004 model to convert raw user profiles into 768-dimensional dense vectors, allowing the agent to perform hyper-fast semantic context retrieval instead of relying strictly on text matching.
Real-Time Streaming Re-Synthesis: Currently, our persona synthesis loop relies on an interactive sidebar trigger button. We want to implement a background event-driven architecture using asynchronous task queues so that every third user action automatically refreshes the user's vector persona entirely in the background.
Production Optimization on Cloud Run: Now that our separate frontend and backend microservices are wired via environmental variables and decoupled CORS configurations, we plan to implement custom autoscaling targets and connection pooling to drastically reduce container cold-start latencies.
Built With
- docker
- elastic-cloud
- elasticsearch
- fastapi
- fastmcp
- gemini-2.0-flash
- gemini-2.5-flash
- google-agent-development-kit
- google-cloud-run
- httpx
- model-context-protocol
- pydantic
- python
- streamlit
Log in or sign up for Devpost to join the conversation.