
Why I Stopped Using Session State and Used Hindsight Instead
I thought saving chat history to a Python dict was good enough for an accountability agent — it took exactly one browser refresh to prove me completely wrong. What We Built AXIOM is a discipline AI agent that holds engineering students accountable across days and weeks. It remembers your goals, tracks your progress, scores you out of 1000, and calls out repeated failures by name and date. The key word is "remembers" — not just within a session, but permanently, across every login. The stack is Streamlit for UI, Groq with Llama 3.1 for inference, and Hindsight for persistent memory. My job on this project was figuring out how to make the memory actually work — which turned out to be much harder than I expected. The Session State Trap When we first built AXIOM, memory worked like this: if " messages " not in st . session_state : st . session_state . messages = [] This is standard Streamlit. It stores everything in the browser session. It works great — until the user closes the tab. Or re
Continue reading on Dev.to Webdev
Opens in a new tab



