Build chatbots that actually remember who they're talking to
Most chatbots treat every conversation like the first. With Headkey, your bot remembers what users shared last week, tracks evolving preferences as beliefs with confidence, and connects conversation topics into a coherent picture — so users never have to repeat themselves.
Three Primitives, One Cognitive Architecture
Each primitive serves a different purpose. Here's how they work for this use case.
Memories
Remember every conversation, not just the current one
User context, stated goals, and past interactions are stored and retrievable by natural language. Your bot picks up exactly where it left off — days or weeks later.
{
"content": "User is training for their first marathon in April. Currently running 20 miles per week.",
"tags": [
"fitness",
"goals",
"running"
],
"importance": "high"
}Beliefs
Build an evolving model of each user
"User is an intermediate runner" at 0.7 confidence strengthens as more data arrives. When they mention a knee injury, the belief "user can handle high-intensity training" gets superseded — not silently ignored.
{
"statement": "User is an intermediate runner who can handle moderate mileage increases",
"confidence": 0.7,
"subject": "User",
"object": "fitness level"
}Relationships
Connect topics across conversations
When the user asks about meal prep, your bot knows it relates to their marathon training, which connects to their knee concern from last week. Context arrives linked, not flat.
{
"subject": "Marathon Training Plan",
"object": "Nutrition Strategy",
"predicate": "requires"
}Flat Memory vs. Structured Cognition
What changes when your agent has a mind, not just a vector store.
| Dimension | Flat Memory (RAG) | Headkey |
|---|---|---|
| Cross-session context | Every conversation starts from zero | Recalls user history across all sessions |
| User understanding | Treats every statement equally | Evolving belief model with confidence scores |
| Topic connections | Isolated conversation threads | Graph links related topics across conversations |
| Preference changes | Old and new preferences conflict silently | Belief supersession tracks how needs evolve |
Sensory Event Pipeline
Your Agent Doesn't Have to Decide What to Remember
Stream every chat message as a sensory event. The pipeline automatically extracts memories, forms beliefs, and builds relationships.
What goes in
POST /api/v1/sensory/ingest — Messages within a 10-second window are grouped into conversation moments
{
"agentId": "{{agentId}}",
"modality": "read",
"modalityPayload": {
"textContent": "I've been running 25 miles a week now. My knee feels much better since I got new shoes.",
"contentType": "message",
"metadata": {
"channel": "web-chat",
"sessionId": "sess_8f2a"
}
}
}What comes out automatically
No tool calls needed — the pipeline builds these for you
Memories
- User increased weekly running mileage from 20 to 25 miles
- User reports knee improvement after getting new shoes
Beliefs
- User can handle moderate mileage increases (0.80, reinforced)
- New running shoes resolved the knee issue (0.70, new)
Relationships
- Running Shoes → resolved → Knee Injury Concern
- Training Progress → evidence for → Marathon Readiness
See It in Action
A fitness coaching chatbot that remembers user goals across sessions, tracks evolving beliefs about their fitness level, and connects conversation topics.
|Start building your conversational agent
Free to start. Add persistent cognition to any MCP-compatible agent in 60 seconds.