Ebb
Enables using Neo4j as the production backend for the knowledge graph, providing a scalable graph store and access to Graph Data Science algorithms like PageRank, centrality, and community detection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ebb remember that the client prefers email over phone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ebb — an agent-first knowledge graph
Long-term memory for AI agents, built as a graph. Relevance is recency-weighted connection strength: reusing knowledge keeps it alive, unused knowledge decays and is archived, and nothing is deleted until a human signs off. Runs embedded (zero infra) or on Neo4j (production).
The two mechanisms it's built around — connection-weighted relevance and time-decay — are native graph operations, and both have deep prior art (PageRank/centrality; ACT-R base-level activation and spreading activation from cognitive science; spaced-repetition forgetting curves). This is a small, honest implementation of that lineage aimed specifically at agent memory.
Why it's built this way
1. The engine and the interface are separate. The graph store sits behind a
small interface (GraphStore). Agents and the scoring logic never touch a
specific database, so you can run the exact same graph on an embedded engine
today and swap to Neo4j later with one env var.
2. Relevance is recency-weighted, not raw connection count. "More
connections = more relevant" rewards old, heavily-referenced data forever — the
exact stale-data problem the system is meant to kill. Here, every edge's
contribution to relevance is multiplied by a time-decay factor keyed to when the
connection was last reinforced. An edge reinforced yesterday counts near-full;
one last touched six months ago counts for almost nothing. Reusing a connection
(recall/reinforce) resets its clock — so relevance tracks what's actually
live, and stale knowledge sinks on its own.
Proof, from the demo seed graph (python -m ebb.demo):
node raw# activation
decision:outcome-pricing 3 6.116 <- fresh, few links, ranks #1
decision:seat-pricing 11 3.077 <- MOST links, ranks #3
...
note:analysis-* (x10) 1 0.051 <- decayed -> archived (tier 4)The superseded per-seat decision has the highest raw connection count in the graph and still ranks third, behind a fresh decision with a third as many links. Raw count lost; recency won.
Related MCP server: Memory Engine MCP
What's in it
Graph model — every note, decision, meeting, person, client, fact is a node; every reference is a timestamped, typed, weighted edge.
Scoring engine (
scoring.py) — recency-weighted activation, exponential decay (configurable half-life), one hop of spreading activation (a portable stand-in for PageRank), and tier assignment. Pure functions, fully unit-tested.Four archive tiers — 1 hot (default recall) · 2 warm (deeper recall) · 3 cold (archived, on-demand only) · 4 frozen (pending human sign-off before deletion). Pinned nodes never auto-archive.
MCP server (
mcp_server.py) — the agent interface:remember,recall,connect,reinforce,forget,neighbors,pin,maintain,review_queue,stats.Two backends —
KuzuStore(embedded, default) andNeo4jStore(production), same interface, same Cypher shapes.
Quickstart (embedded — zero infra)
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python -m ebb.demo # narrated end-to-end walkthrough
pytest -q # 11 tests, all greenNo Docker, no server, no ports. Kùzu is an in-process graph database, so the
Ebb is just a folder (./ebb_db).
Plug it into an MCP client (e.g. Claude Desktop)
Copy the
ebbblock fromclaude_desktop_config.example.jsoninto your client's MCP config, fixing the absolute paths.Restart the client. The ebb tools appear in the tools menu.
The agent can now
rememberthings across sessions,recallwhat's relevant, andreinforcewhat it keeps using — with decay and archival handled for it.
Production mode (Neo4j)
docker compose up -d # Neo4j + Graph Data Science + APOC
EBB_BACKEND=neo4j NEO4J_PASSWORD=brainbrain python -m ebb.demoSame code, same behavior. On Neo4j you additionally get the GDS library, so the
spreading-activation pass in scoring.py can graduate to real PageRank /
centrality / community detection when scale demands it. (The Neo4j backend's
Cypher mirrors the fully-tested Kùzu backend; run pytest against a live
instance before trusting it in prod.)
The model, briefly
Activation of a node =
Σ (edge.weight × decay(age_since_last_reinforced)) + read-recency-bonus,
plus one damped hop of the same from its neighbours. Decay is a half-life
(default 30 days, tunable). Tiers are cut on the activation normalised against
the most-active non-pinned node. recall blends this activation with query
text-match and returns why each result surfaced. Everything is tunable in one
place — ebb/scoring.py::Config.
Writing an ingestion adapter
Ebb is source-agnostic: anything that calls remember/connect can feed
it. A source (a notes folder, a wiki, an issue tracker) becomes a graph by
mapping documents to nodes, links/mentions to edges, and an edit timestamp to
the recency clock. Keep adapters and their data out of the repo.
Layout
src/ebb/
model.py # Node, Edge, tiers
scoring.py # decay, activation, spreading, tiering <- the core
store.py # GraphStore interface
kuzu_store.py # embedded backend (default)
neo4j_store.py # production backend
engine.py # Brain: remember/recall/connect/reinforce/maintain/...
mcp_server.py # agent-facing MCP tools
seed.py # fictional demo graph
demo.py # narrated walkthrough
tests/ # 11 tests: scoring + end-to-end
docker-compose.ymlLicense
MIT — see LICENSE.
Available Tools
10 toolsconnectA
Create a connection from node src to node dst. If it already exists it
is reinforced (its decay clock resets). rel examples: references, about,
mentions, decided_in, involves, depends_on, contradicts, supersedes.
Inputs: dst (required), src (required), rel, weight.
forgetA
Permanently delete a node and its connections. Prefer letting decay + the tier-4 review queue handle phase-out; use this only for deliberate deletion.
Inputs: node_id (required).
maintainA
Run the decay/archival pass: recompute activation, reassign tiers 1-4, and return the changes plus the tier-4 review queue (items awaiting human sign-off before deletion).
Inputs: no named parameters.
neighborsC
List the direct connections of a node.
Inputs: node_id (required). Returns: result
pinB
Pin (or unpin) a node so it is never auto-archived — a human 'principal' mark on durable knowledge.
Inputs: node_id (required), pinned.
recallA
Retrieve the k most relevant nodes for a query. Ranking blends text match with recency-weighted activation. Archived (cold/frozen) nodes are excluded unless include_cold=True. Each result explains why it surfaced.
Inputs: query (required), k, include_cold. Returns: result
reinforceC
Strengthen and refresh an existing connection you just used again — the spaced-repetition signal that keeps knowledge from decaying.
Inputs: dst (required), src (required), rel.
rememberA
Store a piece of knowledge (note, decision, fact, person, client, ...). Returns its node id. Re-calling with the same node_id updates it. Set pinned=True for durable knowledge that should never be auto-archived.
Inputs: title (required), body, kind, pinned, +1 more.
review_queueC
The tier-4 queue: knowledge that has decayed to the point of proposed deletion and is waiting for a human to confirm or reprieve it.
Inputs: no named parameters. Returns: result
statsB
Graph size, tier distribution, and the most-active nodes right now.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool serves a distinct operation: node creation/update, edge creation, edge reinforcement, query, neighbor listing, deletion, pinning, maintenance pass, review queue access, and statistics. No two tools overlap in purpose.
All tool names are single lowercase words, with most being verbs (remember, connect, reinforce, recall, forget, pin, maintain) and a few nouns (neighbors, review_queue, stats). The style is consistent but mixes verb and noun forms, a minor deviation from a pure verb-noun pattern.
With 10 tools, the server is well-scoped for a knowledge graph with memory decay and archival. Each tool earns its place, covering creation, linking, querying, deletion, and maintenance without unnecessary bloat.
The surface covers the full node lifecycle (remember/forget), edge operations (connect/reinforce), querying (recall/neighbors), and archival (pin/maintain/review_queue). Minor gaps exist—no explicit edge deletion and no direct node fetch by ID—but recall and forget adequately work around these.
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Shared long-term memory vault for AI agents with 20 MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage and query a temporally-aware knowledge graph memory, supporting episode tracking, entity relationships, and semantic search via MCP tools.1-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to have a living memory with atomic knowledge storage, multi-factor recall, organic decay, automatic learning, and graph traversal via MCP.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to have persistent, self-managing memory with bi-temporal supersession, timely forgetting, and recall under a limited context window, using MCP protocol.MIT
- FlicenseNot gradedqualityDmaintenanceProvides persistent, causal memory for AI agents with semantic recall, causal tracking, and importance-based forgetting through MCP tools.-