THE MEMORY MODEL

A memory, modeled as a note.

The memory node is the basic unit of storage. A short, retrieval-shaped title is the anchor; the body carries the why, the trap and the rationale that gets handed back to the agent on a strong hit.

teamgraph query
$weeks later, in different words
$teamgraph query "why are constraints inside my nested request object ignored?"
  "hit":  "STRONG",
  "title": "Spring @Valid must also be applied to nested DTO fields",
  "body":  "Without @Valid on the nested field, validation does not cascade…"
Different prompt, same underlying problem — surfaced, not re-derived.
ANATOMY OF A NOTE

Five fields. One of them matters most.

Writing good titles is the most important thing you can do. The title is the retrieval anchor — the specific, complete sentence someone would be looking for when they need this memory.

title

A short, retrieval-shaped statement of what you learned, phrased as an answer. This is what semantic search matches against.

the anchor

body

The full context: the why, the trap, the workaround, the decision rationale. Injected into the agent's context on a STRONG hit.

the payload

keywords

One or more tags, like spring-boot or gotcha. Keywords create the edges that link a note to related ones.

the links

author & TTL

Who or which agent wrote it (defaults to user@host), and an optional expiry after which the note is hidden and cleaned up.

provenance
Vague in, weak out. A title like "Spring Boot issue" produces weak hits; "Spring Boot @Valid does not cascade to nested DTOs" produces STRONG hits even with different query phrasing.
THE SEMANTIC CACHE

A lookup that won't make things up.

What distinguishes TeamGraph from a plain vector search is the verify step. A low-confidence cosine hit does not become a STRONG response — it refuses to hallucinate a match.

EmbedThe query text becomes a 1024-dim BGE-M3 vector.
MatchFind the closest nodes by cosine similarity in the vector index.
VerifyCombine lexical trigram-Jaccard and cosine to gate the hit.
A stale note stays searchable because doubtful context beats none — but every result reports its state, so a stale hit is a lead to verify, never an answer.

STRONG

Both semantic and lexical signals pass the gate. High confidence. Returns title and body — the agent can quote it.

WEAK

Semantic passes but lexical is low. Returns title only; the body is null on purpose. Treat it as a hint, not a fact.

MISS

No candidate passes the gate. Returns a short fallback list of close neighbors so the caller doesn't have to widen the search.

THE GRAPH

Notes, connected.

TeamGraph does not store memories as isolated items — it connects them into a graph. Keyword and semantic edges are walked in both directions when you explore, regardless of which note was inserted first.

Walk the graph
KEYWORDTwo notes share a keyword
SEMANTICTwo notes are embedding-similar
SUPERSEDESA new note replaces an older one
CONTRADICTSTwo notes conflict, not yet resolved
STATE & SCOPE

Knowledge changes.
History doesn't disappear.

When a stored fix turns out wrong, the old note is superseded — moved out of results but kept in the database, with a traversable edge to its replacement. That is safer than deleting knowledge that changed.

Four lifecycle states

ACTIVE and STALE notes are returned by queries (with their state reported); SUPERSEDED and RETIRED notes are left out but kept for audit and later restore.

Three scopes

Every note is private, team or shared. Private notes never leave your device — excluded from sync by construction, not policy.

Profiles

A profile is a fully isolated memory space — its own database, daemon and config. Keep personal, work and per-project memory apart, and merge or export when you want to.

WRITE IT DOWN ONCE

Give your agent a memory worth trusting.

Good titles in, confident answers out — and a MISS instead of a guess when there's nothing good to say.