Skip to main content

The Core Flow

MemoryLake has two input channels — documents and conversations — that feed into a unified search index. Here is how data flows through the system:
Both channels contribute to the same search results. When you query a workspace, MemoryLake searches across document content and extracted facts together, returning the most relevant results regardless of source.

Document Memory

Document memory comes from files you import into a project from the Library. MemoryLake indexes the content for semantic search, so you can find relevant passages using natural language queries.

How it works

1

Upload to the Library

Upload files to the MemoryLake Library using the Library API. The Library is your central file store — it holds the original files independent of any project.
2

Import into a project

Import documents from the Library into a project using the Import Documents API. This tells MemoryLake to index the file’s content for that project.
3

Indexing

MemoryLake processes the document asynchronously — parsing the content, chunking it, and building a semantic index. Once complete, the document’s content is searchable.

Supported formats

MemoryLake supports common document formats including PDF, Word (.docx), Excel (.xlsx), PowerPoint (.pptx), plain text, Markdown, and images.
For best results, use well-structured documents with clear headings and sections. MemoryLake uses the document structure to produce better search results.

Conversation Memory

Conversation memory comes from user-assistant exchanges that you submit to a project. This is where MemoryLake’s automatic fact extraction happens.

How it works

1

Create a conversation

Create a conversation in a project to group related messages together.
2

Append messages

Submit messages to the conversation one at a time. Include the actor_id so MemoryLake can associate facts with the right participant.
3

Automatic fact extraction

MemoryLake analyzes the messages and extracts structured facts:
  • Project Fact: “The frontend uses React”
  • Project Fact: “Launch target is March”
  • Actor Fact (Jane): context about Jane’s involvement in the decision
Facts are extracted asynchronously, typically within a few seconds of submitting messages.

What gets extracted

MemoryLake identifies and extracts several types of knowledge from conversations:

How Search Unifies Both Channels

When you search a workspace, MemoryLake queries across both document content and extracted facts in a single request:
The response includes results from both channels:
The result merges facts extracted from conversations with passages found in documents. From the caller’s perspective, it is one query, one result set. See the Search API reference for the full set of search parameters and options.

Documents vs. Conversations: When to Use Each

Both channels feed the same search index, but they serve different purposes:
Most applications use both channels. Import your existing documentation as documents, and submit ongoing user interactions as conversations. MemoryLake searches across both seamlessly.

Structuring Messages for Better Extraction

The quality of extracted facts depends on how messages are written. Here are some best practices: Be explicit. “I prefer email notifications” extracts better than “yeah email is fine I guess.” State facts directly. “Our deadline is March 15” produces a clear, useful fact. Vague statements like “we should probably aim for mid-March” produce less precise extractions. Include context. “We chose React for the frontend because of team expertise” gives MemoryLake more to work with than just “React.” Use the actor_id field. Always include the actor ID on user messages. Without it, MemoryLake cannot associate personal facts with the right actor. Send complete exchanges. Include both user and assistant messages. The full context of the conversation helps MemoryLake extract more accurate and relevant facts.
Do not include sensitive information (passwords, API keys, secrets) in conversation messages. Facts are extracted and stored persistently. Treat conversation content the same way you would treat data written to a database.

Next Steps

Quick Start

See the full end-to-end flow in action

Actors & Memory

Deep dive into per-user memory with actors

Conversations API

API reference for creating conversations and messages

Search API

API reference for searching across documents and facts