💡 Inspiration
Like most developers today, we don't work with just one AI assistant. We use Antigravity IDE for deep coding sessions, Cursor for quick edits, and Claude Desktop for planning and research.
The biggest problem we ran into was AI Amnesia. Every time we started a fresh session or switched to a different tool, the AI had zero memory of our team's architectural conventions, API response envelopes, or database patterns. We found ourselves copying and pasting the same rules over and over again.
While some tools have built-in memory features, they create walled gardens—memory saved in one app is invisible to another, and your team's proprietary context gets locked inside a third-party black box.
We built Mnemosyne to give developers a central, persistent memory layer that they own. By connecting CockroachDB to the Model Context Protocol (MCP), any AI agent can read and write to the same shared memory in real time.
⚙️ What It Does & How We Built It
Mnemosyne implements a biologically-inspired 4-Tier Cognitive Memory Engine:
- Working Memory: Stores active session context and temporary variables with automatic TTL expiration.
- Episodic Memory: Maintains a chronological log of all interactions across all connected AI tools.
- Semantic Memory: Permanent facts, architectural guidelines, and codebase knowledge stored as 1024-dimensional vector embeddings.
- Procedural Memory: Learned developer habits, style preferences, and operational rules (such as "Always wrap API responses in standard success/error envelopes").
Technical Stack & Architecture:
- CockroachDB Serverless: Serves as our single database for both relational metadata and distributed vector search. We use CockroachDB's native
<=>cosine distance operator to retrieve relevant memories in milliseconds. - AWS Bedrock (Amazon Titan Embeddings V2): Generates 1024-dimensional vector embeddings for all semantic facts and procedural rules.
- AWS Bedrock (Anthropic Claude 3.5): Powers our background Consolidation Engine—a "dreaming" process that reads episodic logs, removes noise, and distills permanent knowledge.
- FastMCP Protocol: Exposes memory retrieval and storage tools over SSE and HTTP, allowing instant 5-line connection into Antigravity, Cursor, and Claude.
- Next.js 15 & TailwindCSS: An interactive web dashboard and playground for monitoring memory health and running manual consolidations.
🚧 Challenges We Faced
- Atomic Memory Consolidation:
When consolidating short-term logs into permanent vectors across multiple tables, network drops or concurrent writes risked leaving memory in a broken state. We solved this by wrapping consolidation in CockroachDB distributed ACID transactions and implementing backoff retries for serialization conflicts (
SQLSTATE 40001). - Dual-Model Coordination: Balancing high-speed vector retrieval with LLM-based fact extraction required careful prompt tuning so the consolidation engine accurately separated temporary chatter from permanent rules.
- Cross-Client MCP Compatibility: Ensuring our MCP endpoints worked smoothly across both local desktop setups (stdio) and remote cloud deployments (SSE on Render) required careful route mounting and event handling.
🧠 What We Learned & What's Next
- Vectors + Relational in One Database is a Game-Changer: Having native vector indexing inside CockroachDB eliminated the need to maintain, sync, and pay for a separate vector database like Pinecone. Being able to join vector similarity scores with relational metadata in a single SQL query kept our backend clean and fast.
- Poly-Agent Workflows are the Future: Developers shouldn't be locked into a single AI ecosystem. Having a universal memory layer makes switching tools effortless.
What's Next: We plan to add automatic memory decay based on time and access frequency, team-level role-based access control (RBAC), and one-click GitHub actions for auto-syncing codebase documentation into CockroachDB semantic memory.
Built With
- acid-transactions
- agentic-ai
- amazon-bedrock
- amazon-web-services
- antigravity-ide
- artificial-intelligence
- boto3
- claude
- cockroachdb
- distributed-database
- fastapi
- fastmcp
- framer-motion
- lucide-react
- mcp
- nextjs
- postgresql
- psycopg2
- python
- render
- tailwindcss
- titan-embeddings
- typescript
- vector-database
- vercel

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