Concepts
Memory
Flapjack agents can store and recall information across conversations. Memory is scoped, embedded, and retrieved via semantic search.
Memory gives agents the ability to remember information across conversations. Unlike knowledge (RAG), which is based on uploaded documents, memory is created dynamically during conversations and persists for future use.
How Memory Works
Conversation happens → Agent stores a memory → Future conversation → Agent recalls memory
Memory entries are embedded with vector embeddings and retrieved via semantic similarity search, similar to RAG but for agent-generated knowledge.
Memory Operations
| Operation | Description |
|---|---|
| Store | Save a fact, preference, or observation for later |
| Recall | Search stored memories by semantic similarity |
Memory Scopes
| Scope | Description | Use Case |
|---|---|---|
agent | Shared across all threads for this agent | User preferences, learned facts |
thread | Specific to one conversation thread | Context within a session |
resource | Tied to a specific external resource | Per-project or per-document notes |
Configuration
Memory is configured per-agent in the Flapjack dashboard under Agent → Memory:
| Setting | Description |
|---|---|
enabled | Turn memory on/off |
auto_collect | Automatically extract and store memories from conversations |
auto_inject | Automatically recall relevant memories at the start of each turn |
inject_count | Number of memories to inject per turn |
max_memories | Maximum stored memories for this agent |
agent_scope | Enable agent-wide memory |
thread_scope | Enable per-thread memory |
resource_scope | Enable per-resource memory |
Example Flow
- User tells the agent: "I prefer TypeScript over Python"
- Agent stores this as a memory (automatically or explicitly)
- In a future conversation, the agent recalls this preference
- Agent tailors its response to use TypeScript examples
Memory vs Knowledge
| Memory | Knowledge (RAG) | |
|---|---|---|
| Source | Created during conversations | Uploaded documents |
| Scope | Agent, thread, or resource | Org, agent, or thread |
| Content | Short facts and preferences | Document chunks |
| Created by | Agent (auto or explicit) | User (upload) |
| Best for | Personalization, learned context | Reference material, FAQs |