Most AI assistants forget everything after each session. Memoria remembers, forgets, and evolves—extracting personal facts, resolving contradictions, and reflecting on what it knows. This post shares the journey of building a production‑ready MemoryAgent for the Qwen Cloud Hackathon, Track 1.
Every conversation with a typical chatbot starts from zero. You tell it you're allergic to peanuts on Monday, and by Wednesday it recommends pad thai with crushed peanuts. The model doesn't forget; it never had long‑term memory in the first place. Without durable knowledge about who you are, real personalisation is impossible.
We built Memoria to solve that problem: a personal AI with human‑like memory that remembers what matters, forgets what fades, resolves contradictions, and evolves its understanding of you over time. Real memory isn't a bigger context window—it's extraction, prioritisation, decay, consolidation, and reflection. The hackathon challenged us to deliver a memory‑efficient, production‑grade MemoryAgent, and we built one from the ground up on Alibaba Cloud.
Memoria organises knowledge in three deliberate tiers:
text-embedding-v3
, ranked by hybrid scoring, and subject to decay, consolidation, and conflict resolution.Other key features:
get_core_memories
, get_user_preferences
, forget_memory
, and strengthen_memory
to any Qwen agent.Backend: Python FastAPI, SQLAlchemy async, PostgreSQL 16 + pgvector for hybrid vector search.
Memory pipeline: DashScope – Qwen‑Plus for chat/extraction/conflict/reflection, Qwen‑Max for consolidation, text-embedding-v3
for embeddings. Background workers: Celery handles memory ingestion, decay, and consolidation with Redis as the broker.
Frontend: React + Vite, react-markdown
, remark‑math
, rehype‑katex
, custom dark theme.
Deployment: Docker Compose, Terraform for Alibaba Cloud (ECS, ApsaraDB, Redis), Let's Encrypt via Nginx.
qwen3-plus
not accessible; standardised on qwen-plus
.Voice input, multi‑agent collaboration via MCP, a mobile companion, advanced memory visualisations, and fine‑tuning Qwen on memory tasks.
**Try it yourself:** [https://memoria.imawais.engineer](https://memoria.imawais.engineer)
**GitHub:** [imawais-engineer/Memoria](https://github.com/imawais-engineer/Memoria)
Built with ❤️ on Alibaba Cloud and Qwen Cloud.