Inspiration

We wanted to build an AI companion that does more than simply respond to the current conversation.

Most AI assistants can generate intelligent responses, but they often lose important context about the user over time. We wanted Mirror 2.0 to feel more personal — an AI that can remember meaningful conversations, understand evolving goals, and use those memories in future interactions.

The CockroachDB × AWS Hackathon's focus on agentic memory inspired us to explore how persistent memory could make AI agents more useful and context-aware.

What it does

Mirror 2.0 is an AI companion with persistent agentic memory.

Users can have conversations with Mirror, share goals, projects, preferences, and other meaningful information. The system converts relevant conversation data into vector embeddings and stores them using CockroachDB Cloud with pgvector.

When the user starts a new conversation, Mirror can retrieve relevant memories instead of relying only on the current chat.

The system combines:

  • Persistent memory using CockroachDB Cloud and pgvector
  • AI-powered conversations using Google Gemini
  • Memory retrieval through the Managed MCP Server
  • AWS services for serverless execution, agent workflows, and storage
  • A visual memory graph and chat interface for interacting with the system

This allows Mirror to maintain useful context across conversations and gradually build a better understanding of the user.

How we built it

Mirror 2.0 is built as a full-stack AI application.

The frontend provides the chat interface, memory visualization, and user interaction experience. The backend handles API requests, AI interaction, memory processing, and retrieval.

The core memory pipeline works by converting relevant conversation information into vector embeddings and storing them in CockroachDB Cloud using pgvector. When a new query arrives, Mirror searches the stored embeddings for semantically relevant memories and provides that context to the AI.

We also integrated the Managed MCP Server to provide a controlled interface for agent memory retrieval.

Google Gemini powers the conversational intelligence, while AWS services support the serverless and cloud infrastructure components.

The project was developed with a focus on making the memory system observable and understandable rather than treating memory as a hidden black box.

Challenges we ran into

One of our biggest challenges was designing a memory system that could retrieve useful information without simply storing and replaying entire conversations.

We had to think about what information should become a memory, how it should be represented as an embedding, and how relevant memories should be retrieved when the user asks something later.

Another challenge was integrating multiple technologies — CockroachDB pgvector, Gemini, MCP, and AWS — into one coherent architecture while keeping the system reliable and understandable.

We also spent significant time refining the user experience so that the memory layer was visible to the user instead of feeling like an invisible mechanism behind the chatbot.

Accomplishments that we're proud of

We are proud of building a working AI companion with persistent memory rather than a conventional chatbot that only operates within a single conversation.

We successfully integrated CockroachDB Cloud's distributed vector capabilities with an AI-driven conversational experience and semantic memory retrieval.

We are also proud of making the memory system visual and interactive, allowing users to understand that Mirror is actually building and retrieving persistent context.

Another accomplishment was bringing together CockroachDB, Gemini, MCP, and AWS into a single end-to-end application.

What we learned

This project taught us that building an AI agent is not only about choosing a powerful language model.

The quality of an AI companion also depends heavily on how information is stored, retrieved, and provided back to the model at the right time.

We learned about vector embeddings, semantic search, persistent agentic memory, MCP-based retrieval, and integrating cloud services into an AI application.

We also learned how important architecture and observability become when several AI and cloud components need to work together reliably.

What's next for Mirror 2.0

We want Mirror to become a more capable long-term AI companion.

Future improvements include better automatic memory formation, improved memory ranking and relevance, richer memory visualization, stronger personalization, and more intelligent understanding of long-term goals.

We also plan to expand the system's ability to connect memories across conversations and projects while giving users greater control over what Mirror remembers.

The long-term goal is simple: build an AI that doesn't just answer — it remembers, understands, and grows with you.

Built With

Share this project:

Updates

Submission history