How It Works
beginnerUnderstand Engramma's 10-phase cognitive cycle — from storing a memory to retrieving it with confidence scores and explanations.
The big picture
When you call client.store() or client.retrieve(), Engramma doesn't just save or search vectors. It runs a 10-phase cognitive cycle — a pipeline that encodes, routes, scores, strengthens, and explains your memories.
Think of it as the difference between a hard drive (stores bytes) and a brain (processes, connects, and reasons about information).
The 10-phase cycle
Here's what happens every time you interact with Engramma:
Neuromodulation
Encoding
Pathway Selection
Plasticity
Integration
Semantic Linking
Causal Discovery
Regime Detection
Temporal Tracking
Consolidation
What you observe as a user
You don't need to understand the internal phases to use Engramma. Here's what you actually see:
| You do... | Engramma does... | You get... |
|---|---|---|
store("fact") | Phases 1-7 run | A pattern_id + importance score |
retrieve("query") | Phases 1-5 run | Ranked results with confidence + pathway |
explain("query") | Phases 1-5 + XAI | Human-readable reasoning chain |
consolidate() | Phase 10 runs | Strengthened/pruned memory state |
stats() | Reads current state | Pattern count, regime, health metrics |
A concrete example
Let's trace what happens when you store and retrieve a memory:
from engramma_cloud import EngrammaClient
import os
client = EngrammaClient(api_key=os.environ["ENGRAMMA_API_KEY"])
# Store three related facts
client.store("Alice manages the backend team")
client.store("The backend team uses Python and Go")
client.store("Alice prefers async architectures")
# Retrieve — the engine connects these facts
results = client.retrieve("What languages does Alice's team use?")
print(results[0].text) # "The backend team uses Python and Go"
print(results[0].confidence) # 0.87
print(results[0].pathway) # "attention"
# The engine used the Attention pathway because the query
# requires connecting "Alice" → "backend team" → "languages"
# (multi-hop reasoning, not a direct text match)Notice how the engine answered "What languages does Alice's team use?" even though no single stored fact contains both "Alice" and "languages." The Attention pathway connected the dots across memories.
Latency
The full 10-phase cycle completes in milliseconds:
| Operation | Typical latency |
|---|---|
| Store (text) | 3-8 ms |
| Retrieve (top 5) | 2-5 ms |
| Explain | 5-12 ms |
| Consolidate | 50-200 ms (background) |
These numbers scale with your memory count. At 100K patterns, retrieve stays under 10ms thanks to optimized index structures.
What makes this different from embeddings + cosine search
A vector database does step 2 (encode) and a simplified version of step 5 (rank by cosine similarity). That's 2 out of 10 phases.
Engramma adds:
- Adaptive routing — not every query needs the same retrieval strategy
- Causal links — memories don't exist in isolation, they form a graph
- Temporal awareness — recent and frequently-accessed patterns rank higher
- Self-monitoring — the engine detects when it's in unfamiliar territory
- Consolidation — memory quality improves over time without re-indexing
Next steps
- Memory Types — Deep dive into the three pathways
- Explainability — How to interpret confidence scores
- Quickstart — Try it yourself in 5 minutes