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
- Text collection — The conversation turn (user message + agent response) is passed to the extraction pipeline
- LLM extraction — A structured prompt asks the model to identify entities and relationships in the text
- 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)
- Graph write — New entities and edges are created; existing ones are reinforced
- Importance scoring — Each entity is scored on novelty, specificity, actionability, and entity density
Entity types
| Type | Examples |
|---|---|
person | Team members, contacts, authors |
team | Engineering, design, sales teams |
event | Meetings, launches, incidents |
concept | Technical terms, decisions, patterns |
market | Products, competitors, sectors |
outcome | Results, milestones, metrics |
document | Reports, specs, runbooks |
Relationship types
| Type | Meaning |
|---|---|
plays_for | Person belongs to team or org |
related_to | General association |
caused_by | Causal link (event ← cause) |
contradicts | Conflicting information between entities |
supports | Evidence or corroboration |
part_of | Hierarchical containment |
preceded_by | Temporal ordering |
correlated_with | Statistical or observed correlation |
mentioned_in | Entity cited in a document |
user_noted | Explicitly flagged by user or agent |
Reinforcement and decay
Entity and edge strength evolves over time:
| Event | Score 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.01 | Node 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.