Skip to content

Kin Memory

KinBot gives every Kin persistent long-term memory — a dual-channel system that combines automatic extraction with explicit storage, searchable via hybrid vector + full-text search.

After every LLM turn, KinBot runs an extraction pipeline that identifies important information from the conversation and saves it as memories. This happens silently in the background — the Kin doesn’t need to do anything.

Each extracted memory includes a source context — a brief description of the conversational context in which the fact was mentioned (e.g. “While discussing weekend plans, user mentioned…”). This gives memories episodic flavor, helping the Kin understand not just what was said but when and why.

Kins can also deliberately save information using the memorize tool:

memorize("Nicolas prefers dark mode and French responses", category: "preference", subject: "Nicolas")

Each memory has a category:

CategoryUse case
factObjective information (names, dates, technical details)
preferenceUser preferences and habits
decisionDecisions that were made and their rationale
knowledgeLearned domain knowledge

Memories have an importance score from 1-10. Higher-importance memories are prioritized during retrieval. The automatic pipeline and the Kin can both set importance.

Before each LLM turn, KinBot:

  1. Takes the current user message
  2. Optionally rewrites the query using recent conversation context for better semantic matching
  3. Searches memories using hybrid search: vector similarity (embeddings) + full-text keyword matching (FTS5)
  4. Injects the most relevant memories into the system prompt

This means the Kin always has relevant context without needing to explicitly recall information.

Kins can also search memory explicitly:

  • recall("Nicolas's infrastructure setup") — semantic + keyword search
  • list_memories(category: "decision") — browse by category
  • search_history("kubernetes deployment") — search past conversation messages
ToolPurpose
recallSearch memories (semantic + keyword, includes shared)
memorizeSave new information (private or shared)
update_memoryUpdate an existing memory (content, category, scope)
forgetDelete a memory
list_memoriesBrowse memories by category or scope
review_memoriesLLM-powered audit for contradictions, duplicates, stale entries
search_historySearch conversation message history

Memories default to private (only the owning Kin can see them), but Kins can mark memories as shared to make them searchable by all other Kins. This is useful for cross-domain facts like infrastructure details, user-wide preferences, or organizational decisions.

  • Use memorize(..., scope: "shared") or update_memory(..., scope: "shared")
  • recall automatically searches both private and shared memories
  • Shared memories include author attribution (e.g. [shared by Assistant])

When a conversation grows beyond the model’s context window, KinBot compacts older messages into a summary. Key points:

  • Original messages are never deleted — they’re preserved in the database
  • The compacting summary is injected at the start of the context window
  • The Kin is informed about compacting: it knows how many messages are visible vs. total, and whether older history was compacted
  • Memories are per-Kin by default — each Kin has its own memory store
  • Shared memories are readable by all Kins but still owned by the creator
  • Vault secrets are never stored in memories (redaction prevents leaking into compacted summaries)