Inspiration
In my experience with various AI assistants, I've noticed that many tend to echo a user’s narrative without challenge. For example, if I express, "I'm long Apple to 400," they only reinforce this stance. However, in the financial markets, such an echo chamber can be quite costly. Traders require a companion who recalls their previous assertions and prompts them to reflect on any changes in their rationale. This need led me to develop a Socratic thought partner, whose primary role is to question you when you stray from your established principles.
What it does
AlphaMind serves as an interactive, stateful trading assistant designed for those seeking a collaborative partner in their trading journey. You establish your investment thesis and risk tolerance one time, locking them into the system. When you propose a trade that goes against your defined strategy, AlphaMind will challenge you. It offers counterarguments based on your stored risk profile, real-time market data, and SEC fundamentals.
How we built it
AlphaMind is powered by Gemini 3.5 Flash and the Google Agent Development Kit. We handle user session memory through the ADK's InMemoryRunner, while maintaining cross-session state using Google Cloud Firestore. The assistant operates with custom tools like save_investment_thesis, get_stock_info, and analyze_sec_filings, which allow it to base its arguments on solid data. Both the backend and the user-friendly Streamlit UI run on a fully managed Google Cloud Run service, ensuring a seamless interaction that combines human oversight with scalable cloud technology.
Challenges we faced
The primary hurdle we encountered was not the conversation logic itself, but rather framework debugging. In the early stages, the agent would crash upon receiving the first message because an ADK tool call returned an async generator, leading to an object representation instead of straightforward text. This underscored the importance of checking the actual library signatures on the machine rather than relying solely on documentation.
Additionally, managing context limits necessitated transferring conversation history ownership to the ADK session layer. The standard method involved resending the complete transcript, which can exponentially increase the prompt size. To improve efficiency, AlphaMind only sends the most recent message, keeping token growth manageable.
Accomplishments we’re proud of
The ability to maintain true cross-session persistence stands out as our key achievement. Demonstrating that a risk profile can endure page reloads and influence the agent’s responses days later distinguishes AlphaMind as more than just a stateless wrapper. Moreover, I've incorporated a quantitative accessibility assessment into the Streamlit UI. I evaluated the color palette against thresholds for color-vision deficiencies and added redundant encoding where the traditional red and green combinations fell short.
What we learned
While creating a persona for a language model is relatively straightforward, developing stateful memory is a more complex task. Designing an agent that actively questions the user necessitates careful tool selection and a clear distinction between temporary conversational exchanges and lasting database constraints.
What's next for AlphaMind
The next step is replacing profile blurbs with full-text SEC EDGAR scraping for institutional-grade analysis. Following that, scheduled overnight Cloud Run jobs will stress-test open theses against closing prices to alert users to strategic drift before the market opens. Finally, multi-user authentication will turn the prototype into a production-ready portfolio management tool.
Built With
- firestore
- gemini
- google-adk
- google-cloud
- steamlit

Log in or sign up for Devpost to join the conversation.