Skip to main content

Memory

Overview

Memory is Lightflare's saved context. It helps the agent use information that is not in the current message, such as previous chat details, notes you added, or documents you uploaded.

Use memory for information that should be available again later:

  • Team facts, policies, or procedures.
  • Personal preferences and recurring instructions.
  • Project background that comes up across chats.
  • Uploaded reference documents.
  • Important details from a long conversation.

Memory is not a replacement for the current request. If your current message conflicts with saved memory, the current message should be treated as the source of truth.

What Gets Saved

Lightflare can use several kinds of memory:

KindWhat it is useful for
Chat historyKeeping enough context from the current conversation so follow-up questions make sense.
Knowledge notesFacts or instructions you add directly, such as "Use the standard support handoff checklist."
DocumentsUploaded files that should be searchable later.
SummariesCompact versions of long chat history, used so older context can still be useful without replaying every message.

Uploaded documents are searchable by their content, not just by their filename. For example, after uploading a policy PDF, you can ask a question about a specific rule and Lightflare can retrieve the relevant part of the document.

Visibility

Memory can be saved with different visibility:

ScopeWho can use it
SessionOnly the current chat session. Useful for short-lived conversation context.
UserThe owning user across their chats. Useful for personal preferences and recurring work.
PublicShared context available to users. Public memories are intended for team-wide knowledge and are admin-controlled.

Examples:

  • Session memory: "In this chat, we are comparing three vendors." The agent can use that detail for follow-up questions in the same chat.
  • User memory: "When I ask for status updates, format them as short bullet points." The agent can apply that preference in future chats for that user.
  • Public memory: "The company holiday calendar is stored in this uploaded document." The agent can use it as shared reference material.

How Memory Helps During Chat

When you send a message, Lightflare prepares context for the agent. It can include:

  • Recent messages from the same chat.
  • Relevant saved notes.
  • Relevant sections from uploaded documents.
  • Summaries of older chat context.

This lets the agent answer follow-up questions without requiring you to repeat everything.

Example:

  1. You upload a benefits handbook.
  2. Later, you ask, "How many days of parental leave do we offer?"
  3. Lightflare searches the handbook content and includes the matching section for the agent.
  4. The agent answers from the retrieved context.

Another example:

  1. In a chat, you say, "For this launch plan, treat April 30 as the release date."
  2. Later in the same chat, you ask, "What should we do two weeks before release?"
  3. The agent can use the saved session context to understand which release date you mean.

Search Behavior

Memory search is designed to work for both meaning and exact wording.

Lightflare stores memory data in PostgreSQL rather than as markdown files on disk. This makes memory easier to query, filter, secure by scope, and combine with uploaded document records.

Search combines two retrieval styles:

  • Embedding vector search for semantic similarity.
  • PostgreSQL full-text search for exact words and phrases.

Semantic search helps with conceptually related questions:

  • Search: "vacation policy"
  • Possible match: "Paid time off and annual leave rules"

Recent and closely scoped memories are generally more useful than older or broader ones. That helps a current chat detail beat a stale general note when both are relevant.

Managing Memory

The Memories page lets you:

  • Add memory manually.
  • Upload documents.
  • Search saved memory.
  • Filter by owner, session, scope, kind, or status.
  • Archive memory you do not want active anymore.
  • Delete memory you no longer want retained.

Archiving keeps the record but removes it from active use. Deleting marks it as deleted so it no longer appears as active memory.

For runtime settings such as upload storage, search limits, and compaction thresholds, see Memory configuration.