Got the full picture from the repo. Here's your Devpost write-up for DebateMind:

Inspiration

Most tools that help you argue better — debate prep sites, writing assistants, even ChatGPT — treat every session as a blank slate. You practice, you improve a little, and then the next session starts from zero because nothing remembers how you think. Real coaching works differently: a good coach remembers that you always reach for anecdotes instead of data, or that you fold the moment someone cites an authority. We wanted to build that — an opponent that actually gets to know your mind over time, not just your last message. Cognee's graph + vector memory model felt like the right foundation to make that "cognitive fingerprint" real instead of a gimmick.

What it does

DebateMind is an AI debate trainer you can argue with by text or by voice. As you debate, it tags each argument you make — the fallacies you lean on, whether your evidence is strong or weak, whether you reason deductively or anecdotally — and stores that as a typed node in your own personal knowledge graph. The next time you debate (even in a different mode, text vs. voice), the opponent pulls up that graph, sees your recurring weak spots, and steers the debate to specifically pressure them. Once you've clearly mastered a weakness, it's permanently forgotten from the graph so the AI stops hammering something you've already fixed. A D3.js visualization lets you literally see your own "cognitive fingerprint" — your reasoning style, your fallacy patterns, your growth — as a graph.

How we built it

  • Text bot: a LangGraph state machine (extract → opponent → judge → mastery → remember → remember_facts → prune) that recalls your weaknesses before generating a counterargument, then writes the judged outcome back to memory.
  • Voice bot: built on OpenAI's Realtime API over WebRTC, with tool calls (get_knowledge_context, save_debate_observation) that let the live model recall and write to the same memory graph mid-conversation.
  • Memory layer: Cognee, backed by Neo4j (graph) + pgvector (embeddings), following a Remember → Recall → Improve → Forget lifecycle. Every fact gets dual-written — once as natural-language prose (so Cognee's LLM extractor can build rich, linked entities) and once as an explicit typed DataPoint (ArgumentRecord, SessionSummary, PersonalFact) so we always have a precise node to delete or render.
  • A hand-authored OWL ontology (debate_domain.owl) constrains how the extractor labels things — fallacy types, evidence quality, reasoning approach — so the graph stays consistent and query-able instead of the LLM inventing ad-hoc categories every time.
  • Celery + Redis move all the slow graph-building work off the request path, so a debate turn never stalls waiting on cognify().
  • Frontend in Next.js/React with D3 for the fingerprint and knowledge-graph views, FastAPI backend, Postgres for app data.

Challenges we ran into

  • Cognee has no built-in multi-user isolation in the version we used — the graph store and vector collections are global. We had to manually tag every node with user_id and filter at every read/write boundary ourselves, since nothing in the store would do it for us.
  • Silent failure mode with embeddings: routing embedding calls through OpenRouter (instead of directly to OpenAI) 404s quietly, which disables the entire memory layer without throwing an obvious error — recall just returns empty. Tracking that down cost real time.
  • Keeping the ontology and the grading pipeline in sync — if the fallacy/evidence-quality strings written by the debate graders ever drifted from the ontology's vocabulary, the graph would silently stop linking things correctly. We had to write a dedicated test (test_ontology.py) just to guarantee that alignment.
  • Making "forget" actually mean forget — mastery shouldn't just hide a weak pattern, it should delete it from both the graph and the vector store so it can never resurface, while still keeping a Postgres MasteryLog as the durable record of what was learned.
  • Making voice and text share one brain — the two bots run on totally different stacks (LangGraph vs. Realtime API tool calls), so getting them to read/write the exact same per-user dataset without duplicating logic took careful API design in the debatemind.cognee module.

Accomplishments that we're proud of

  • A real cross-modal memory: a weakness you reveal in a voice debate shows up and gets targeted the very next time you debate by text, and vice versa.
  • "Forget" that's actually true deletion (graph + vector store), not a soft flag — something a lot of "memory" demos hand-wave.
  • An ontology-guided knowledge graph that stays clean and queryable instead of degrading into ad-hoc, un-joinable entity soup over time.
  • Shipping both a full LangGraph text pipeline and a live voice agent wired into the same memory backend, in hackathon time.

What we learned

  • Memory systems live or die on the boring plumbing — user isolation, dual-write consistency, silent failure modes — far more than on the flashy graph-building itself.
  • An ontology isn't optional scaffolding for LLM-extracted knowledge graphs; without one, the extractor's output is too inconsistent to build reliable features on top of.
  • Dual-writing prose alongside typed nodes is a nice pattern generally: you get the LLM's fuzzy, rich linking and a precise, addressable record you can delete or render deterministically.
  • Async-by-default (Celery) is basically mandatory for anything doing LLM-driven graph writes in the request path of a conversational app.

What's next for DebateMind

  • Multi-tenant-safe memory once Cognee natively supports dataset-scoped graph queries, so we can drop our manual isolation layer.
  • Richer coaching feedback — surfacing not just "you keep committing StrawMan" but a trend view of how your reasoning style is shifting over weeks/months.
  • Group/tournament debate modes, where the graph could track how you perform against different opponent personas or debate formats.
  • Deeper voice-mode parity — bringing the full knowledge-graph explorer and topic-specific recall nuance that the text bot has today fully into the realtime voice flow.

Built With

Share this project:

Updates