HyphaeDB: A Living Knowledge Topology for Agent-First Memory Using HNSW Graph Structure as a Gossip-Based Communication Fabric for Multi-Agent Knowledge Propagation and Emergent Coordination

Krishna Halaharvi · 2026

Read HyphaeDB: A Living Knowledge Topology for Agent-First Memory Using HNSW Graph Structure as a Gossip-Based Communication Fabric for Multi-Agent Knowledge Propagation and Emergent Coordination by Krishna Halaharvi (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2606-28781.txt.

Introduction

Halaharvi proposes HyphaeDB, a memory system for groups of AI agents that shares knowledge by itself instead of waiting to be asked. Today's vector databases, which store text as numbers for similarity search, treat memory as passive storage that agents must query one by one. Halaharvi reuses the graph inside those databases, called HNSW, as a communication fabric linking the agents.

Agents hold fixed positions in that graph, and knowledge spreads between neighbours through a gossip protocol, meaning each holder passes items onward while their strength fades with distance. From those local rules, the design aims for contradiction warnings, pattern formation and agreement across agents to emerge naturally. The system rests on knowledge nodes, topology edges and memory updates, with a reference version built on PostgreSQL. A multi-agent software method called Swarm-Driven Development serves as the test deployment.

Catalog record

CREATORKrishna Halaharvi
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE32 KB
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2606.28781

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

HyphaeDB: A Living Knowledge Topology for Agent-First Memory Using HNSW Graph Structure as a Gossip-Based Communication Fabric for Multi-Agent Knowledge Propagation and Emergent Coordination Krishna Halaharvi Abstract Every existing vector database and agent memory framework treats memory as passive storage that agents query explicitly. No system propagates knowledge between agents through the memory layer itself. We introduce HyphaeDB , an agent-native memory infrastructure that reinterprets the Hierarchical Navigable Small World (HNSW) graph topology—the data structure at the core of every modern vector database—not as a search optimization, but as a communication fabric for multi-agent AI systems. In HyphaeDB, agents are nodes in the vector space with persistent positions, knowledge propagates via a gossip protocol through the graph’s neighbor structure with energy-based attenuation, and emergent behaviors—contradiction detection, pattern crystallization, and consensus formation—arise from the combination of topology, propagation dynamics, and local interaction rules. We present the architecture built on three primitives (knowledge nodes, topology edges, and memory diffs), a multi-layer abstraction hierarchy with promotion via emergent consensus, and theoretical analysis grounding the system in small-world network theory, epidemic broadcast protocols, and swarm intelligence. We provide a reference implementation on PostgreSQL with pgvector and describe a concrete deployment in Swarm-Driven Development, a multi-agent software engineering methodology. HyphaeDB represents, to our knowledge, the first system to combine navigable small-world topology with gossip-based knowledge propagation for multi-agent coordination. Keywords: multi-agent systems, agent memory, HNSW, gossip protocols, knowledge propagation, swarm intelligence, vector databases, emergent behavior 1 Introduction The rapid adoption of AI agent systems—projected to grow from $7.5 billion in 2025 to over $50 billion by 2030 ( MarketsandMarkets 2025 ; Grand View Research 2025 ) —has created urgent demand for infrastructure that supports not just individual agent intelligence but collective agent intelligence. As organizations deploy an average of 12 agents per enterprise ( Salesforce 2026 ) and Gartner predicts 40% of enterprise applications will embed task-specific AI agents by end of 2026 ( Gartner 2025 ) , the infrastructure gap for multi-agent coordination has become a critical bottleneck. At the center of this gap is memory. Every existing agent memory framework—Mem0 ( Yadav et al. 2025 ) , Letta ( Packer et al. 2023 ) , LangMem ( LangChain 2025 ) , and others—implements the same fundamental pattern: extract knowledge from agent interactions, store it in a vector database or graph, and retrieve it when an agent queries for it. Memory is passive. Between writes and reads, the storage layer is inert. It has no mechanism to propagate knowledge between agents, no awareness of which agents need what information, and no capacity for emergent behavior. This paper introduces HyphaeDB , a fundamentally different primitive for agent memory. HyphaeDB reinterprets the HNSW (Hierarchical Navigable Small World) graph ( Malkov and Yashunin 2020 ) —the index structure used by every major vector database for approximate nearest neighbor search—as a communication fabric where: 1. Agents are nodes in the vector space with persistent positions that drift based on their work. 2. Knowledge propagates via a gossip protocol through the graph’s neighbor structure, with an energy model that attenuates based on relevance and importance. 3. Emergent behaviors arise from the topology: contradiction detection, pattern crystallization, and consensus formation occur without explicit programming. The result is a system where memory does not sit in storage waiting to be found. It flows through a living topology, finding the agents that need it, surfacing conflicts before they become errors, and crystallizing patterns that no single agent could observe in isolation. Contributions. This paper makes four contributions: 1. We identify the reinterpretation of HNSW graph topology as a communication fabric for multi-agent knowledge propagation—to our knowledge, the first proposal to use navigable small-world graphs for this purpose. 2. We design a complete gossip protocol adapted for semantic knowledge propagation, including an energy-based attenuation model, multi-layer abstraction with promotion via emergent consensus, and standing beacon subscriptions. 3. We provide theoretical analysis grounding the system’s properties in small-world network theory, epidemic broadcast models, and swarm intelligence. 4. We present a reference implementation on PostgreSQL with pgvector and describe deployment in a multi-agent software development workflow. 2 Related Work 2.1 Agent Memory Systems The agent memory landscape has evolved rapidly since 2023. MemGPT/Letta ( Packer et al. 2023 ) pioneered an OS-inspired memory hierarchy—core memory (in-context, analogous to RAM), recall memory (conversation history, analogous to disk), and archival memory (external databases). Its 2025 innovation of “sleep-time compute” separated memory management from active conversation, allowing asynchronous memory refinement. Mem0 ( Yadav et al. 2025 ) implements a two-phase memory pipeline (extraction then update) with an LLM reconciling candidate memories against a vector store, achieving 26% higher accuracy than OpenAI’s memory on the LOCOMO benchmark. Its graph variant (Mem0 g ) uses directed labeled graphs for entity-relation storage. LangMem ( LangChain 2025 ) provides memory tools integrated with LangGraph’s storage layer, supporting semantic, episodic, and procedural memory types. All these systems share a fundamental limitation: memory is something agents read from and write to . No system propagates knowledge between agents through the memory layer itself. A 2025 survey on LLM-based multi-agent system memory ( Zhang et al. 2025 ) confirms that “MAS memory must support coordination across multiple contextual layers,” but identifies no production system achieving this. The A-Mem system ( Xu et al. 2025 ) introduces Zettelkasten-inspired dynamic memory organization where memories self-link, representing the closest academic work to active memory, but operates within a single agent. 2.2 HNSW and Navigable Small-World Graphs The HNSW algorithm ( Malkov and Yashunin 2020 ) constructs a multi-layer proximity graph where Layer 0 contains all data points with dense local connections, and upper layers contain progressively sparser subsets with longer-range links. Layer assignment follows an exponential distribution: \ell(x)=\lfloor-\ln(\text{uniform}(0,1))\cdot m_{L}\rfloor . The structure inherits the small-world properties identified by Watts and Strogatz 1998 —high local clustering combined with short average path lengths scaling as O(\log N) —while satisfying the navigability condition proven by Kleinberg 2000 : greedy routing achieves O(\log^{2}N) delivery time when long-range connections follow P(u\to v)\propto d(u,v)^{-d} . Malkov and Ponomarenko 2016 demonstrated that HNSW achieves this distribution emergently through incremental construction. The 2024 Hub Highway Hypothesis ( Munyampirwa et al. 2024 ) revealed that HNSW graphs naturally develop well-connected hub nodes serving as routing shortcuts, structurally analogous to backbone routers in communication networks. These hubs form without explicit design, emerging from the construction process. No published research uses HNSW topology for communication routing or agent coordination. However, precedents exist in adjacent domains: Symphony ( Manku et al. 2003 ) built a DHT on Kleinberg’s navigable small-world model; Freenet’s darknet ( Clarke et al. 2005 ) used small-world routing for anonymous communication; skip graphs ( Aspnes and Shah 2003 ) generalized the multi-layer structure to distributed settings. 2.3 Gossip Protocols The foundational work by Demers et al. 1987 established two complementary gossip mechanisms: anti-entropy (full state synchronization) and rumor mongering (probabilistic spreading). The SI epidemic model governing gossip follows logistic growth: starting from one informed node in N , approximately N\cdot(1-e^{-fk/N}) nodes are reached after k rounds with fanout f , achieving full propagation in O(\log N) rounds with high probability. SWIM ( Das et al. 2002 ) achieves O(N) message complexity by piggybacking updates on probe/ack

Read the complete text