Working with Memory
This guide covers the common patterns for working with Engrammic: picking layers, setting decay, tagging, linking, and updating.
Picking a layer
Section titled “Picking a layer”| You have | Use | Layer |
|---|---|---|
| Observation, no source | remember | Memory |
| Claim with source | learn | Knowledge |
| Conclusion from facts | believe | Wisdom |
| Reasoning right now | reason | Intelligence |
Setting decay
Section titled “Setting decay”Memory nodes decay over time. You pick the decay class when you write:
{ "tool": "remember", "arguments": { "observation": "Deadline is Friday", "decay_class": "ephemeral" }}| Class | Half-life | Use for |
|---|---|---|
ephemeral | 7 days | Session context |
standard | 90 days | Default |
durable | 540 days | Frequent references |
permanent | 5 years | Foundational |
Tagging
Section titled “Tagging”Tags make recall more precise. Add them when you store:
{ "tool": "remember", "arguments": { "observation": "Auth uses JWT RS256", "tags": ["auth", "security"] }}Then filter by tag when you query:
{ "tool": "recall", "arguments": { "query": "auth", "tags": ["security"] }}Confidence
Section titled “Confidence”When you use learn, the confidence score indicates how much to trust the source:
| Score | Source quality |
|---|---|
| 0.9+ | Official docs, verified |
| 0.7-0.9 | Reputable blogs, internal docs |
| 0.5-0.7 | Forums, inference |
| <0.5 | Speculation |
Linking
Section titled “Linking”You can create explicit relationships between nodes:
{ "tool": "link", "arguments": { "from_node": "node_auth", "to_node": "node_jwt", "relationship": "IMPLEMENTS" }}Available relationship types: SUPPORTS, CONTRADICTS, CAUSES, PREVENTS, IMPLEMENTS, EXTENDS, RELATES_TO.
Updating
Section titled “Updating”When information changes, supersede rather than delete. This preserves history:
{ "tool": "learn", "arguments": { "claim": "Rate limit is 200 req/min", "evidence": "https://docs.example.com/changelog", "supersedes": "node_old" }}The old node stays in the graph with an edge to the new one, so time-travel queries still work.