Here is a rewritten version of your project description, optimized for a Devpost submission. It's structured for clarity, impact, and readability, following the typical format of successful hackathon entries.


๐Ÿง  AgentMemory: Hybrid Local + Distributed Memory for AI Agents

Never let your AI forget.

๐Ÿ’ก Inspiration: The Memory Crisis in Agentic AI

AI agents are evolving from experimental prototypes into mission-critical systems. However, they suffer from a fundamental flaw: they have no memory. Every new session starts from a blank slate, forcing users to repeat context and preventing agents from learning and personalizing over time.

This isn't just an inconvenience; it's a failure point. Traditional databases, designed for human-centric, intermittent workloads, can't handle the always-on, high-volume, geographically distributed demands of autonomous agents. When an agent's memory fails, the system fails entirely.

Our inspiration was to build memory that endures. We created AgentMemory, a hybrid architecture that combines the speed of local memory with the durability and global reach of a distributed database, ensuring agents never forget and are always production-ready.

โš™๏ธ What It Does

AgentMemory is a production-grade, persistent memory layer for AI agents that works seamlessly across sessions, devices, and regions.

With AgentMemory, agents can retain:

  • Comprehensive Conversation History: Complete dialogue logs with powerful semantic search.
  • User-Specific Preferences: Personalization that persists indefinitely.
  • Accumulated Facts & Decisions: Knowledge that compounds over time.
  • Session State: Context that survives restarts and failures.

The Outcome: An agent that awakens with awareness of who you are, what you've discussed, and what matters to youโ€”every single time you engage with it.

๐Ÿ—๏ธ How We Built It

Our hybrid architecture strategically combines two powerful systems:

  1. MemPalace (Local Cache): Manages rapid, session-level memory with sub-100ms recall for immediate context.
  2. CockroachDB (System of Record): Serves as the durable, globally distributed database for long-term memory and semantic search.

The Tech Stack:

  • Database: CockroachDB Cloud Serverless (Free Tier) with C-SPANN Distributed Vector Indexing.
  • Memory Layer: MemPalace with local ChromaDB.
  • MCP Server: CockroachDB Managed MCP Server for native agent connectivity.
  • Embeddings: all-MiniLM-L6-v2 (local, zero-cost).
  • Orchestration: Node.js & PostgreSQL driver.
  • Agent Client: Claude Code.

Key Technical Decisions:

  • Hybrid Architecture: We use MemPalace as a rapid local cache, while CockroachDB serves as the authoritative, durable retrieval layer. This provides the optimal combination of speed and reliability.
  • CockroachDB Managed MCP Server: This enabled Claude Code to connect directly to our database without intermediary proxies, simplifying the architecture and enabling natural language queries.
  • Distributed Vector Indexing: We leveraged CockroachDB's C-SPANN index on a VECTOR(384) column to power performant semantic search across all memories.
  • Zero-Cost Embeddings: Generated embeddings locally using @xenova/transformers, eliminating external API dependencies and token costs.
  • Multi-Tenant Isolation: Implemented via user_id prefixing on the vector index, ensuring secure data separation.

๐Ÿšง Challenges We Overcame

  • MemPalace Accuracy Claims: Independent evaluations showed MemPalace's retrieval accuracy was significantly lower than claimed. We re-architected it as a local cache for speed, making CockroachDB's C-SPANN index our primary, reliable retrieval mechanism.
  • Vector Dimension Mismatch: We initially used VECTOR(1024), but our embedding model outputs 384-dim vectors. We corrected the schema for compatibility and improved performance.
  • AWS Deployment Complexity: Initial plans with AWS Lambda and API Gateway proved complex and prone to credential errors. We pivoted to the simpler, more reliable CockroachDB Managed MCP Server, eliminating the need for complex AWS configurations.
  • Free Tier Connection Limits: To avoid CockroachDB's free tier connection limits, we adopted the MCP Server with a single persistent connection, bypassing the many-connection model of serverless functions.

๐Ÿ† Accomplishments We're Proud Of

  • Pioneering a Hybrid Memory Architecture: We successfully combined the speed of local memory with the durability of a global database to solve a problem no single solution can address alone.
  • Production-Grade Vector Search: We implemented a high-performance semantic search system using CockroachDB's C-SPANN index with robust multi-tenant isolation.
  • Native MCP Integration: We enabled direct, natural language database connectivity for Claude Code through the CockroachDB Managed MCP Server.
  • Zero Operational Cost: The entire system runs within free tiers: CockroachDB (50M RUs, 10GB storage), AWS S3 (5GB), and zero-cost local embedding models.
  • Comprehensive Documentation: We created six detailed guides for quick-start, MCP configuration, and troubleshooting, making the project accessible to any developer.

๐Ÿ“š What We Learned

  • Hybrid Architectures Excel: No single system is perfect. The best solutions combine the strengths of different technologies.
  • Judgment Surpasses Generation: While AI can generate massive amounts of data, the critical skill lies in discerning which outputs are valuable for your specific goals.
  • Production Readiness is in the Edge Cases: A successful demo is just the start. True production readiness is defined by graceful error handling, retry logic, and idempotency.
  • CockroachDB's Vector Indexing is Enterprise-Grade: C-SPANN provides powerful compression and performance at scale.
  • MCP is the Future of Agent Tooling: The Model Context Protocol simplifies how agents interact with external tools and data sources.
  • Simplicity Prevails: We learned that a simpler, more direct architecture is often faster, more reliable, and more cost-effective than a complex one.

๐Ÿ”ฎ What's Next for AgentMemory

  • Enhanced Semantic Search: Combining vector and keyword retrieval for superior recall.
  • Multi-Agent Coordination: Using CockroachDB's transactions as distributed locks for agent swarm coordination.
  • Smart Memory Compaction: Automatic summarization of aged memories to stay within free tier limits.
  • Memory Graphs: Constructing knowledge graphs from memories for deeper agent understanding.
  • Open-Source Ecosystem: Publishing Agent Skills for common memory patterns to help the community.

Built With

Share this project:

Updates

Submission history