frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Forked CozoDB to give agents cognitive primitives

3•shanrizvi•8h ago
CozoDB is an embedded relational-graph-vector database created by Ziyang Hu and the Cozo Project authors. It does Datalog, vector search (HNSW), and full-text search in a single embedded engine and was created with the vision to be the “Hippocampus for AI”. Unfortunately, the project went quiet after December 2024. KuzuDB, another embedded graph database with vector and full-text indexes similar to Cozo, was archived in October 2025.

I decided to continue the vision by using Cozo to build a memory and reasoning substrate with a cognitive ontology inspired by neuroscience. It covers events, epistemic structure, intent, and action, with multi-agent support. An extraction pipeline using an LLM of your choice to extract these from documents and session transcripts, deduplicates them, and detects cross-document contradictions. Everything is versioned and provenanced back to source chunks, with time travel.

But the features we rely on most needed work, so I hard-forked Cozo as MnesticDB under the same MPL-2.0 license, and made improvements.

I reduced index build time from 89s to 8s on a 40,000 chunk corpus with real 384-dimension embeddings without affecting recall by rebuilding the HNSW index flat-and-parallel rather than row-by-row.

I unblocked reads during index rebuilds, which would take more than an hour for a 151,000 index with 1536 dimensions; it now builds off-lock, with a 40,000 vector index building under 6 seconds with 90,000 concurrent reads in one test.

I added reciprocal-rank fusion across semantic (HNSW), keyword (BM25), and graph proximity signals at around 42ms, 4x faster than the three queries running separately.

After switching the default full-text scorer from tf-idf to Okapi BM25, fused recall improved from 0.75 to 0.954 on a 40,000 chunk corpus, on par with DuckDB’s 0.957.

MnesticDB: https://www.mnesticdb.com https://www.github.com/shuruheel/mnestic

Returning to the memory and reasoning substrate, I added support for structured data, allowing users to connect a Postgres database, draft an operational ontology from the schema, and sync rows in as typed graph nodes, with provenance and on-demand live fields, fused into the same graph extracted as the cognitive ontology. This allows an agent to query business tables and knowledge distilled from documents through one interface, with contradictions and history on both.

MindGraph: https://mindgraph.cloud/ https://www.github.com/shuruheel/mindgraph-rs

In a 60-question stratified pilot of LongMemEval, we scored 87% with zero retrieval errors, strong factual recall (100%), and strong temporal reasoning (90%). The misses clustered in preference questions (70%), which I subsequently fixed, but haven’t re-run the benchmark yet. The plan is to eventually run the full 500-question run as the confidence interval is quite wide at the current sample size.

I’ve been building this solo, which is not optimal, so if this piques your interest, please consider becoming a contributor to the MnesticDB project, or a co-founder of MindGraph (the cognitive graph substrate for agents).

Ask me anything here, or email shan@rizvi.nu.

Ask HN: Will programmers write more efficient code during the memory shortage?

117•amichail•12h ago•200 comments

"Show HN" " alternative to dark matter, tested across galaxy to cosmic scales"

2•SPruynIDR•3h ago•0 comments

Ask HN: Is anyone using the A2A protocol?

91•asim•2d ago•41 comments

Forked CozoDB to give agents cognitive primitives

3•shanrizvi•8h ago•0 comments

Ask HN: What tools are you using for AI-assisted code review?

21•agos•1d ago•22 comments

Ask HN: Using OPA/Rego to secure MCP tool execution. Does it make sense?

5•wmolino•5h ago•0 comments

Ask HN: What's a simple app you'd build if you had a weekend?

3•akashwadhwani35•6h ago•4 comments

Ask HN: What is the coolest tech progress outside AI?

10•vantareed•17h ago•7 comments

Ask HN: Is anyone else leaving AUR?

6•lordkrandel•1d ago•6 comments

Ask HN: Open-Source Intelligence

3•silent_butagrim•22h ago•5 comments

Ask HN: Is there a recognized standard for swarm intelligence benchmarking?

5•stephanieriggs•22h ago•1 comments

Ask HN: I'm lost. How can I define ICP (Ideal Customer Profile)?

5•snowhy•1d ago•6 comments

Self-adapting and mutating LLM based viruses/worms

3•rozumbrada•1d ago•4 comments

Ask HN: Is there a way to stop the animated Google Doodles?

11•arnejenssen•1d ago•12 comments

Trillions of dollars spent just to work on customer services?

8•YihaoZhang•1d ago•2 comments

Ask HN: How do you effectively communicate or present?

8•hnthrow10282910•1d ago•6 comments

Ask HN: Conflicted about founding engineer role

8•gondolin1683•1d ago•18 comments

Ask HN: Do you find vibe coding / agentic engineering to be fulfilling?

10•uejfiweun•1d ago•12 comments

Meetup.com login appears to be exceeding its reCAPTCHA Enterprise quota

4•infl8ed•1d ago•0 comments

Ask HN: What's a prompt you've written that you're genuinely proud of?

10•akashwadhwani35•2d ago•7 comments

Ask HN: Has anyone had success with SBIR grants and what is the process like?

11•lyfeninja•2d ago•8 comments

Reviews have become expensive, rewrites have become cheap

82•_z6bq•4d ago•74 comments

Ask HN: Are other people seeing a spike in IT problems with businesses?

14•PaulHoule•2d ago•11 comments

Anthropic pauses credit change for Claude Code

35•fabianlindfors•4d ago•12 comments

Ask HN: How do you find new books to read?

5•ahmedfromtunis•1d ago•6 comments

Ask HN: Opus and regression with patterns not included in trainng data

2•dleech•1d ago•5 comments

Ask HN: Do we even need code anymore?

5•lasky•1d ago•19 comments

How much $ you spend for AI to code?

4•raghuu•1d ago•7 comments

Ask HN: Best resources for learning how to build a forum back end?

3•jupr•1d ago•3 comments

Ask HN: Whats the best and small open source model?

3•hairymouse•1d ago•3 comments