How Cognee Gave AI a Memory: Building “The Best Man” for Engineering Teams

Introduction
Git tells us what changed and who changed it, but never why decisions were made. As engineering teams grow, the institutional knowledge behind architectural choices gets lost in Slack threads, PR discussions, and the minds of senior engineers who eventually leave. I built "The Best Man" to solve this by turning GitHub repositories into living engineering memory using Cognee's memory infrastructure.
The Problem
Every engineering team faces the same question six months after a major decision: "Why did we choose this approach over that one?" The answer exists somewhere in commit messages, PR discussions, and documentation, but finding it requires digging through hundreds of conversations. This institutional knowledge loss leads to repeated mistakes, abandoned work, and frustrated teams.
The Solution
"The Best Man" ingests GitHub repositories and creates a semantic memory of engineering decisions. Users can ask questions like "Why did we choose GJR-GARCH instead of normal GARCH?" and get answers backed by actual evidence from commit history, PR discussions, and decision logs.
How I Used Cognee
I used Cognee as the core memory engine for The Best Man project to solve the problem of persistent, structured memory for AI applications. Here is how I integrated Cognee throughout the system:
Memory Storage and Retrieval
Cognee serves as the primary memory store where all repository context gets stored. When users ingest a GitHub repository, the backend processes commits, pull requests, discussions, and documentation, then stores these as semantic memories using Cognee's add() function. This creates a persistent knowledge base that can be queried later.
Graph-Based Knowledge Representation
Unlike traditional RAG systems that only store text chunks, Cognee builds knowledge graphs that understand relationships between different pieces of information. This means the system can connect decisions to specific commits, link PR discussions to architectural choices, and understand the temporal sequence of engineering decisions.
Lightweight Ingestion Path
I implemented a strategic approach where ingestion stores concise memories without forcing expensive graph extraction on every commit. The system uses Cognee's add() to store metadata, README chunks, documentation summaries, and activity summaries. This keeps ingestion fast while still enabling graph-backed recall when needed through the graph on demand feature.
Semantic Search and RAG
For recall operations, the system uses Cognee's vector-backed search to find relevant memories, then leverages Cognee's RAG completion capabilities to synthesize answers from those retrieved memories. This provides more contextually accurate answers than simple text matching.
Memory Operations
The project implements all four core Cognee operations: ingest (add data), recall (search and retrieve), improve (enrich with feedback), and forget (clear memory). I wrapped these in a memory service layer that handles error checking, parameter validation, and provides a clean API interface for the FastAPI backend.
Decision Logging Integration
Human-captured decisions through the decision log feature also get stored in Cognee, ensuring that manual institutional knowledge becomes part of the searchable memory base alongside automatically ingested repository data.
Configurable Providers
Cognee's flexibility allows the system to work with different LLM and embedding providers. I configured it to use Fireworks AI for the LLM and Ollama for embeddings in the default setup, but the architecture supports easy switching to other providers like Groq, OpenAI, or HuggingFace.
Graph Evidence Visualization
When users ask questions, the system can optionally build graphs on demand and return graph evidence that shows which nodes and edges informed the answer. This provides transparency and helps users understand the reasoning behind the AI responses.
The key insight from using Cognee is that it transforms static repository data into a living, queryable knowledge graph that understands context and relationships, not just text patterns.
My Hackathon Experience
My hackathon experience building The Best Man was both challenging and rewarding. The journey started with a clear problem statement but evolved significantly as I worked through the technical implementation.
Initial Vision and Reality
I began with the idea of giving AI memory for engineering decisions, but the reality of implementing this was more complex than expected. The initial architecture was straightforward, but integrating Cognee required deep understanding of memory systems and graph databases.
Technical Challenges
The biggest challenge was balancing performance with functionality. Cognee is powerful, but graph extraction during ingestion was too slow for a demo. I had to redesign the ingestion pipeline to use a lightweight memory path first, then build graphs on demand. This required understanding Cognee's internal architecture and making strategic tradeoffs.
Rate Limit Management
LLM provider rate limits became a constant headache. I implemented exponential backoff, sequential processing, and careful request batching to avoid hitting limits during graph extraction. This taught me a lot about building robust systems that work within external constraints.
Deployment Hurdles
Getting the system deployed was surprisingly difficult. Cognee's dependencies exceeded Vercel's serverless limits, forcing me to split the deployment between Vercel for the frontend and Render for the backend. This added complexity but ultimately resulted in a more robust architecture.
Learning Moments
Working with Cognee gave me deep insights into how memory systems work. I learned that giving AI memory is not just about storing more data, but about understanding relationships and context. The graph-based approach fundamentally changes how AI can reason about information.
Iterative Development
The project evolved through multiple iterations. I started with a simple RAG approach, then added graph features, then implemented decision logging, and finally optimized the ingestion pipeline. Each iteration taught me something new about the problem space.
Final Result
Despite the challenges, the final system works well. Users can ingest repositories, ask meaningful questions, and get answers backed by actual evidence. The decision logging feature adds a human element that pure AI systems miss.
Overall Experience
The hackathon pushed me to build something practical with cutting-edge technology. It required learning new tools, making architectural decisions under pressure, and delivering a working demo. The experience was intense but ultimately very satisfying, especially seeing the system actually help users understand their own codebases better.
What Makes This Different
Most "AI for code" tools focus on syntax and patterns. "The Best Man" focuses on intent and decisions. By using Cognee's graph-based memory, the system understands not just what code exists, but why it exists and how decisions connect over time.
The Result
A working system where engineers can ingest a repository, ask timeline-aware questions, and get answers backed by actual evidence. The decision log feature ensures human judgment isn't lost, and the graph visualization shows exactly which commits and discussions informed each answer.
Future Vision
This is just the beginning. With Cognee's memory infrastructure, I can add features like automated decision documentation, cross-repository pattern detection, and even predictive insights about technical debt accumulation.
Conclusion
Building "The Best Man" showed me that giving AI memory isn't just about storing more data, it's about understanding relationships and context. Cognee made this possible by providing a structured way to store, retrieve, and reason about engineering decisions. The result is a tool that doesn't just help teams write better code, it helps them remember why they wrote it that way in the first place.
Try it out at : https://bestman.venkatkolasani.in
Code : https://github.com/Venkat-Kolasani/The-Best-Man
Powered by : https://www.cognee.ai
Made for : https://www.wemakedevs.org/hackathons/cognee Hackathon