Memory Types
Understanding how Engram classifies and organizes memories
Memory Types
Engram automatically classifies every memory into one of five categories. Classification happens at ingestion time through the /v1/intelligence and /v1/store endpoints, so you never need to manually sort memories.
Categories
preference
User preferences, opinions, and choices. These shape how an AI assistant behaves.
- "I prefer dark mode"
- "Use TypeScript over JavaScript"
- "Always respond in bullet points"
decision
Decisions made by a person or team. Captures the what and often the why.
- "We chose the relational database for this project"
- "Migrating to cloud next quarter"
- "Deprecating the v1 endpoint in June"
fact
Objective, verifiable information. Reference data that doesn't change often.
- "The API rate limit is 100 req/min"
- "Python 3.12 released Oct 2024"
- "The office is at 123 Main St"
entity
People, systems, places, and their relationships.
- "John is the CTO at Acme Corp"
- "Brain 3 is at 10.0.0.12"
- "The staging cluster runs on k3s"
other
Everything that doesn't fit the above categories. Engram still stores, embeds, and indexes these memories identically.
Automatic Classification
When you store a memory, Engram classifies it automatically:
curl -X POST https://api.engrammemory.ai/v1/store \
-H "Authorization: Bearer pr_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"text": "We decided to use a caching layer for session management"
}'
Response:
{
"id": "mem_8f3a1b2c",
"text": "We decided to use a caching layer for session management",
"category": "decision",
"importance": 0.7,
"created_at": "2026-04-10T14:30:00Z"
}
Overriding Classification
Pass the category parameter to override auto-classification:
curl -X POST https://api.engrammemory.ai/v1/store \
-H "Authorization: Bearer pr_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"text": "The caching layer stores data in memory for fast access",
"category": "fact"
}'
from engrammemory import Engram
client = Engram(api_key="pr_live_xxxxx")
# Auto-classified
memory = client.store("We chose the relational database for this project")
print(memory.category) # "decision"
# Manual override
memory = client.store(
"The caching layer stores data in memory for fast access",
category="fact"
)
import { Engram } from 'engrammemory-ai';
const engram = new Engram({ apiKey: 'pr_live_xxxxx' });
// Auto-classified
const memory = await engram.store('We chose the relational database for this project');
console.log(memory.category); // "decision"
// Manual override
const memory2 = await engram.store('The caching layer stores data in memory for fast access', {
category: 'fact',
});
Importance Scoring
Every memory receives an importance score between 0.0 and 1.0. This float value affects two things:
- Recall priority -- Higher-importance memories rank higher in search results when relevance scores are close.
- Lifecycle decay -- Lower-importance memories decay faster and may be archived or pruned sooner.
You can set importance explicitly:
curl -X POST https://api.engrammemory.ai/v1/store \
-H "Authorization: Bearer pr_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"text": "Production database credentials rotated on April 1",
"importance": 0.95
}'
When omitted, Engram assigns importance automatically based on the content's specificity, actionability, and category.