Most AI agents suffer from amnesia. They rely on fragile session states or external caches like Redis to remember what they've already seen. Prabhu, the creator of ContriGraph, argues that this is a solved problem if you stop treating agent memory as separate from your data model. By building an AI agent that writes its own interaction history directly into a graph database, he eliminated the need for a dedicated memory service entirely.

The Graph-First Architecture

ContriGraph is built on a stack of FastAPI, Claude AI, and FalkorDB. The core insight is that developer-issue matching isn't a search problem; it's a graph traversal problem. The system models Developers, Skills, Issues, Repositories, and Maintainers as nodes. Relationships like HAS_SKILL, MAINTAINED_BY, and FOLLOWS define the topology. When a user queries for issues, the Claude agent executes a Cypher query against FalkorDB that traverses four hops in under 1 millisecond across 180 nodes and 362 edges.

Memory as Typed Edges

The most radical component is how the agent handles state. Instead of logging actions to a separate table, every interaction is written back to the graph as a typed edge. When the agent surfaces an issue, it creates a VIEWED edge. If a user skips an issue, a SKIPPED edge is created. Future queries use NOT clauses in the Cypher traversal to permanently exclude these items. The graph itself acts as the long-term memory, ensuring that skipped issues never resurface across sessions without any application-level logic.

Dynamic Ingestion and Social Scoring

The system doesn't just consume static data. If a query returns zero results, the agent dynamically calls the GitHub API to ingest new repositories and issues into FalkorDB, then retries the traversal. The graph grows on demand. Furthermore, the agent calculates a social score by counting distinct friends who contributed to the same repository, weighting recommendations by social proximity and maintainer response times.

Key Takeaways

  • Agent memory can be implemented as graph relationships, removing the need for external state stores like Redis.
  • FalkorDB executed complex 4-hop traversals with sub-1ms latency without requiring significant index tuning.
  • Dynamic ingestion allows the graph to expand its knowledge base in real-time based on query misses.
  • The project was built for Graph Hacks 2026 by WeMakeDevs and FalkorDB.

The Bottom Line

Prabhu's approach proves that for many agent use cases, the database schema is the memory architecture. Stop bolting on vector stores and session caches when your primary data model already supports the necessary context.