Memory

Knowledge Graph Auto-Extraction

After every agent turn, Open Astra automatically extracts entities and relationships from the conversation and adds them to the knowledge graph. This happens in the background — no tool calls or agent configuration required.

Extraction pipeline

  1. Text collection — The conversation turn (user message + agent response) is passed to the extraction pipeline
  2. LLM extraction — A structured prompt asks the model to identify entities and relationships in the text
  3. Fuzzy dedup — Extracted entity names are matched against existing graph nodes to avoid creating duplicates (e.g. "Bob Smith" and "Bob" merging into the same entity)
  4. Graph write — New entities and edges are created; existing ones are reinforced
  5. Importance scoring — Each entity is scored on novelty, specificity, actionability, and entity density

Entity types

TypeExamples
personTeam members, contacts, authors
teamEngineering, design, sales teams
eventMeetings, launches, incidents
conceptTechnical terms, decisions, patterns
marketProducts, competitors, sectors
outcomeResults, milestones, metrics
documentReports, specs, runbooks

Relationship types

TypeMeaning
plays_forPerson belongs to team or org
related_toGeneral association
caused_byCausal link (event ← cause)
contradictsConflicting information between entities
supportsEvidence or corroboration
part_ofHierarchical containment
preceded_byTemporal ordering
correlated_withStatistical or observed correlation
mentioned_inEntity cited in a document
user_notedExplicitly flagged by user or agent

Reinforcement and decay

Entity and edge strength evolves over time:

EventScore change
Entity accessed (retrieved in search)+0.10
Positive user feedback+0.20
Daily decay (stale nodes)× 0.97 per day
Score drops below 0.01Node pruned from graph

This means frequently accessed entities stay strong while unimportant ones fade out automatically. See Relation Decay for more on the decay system.

Manual extraction

The graph_write tool lets agents explicitly add entities and relationships during a conversation — useful when the agent wants to record a decision or relationship it has reasoned about rather than just observed:

yaml
# In agent config — allow the graph_write tool
tools:
  allow: [graph_write, graph_traverse]
Auto-extraction runs after every turn and does not count against the agent's tool call budget. It is a post-processing step, not a tool call.