Inspiration
Every AI memory system I looked at has the same failure mode: memory that only grows becomes a junk drawer. For travel planning this isn't cosmetic — a visa rule that changed six weeks ago, an opening time from last season, a suspended train route: stale memory doesn't just clutter, it 'actively steers you wrong'. So I inverted the premise. What if the interesting problem isn't remembering — it's "forgetting on purpose"?
Momento is a travel planning agent whose memory gets sharper and more trustworthy the more you use it.
What it does
Momento plans trips across many sessions over weeks. It learns you permanently (dietary needs, pace, crowd tolerance), remembers destinations, and keeps every volatile fact current — retiring stale facts "before" they mislead you.
The heart is "two compounding loops":
- Predictive prefetch— a cheap
qwen-flashcall classifies each turn's intent; a transition map predicts what you'll ask "next"; the highest-scored memories for current + predicted intents are warmed into a ~400-token buffer before the agent reasons. A miss costs a wasted prefetch, never correctness. - Use promotes — memories that actually ground an answer get their hit counts bumped, raising their scores and promoting them through hot/warm/cold tiers. Warming alone never promotes; "use" does.
The loops compound: scores rank what gets prefetched; prefetch hits feed promotions. Useful memory rises, unused memory sinks.
Forgetting is engineered, not incidental: every fact carries a "per-type freshness half-life" (visa rules: weeks · opening hours: days · geography: never). When a fresh fact contradicts a stored one, a reconciler decides "supersede / merge / coexist" — with guards (a well-corroborated fact resists a single low-confidence source) and a full provenance trail of what replaced what, when, and why. In the demo you watch it happen live: Japan ends visa-free entry, the stale rule gets struck through on screen, and the next answer grounds on the new one.
How I built it
- Models (Qwen Cloud):
qwen3.7-plusfor reasoning, reconciliation, and fact extraction;wen-flashfor per-turn intent classification;text-embedding-v4at 768 dimensions for retrieval — chosen to match my local dev embeddings so one database serves dev and prod. - Memory: sqlite-vec vector store; a
MemoryRecordschema carrying score, tier, fact type + half-life, hit counts, confidence, corroboration, contradiction counts, supersession links, and provenance. - Agent loop: classify → prefetch → reason (grounded on the hot buffer) → promote what was used → extract durable user facts → reconcile — every new fact, scraped or user-stated, enters through the same guarded door.
- Data: Real Kyoto POIs fetched from OpenStreetMap's Overpass API through the reconciler; license-clean by design.
- Demo: Flask + Leaflet map where pin colors are the memory tiers — you literally watch memories heat up as they prove useful, and watch a stale pin retire when the world changes.
- Dev setup: swappable model layer behind one env var — local Qwen3 on Ollama for free offline iteration, Qwen Cloud for the judged build.
Challenges I ran into
Honest list: this is my first software project — three weeks ago I had never opened a terminal. Concretely: bracketed-paste artifacts corrupting shell commands, SQLite refusing cross-thread access under Flask, reasoning models leaking <think> tags into JSON I needed to parse, silent extraction failures that taught me why errors must be loud, embedding-dimension mismatches between local and cloud models, and Overpass rejecting anonymous clients. Each one taught me something a tutorial never would have.
The hardest design problem: preventing the loops from degenerating. If prefetching promoted everything it warmed, all memory would drift hot and the "gets cleaner" thesis would die. The fix — promotion only on use, never on warming — is one line of policy that took real thought.
What I learned
More than any project I've attempted: the entire toolchain (git, uv, Ollama, VS Code), Python, vector search, prompt design for structured output, and — the deep one — that memory system design is mostly policy design: what to keep, what to trust, what to forget, and who gets to decide.
What's next
A scheduled advisory re-scraper through the same reconciler door; replacing the hand-coded intent-transition prior with a learned model once real session data exists (the seam is already in place); more destinations; and constraining recommendations strictly to provenance-backed facts.
Built With
- alibaba
- css3
- embeddings
- flask
- html5
- javascript
- leftlet
- llm
- memory
- ollama
- openai-api
- openstreetmap
- python
- qwen
- rag
- sqlite
- sqlite-vec
- travel
- vector-database
Log in or sign up for Devpost to join the conversation.