Skip to main content
Membase transforms raw context into structured, retrievable knowledge that your agents can pull from across sessions. This page walks through the full lifecycle.

Architecture Overview

Membase keeps two complementary knowledge stores, each optimized for a different shape of information. Agents can read and write both through MCP, and Chat in Dashboard can consult both when stored context helps.
Membase architecture diagram
MemoryWiki
What it storesPersonal context: preferences, decisions, habits, meetings, emailsFactual knowledge: docs, specs, references, stable notes
How it’s structuredEpisodes and entities in a knowledge graphMarkdown documents linked with [[wikilinks]], organized into collections
Primary inputAgent conversations (add_memory), Chat in Dashboard, chat history import, app integrations (Gmail, Calendar, Slack)You writing documents in the dashboard, Chat in Dashboard, add_wiki calls from agents, Obsidian vault imports
Primary retrievalsearch_memory (semantic), Chat in Dashboard, graph and table viewssearch_wiki (hybrid: keyword + semantic), Chat in Dashboard, graph and table views
Context from either store flows through three stages: ingest → process → retrieve. The rest of this page walks through each stage for both stores.

1. Context to Membase

How context enters each store.
Memory receives context from imports, agents, Chat in Dashboard, and integrations.
1

Chat History Import (bootstrap)

Already have months of conversations in ChatGPT, Claude, or Gemini? Export your chat history and upload it in the Sources page of your dashboard under the Chat History section. The entire archive goes through the same digesting pipeline as live conversations.
Chat History Import
2

Live agent conversation

You talk to your agent normally. During the conversation the agent picks up on preferences, decisions, project details, and other durable context, and calls add_memory via MCP.
Example
You: "Let's use Zustand instead of Redux for this project.
      Also, I prefer functional components over class components."

→ Agent calls add_memory with this context
3

Chat in Dashboard

While talking directly to your knowledge base in the dashboard, Chat can save durable personal context as memory when you share something worth keeping.
4

App integration sync

Connected sources (Gmail, Google Calendar, Slack) sync new data automatically in the background. Each message, event, or email becomes an episode.
5

Membase receives and queues

Membase queues the incoming memory for processing so the agent or background sync can keep moving.

2. Digesting and Structure

How raw input becomes structured, searchable knowledge.
Every memory (from agents or integrations) goes through the same pipeline.
1

Episode creation

The raw input is saved as an episode, a snapshot of a conversation or data event. Episodes are the building blocks of memory.
2

Entity extraction

Membase identifies key entities from the episode: people, projects, tools, preferences, decisions, dates, and other meaningful concepts.
Example entities from a conversation
"Let's use Zustand instead of Redux"
→ Entities: Zustand, Redux, state management decision
3

Graph construction

Extracted entities are added to your knowledge graph. New entities connect to existing ones when they overlap, so “Zustand” mentioned in two different conversations becomes one entity with two linked episodes.
4

Deduplication and merging

If the same fact appears in multiple episodes, Membase merges them. When new information contradicts an existing memory, the latest data takes priority.
The result is a continuously growing knowledge graph where entities, relationships, and episodes are all interconnected.
Membase knowledge graph

3. Membase to Your Agent

How context flows back when an agent or Chat needs it.
1

Agent calls search_memory

The agent sends a query describing what personal context it needs. This happens automatically when prior context would improve the response.
Example
You: "Set up a new component for the settings page."

→ Agent calls search_memory: "project tech stack, component preferences"
2

Membase searches the knowledge graph

The query is matched against your graph using semantic search. Relevant episodes and their connected entities are retrieved.Relevant results might include:
  • “Uses Next.js with TypeScript”
  • “Prefers functional components”
  • “State management: Zustand”
  • “Styling: Tailwind CSS”
3

Ranked results returned

Results are scored by relevance and returned as episode-centric bundles. Only the most useful context is included, keeping the agent’s context window clean.
4

Agent responds with full context

The agent generates a response grounded in your actual preferences and project details, without you having to repeat any of it.
Here’s a real example: Claude retrieving a git workflow from Membase during a conversation.
Chat in Dashboard can use both search_memory and search_wiki when stored context could help, then combine the results into a single answer with citations. Your agents should do the same when the user’s question could benefit from either store.
This entire cycle (ingest → structure → retrieve) runs continuously as you use Membase. The more you interact, the richer both stores become, and the smarter your agents get.

Next Steps

Attached vs Universal

Understand why shared memory matters.

Membase MCP

Learn about the MCP tools available to your agents.

Memory

Dive into memory exploration and management.

Knowledge Wiki

Dive into wiki documents, collections, and imports.