Skip to content
Docs menu

Concepts

Knowledge graph

Behind the records, TAM keeps a graph of entities, concepts and relations. It improves search and answers "what is connected to what".

What is in the graph

  • Nodes: records, concepts, entities (people, services, libraries), rules and skills.
  • Edges: relations between them, such as a solution linked to the problem it solves, or two records that contradict each other.

Edges come from three places:

  1. You or the agent, explicitly: memory_relate links two records with a type (causal, solution, context, related, contradicts).
  2. Background reflection: after a save, a worker extracts concepts and triples and adds edges, typically within about 30 seconds. With an LLM configured, extraction is richer.
  3. Indexing: memory_graph_index builds or refreshes the graph for existing records, and ingest_codebase adds the structure of a repository (tree-sitter parsing for 9 languages).

How it helps

  • Search. One stage of memory_recall expands the best hits through the graph, so a question about “billing” can reach a record that only mentions “invoices” but is linked to billing.
  • Exploring. memory_graph returns the neighbourhood of a node; memory_concepts lists concepts; memory_associate finds memories through connected concepts rather than keywords.
  • Seeing it. The dashboard has a 3D graph view at http://127.0.0.1:37737/graph/live, plus hive-plot and adjacency-matrix views.

Entities

The same thing is often written differently: “Postgres”, “PostgreSQL”, “pg”. memory_entity_resolve maps a mention to one canonical entity so the graph does not split it into three nodes.

Health

memory_graph_stats reports node and edge counts. On large stores the background orphan backfill (four times a day with the default services) links records that did not get edges at save time.

Found a mistake? Open an issue on GitHub.

Search