Between queries, a database does nothing.
It cannot coordinate. It cannot propagate. It waits. For a single agent that is fine: the agent that stored a fact knows to ask for it again.
A team of agents breaks that assumption. The agent that needs a lesson is usually not the agent that learned it, and it does not know the lesson exists, so it never queries. Context stuffing and notification fan-outs are manual wiring disguised as automation.
HyphaeDB inverts the default. A stored memory becomes a diff released into the mesh, and relevance, not a query, decides where it travels. The filing cabinet becomes a mycelium.
How a memory travels
Four moves, all server-side. None of them are yours to orchestrate.
You store a cell
One call. The server stamps provenance from your authenticated credential and embeds the content.
store(CellInput( cell_type=DECISION, salience=0.9, ))
The cell becomes a diff
Seeded with an energy budget scaled by salience and cell type, its origin fixed forever.
MemoryDiff { origin: immutable, energy: 10 · √0.9 · 2.0, path: [], }The diff walks the mesh
Neighbors are scored; each hop costs energy, and strong edges are cheap. When the diff cannot afford another hop, it stops.
σ = 0.6·relevance + 0.3·interest + 0.1·salience hop_cost = 1 / edge.weight
Inboxes light up
Agents and beacons along the way receive it: live, de-duplicated, replayable after a reconnect.
inbox ▸ delivered deduped · replayable beacon ▸ caught
Reach is a property of what knowledge is
Every diff is seeded once, then spends its way outward. Decisions and constraints travel topology-wide; routine tasks fade within a few hops. Nine cell types, no routing rules to write.
E0 = base_energy × √salience
× type_multiplier| cell type | multiplier | reach | |
|---|---|---|---|
| decision | 2.0× | ~18 hops | |
| constraint | 2.0× | ~18 hops | |
| risk | 1.5× | ~14 hops | |
| pattern | 1.5× | ~14 hops | |
| lesson | 1.2× | ~11 hops | |
| fact | 1.0× | ~9 hops | |
| preference | 0.8× | ~7 hops | |
| context | 0.5× | ~4 hops | |
| task | 0.3× | ~2 hops | |
The thesis, running
Two agents, two credentials, no channel between them. The planner stores a decision and tells no one. The worker planted a beacon and listens.
planner = await HyphaeClient.connect(
ENDPOINT, os.environ["PLANNER_KEY"]
)
await planner.start_session("planner")
await planner.store(CellInput(
cell_type=CellType.DECISION,
content="We use PostgreSQL + pgvector for V1 storage.",
salience=0.9,
))
# stored once. addressed to no one.worker = await HyphaeClient.connect(
ENDPOINT, os.environ["WORKER_KEY"]
)
await worker.start_session("worker")
await worker.place_beacon("decisions about database storage")
# never queries. declares an interest and listens.
async for item in worker.inbox():
print("worker received a memory it never asked for:",
item.delivery.diff_id)
breakworker received a memory it never asked for: 0198…a3f2
No topic strings, no queues, no fan-out list. The planner never learned the worker exists: the beacon declares meaning, and the topology did the work. Run the propagation quickstart; it takes five minutes.
One graph, not two
The HNSW index that answers recall is the same graph that gossip walks. The edges are the gossip channels, so how knowledge is found and how it travels can never drift apart.
Recall is a vector search over the dense base layer, and each SDK keeps a warm local cache in front of it.
Knowledge earns altitude. Five deliveries inside one scene with zero contradictions promotes a cell upward; promotion resets its journey and re-propagates it fresh. Turn on contradiction detection and a confirmed contradiction demotes it: the mesh self-corrects.
# the warm local cache answers; the server on a miss
query = RecallQuery(text="storage engine", k=5)
hits = await client.recall(query)
for hit in hits:
print(hit.score, hit.from_cache, hit.content)Load-bearing invariants
Propagation is only useful if you can trust what arrives. These hold on every surface, for every diff.
- origin is immutableHowever far a diff travels, it names the node that produced it. Provenance survives propagation.
- identity is never self-assertedsource_agent is stamped from the authenticated credential, never from the request body. An agent cannot claim to be another.
- energy is non-increasingEvery hop spends budget, so propagation provably terminates. The mesh cannot flood.
- the path forbids cyclesA node already on a diff's path never processes it again.
- trust gates promotionEach agent carries a trust score. Confirmed deliveries raise it, promotion into shared layers requires it, and with contradiction detection on, contradictions lower it.
Four doors into one organism
One application core speaks four protocol surfaces. Pick the door that fits your client; identity and provenance behave identically behind all of them.
- gRPC :50051
- The primary surface: twelve unary RPCs and a bidirectional inbox stream that replays from your last-seen watermark, then goes live.
- MCP stdio · POST /mcp
- Eleven tools for MCP hosts. One
.mcp.jsonentry gives a Claude Code agent shared memory. - REST :8080
- The HTTP fallback: fully hydrated reads, a consistent error envelope, an OpenAPI-generated reference.
- A2A opt-in
- Off by default. Enable it and agents on Agent2Agent platforms discover an agent card and four memory skills.
SDKs, in-repo today and on the registries at launch: Python hyphaedbTypeScript @hyphaedb/clientRust hyphae-clientGo is planned, not released.
Run it tonight
One compose file brings up the server and Postgres with pgvector. One env var flips on real local embeddings: in-process Candle, or the optional TEI sidecar profile.
git clone https://github.com/hyphae-db/hyphae-core.git
cd hyphae-core
docker compose -f deploy/docker-compose.yml up -d
curl -s localhost:8080/readyz # 200 once the mesh is upAbridged. The full quickstart runs in CI, on every docs change and nightly against HEAD: what the docs show is what the code does.
Operate it like infrastructure
- failover
Active-passive HA on a fenced Postgres lease; the standby promotes itself.
- durability
Postgres is the system of record; the in-memory mesh snapshots and rehydrates as a fast-start cache.
- audit
A tamper-evident, hash-chained audit log; the chain re-verifies from the CLI.
- erasure
Bulk erasure returns a certificate: per-tier removal counts and an audit-verifiable digest.
- observability
A contract-tested hyphae.* metrics catalog behind a Prometheus endpoint.
- observatory
A live, content-free stream of every propagation hop. Watch diffs travel in production.
Plainly
The parts a landing page usually hides.
- Pre-1.0. Today is v0.1.0, and this page claims nothing newer.
- Single-tenant V1. Every query is tenant-scoped in SQL; hard multi-tenant isolation is roadmap, not shipped.
- No benchmarks yet. The numbers above are shipped defaults, not measurements. Benchmarks will arrive with a reproducible harness or not at all.
- Off by default: contradiction detection (it needs a stance classifier you choose to enable) and the A2A surface.
- Go SDK: planned, not released.
If a claim on this page outruns the code, that is a bug. File it.