Inspiration
I noticed that when using AI coding agents across multiple sessions, they constantly suffer from amnesia. They forget architectural design choices, why a specific bug fix was implemented, or how different components connect. Inspired by the need for a persistent, fast, and local memory layer that doesn't bloat context windows, I set out to build ContextMesh using Relate by Neo4j.
What it does
ContextMesh provides an embedded, file-based episodic memory graph for local AI coding agents. It stores decisions, bugs, files, and agent sessions in a single local database file (./data/contextmesh.rl), allowing AI agents to traverse relationships and query context instantly via Cypher without hitting external servers or network limits.
How I built it
I built ContextMesh as a full-stack application leveraging:
- Relate (
@relate/relate): For embedded, zero-server, single-file graph storage and Cypher query execution. - Express & Node.js backend: Serving API routes for graph traversal, agent memory updates, and transaction safety.
- React & Vite frontend: Featuring an interactive canvas/SVG node-link visualizer, live Cypher query execution, a real-time multi-agent transaction feed, and a built-in README viewer.
Challenges I ran into
Managing local file-based database states while simultaneously simulating concurrent multi-agent transactions required careful handling of Relate's transaction locks. Ensuring the custom frontend node visualizer rendered complex relationship edges cleanly without lagging also required optimizing state updates and layout algorithms.
Accomplishments that I'm proud of
- Successfully integrating Relate's single-file persistent graph storage into an interactive, zero-setup developer dashboard.
- Building a seamless multi-agent simulator that demonstrates real-time transaction updates directly into the
.rlfile. - Packaging everything so it can be spun up instantly with a single
npm installandnpm run dev.
What I learned
Working with Relate gave me a deep appreciation for embedded, in-process graph databases and Model Context Protocol (MCP) workflows. I learned how local graph traversal can drastically improve AI agent context management compared to traditional flat-file RAG systems.
What's next for ContextMesh
- Adding native MCP server integration so AI coding assistants in Cursor or VS Code can plug directly into the Relate graph out of the box.
- Enhancing the visualizer with advanced vector search clustering.
- Expanding multi-agent collaboration patterns for automated CI/CD pipeline bug hunting.
Built With
- context
- css
- cypher
- express.js
- javascript
- model
- node.js
- protocol
- react
- relate
- tailwind
- typescript
- vite

