Memory
Persistent memory lets your agent remember facts, preferences, and context across conversations. Memories are automatically injected into every interaction.
Memory is automatic
How Memory Works#
Every Lobstack agent has a persistent memory system backed by a database. Memories are key-value pairs organized into categories. When your agent responds to a message, all stored memories are injected into its system prompt so it can reference them naturally.
Auto-Extraction
After each conversation, your agent automatically identifies and stores important facts, preferences, and context. No manual tagging needed.
Prompt Injection
Stored memories are injected into the system prompt as a structured list. Your agent sees them as 'remembered facts' and references them naturally.
Real-Time Sync
When you add, edit, or delete a memory from the dashboard, the change is pushed to your running agent within seconds.
Preserved Across Rebuilds
Memories survive agent rebuilds, model changes, and server tier upgrades. They're stored in the platform database, not on the VM.
Memory Categories#
Memories are organized into 6 categories. The category helps your agent understand the nature of each memory and use it appropriately.
| Category | Purpose | Examples |
|---|---|---|
| user_pref | Communication style and preferences | Prefers concise responses, timezone is EST, likes bullet points |
| fact | Factual information about people, projects, and context | Team lead is Sarah, project deadline is March 30, company uses React |
| context | Active projects and current priorities | Currently migrating to AWS, Q2 OKR is reducing churn by 15% |
| general | Common tasks and patterns | User often asks about deployment status, prefers morning updates |
| personality | Long-term behavior adjustments | User prefers direct answers without caveats, likes code examples |
| skill | Custom agent capabilities | Trained on internal API docs, knows the CI/CD pipeline steps |
Auto-Extraction#
After each assistant message, a lightweight background process analyzes the conversation and extracts memorable information. This happens automatically — your agent learns as you talk to it.
Extraction Rules#
The auto-extraction system follows these rules:
- Extracts up to 3 memories per conversation turn
- Rate-limited to 1 extraction per 60 seconds per agent
- Keys are limited to 100 characters, values to 500 characters
- Duplicate keys are auto-merged — updating the value instead of creating duplicates
- Skips trivial exchanges (greetings, short replies, pure code blocks)
Memory Panel#
The Memory tab in your dashboard provides a visual interface for managing your agent's memories. It features an interactive force-directed graph where memories are displayed as nodes connected to their categories.
Viewing Memories#
Memories appear as colored nodes on the graph, grouped by category. Click any node to see its full details — key, value, category, and last updated timestamp. The center node represents your agent, and category nodes branch out with individual memories attached.
Adding Memories Manually#
Open the Memory tab
Go to your Dashboard and click Memory.
Click Add Memory
Click the + Add Memory button in the top right.
Fill in details
Enter a key (snake_case recommended, e.g. preferred_language), a value, and select a category.
Save
Click save. The memory is instantly pushed to your running agent.
Deleting Memories#
Click any memory node on the graph, then click Delete in the detail panel. A confirmation dialog will appear before removal. Deleted memories are removed from the database and from your agent's next response.
MEMORY.md Configuration#
The MEMORY.md config file controls how your agent uses its memory system. It defines the memory schema, behavior rules, and capture guidelines. Edit it from the Config tab.
# MEMORY — Persistent Context & Knowledge
> Actual memories are stored in the database automatically. This file defines the schema.
## Memory Categories
- **user_pref**: Communication style, timezone, tools, workflows, notification preferences
- **fact**: Team members/roles, project names/deadlines, company context, recurring events
- **context**: Active projects, recent decisions, open questions, current priorities
- **general**: User's domain, common tasks, past solutions, request patterns
## Behavior Rules
1. **Auto-capture**: Store preferences/facts/context automatically — don't ask.
2. **Deduplication**: Update existing memories in place rather than creating duplicates.
3. **Relevance decay**: Deprioritize context unused for 30+ days (don't delete).
4. **Conflict resolution**: Update contradicted memories and note the change.
5. **Privacy**: Never store passwords or full credentials — references only.
## Bootstrapping
Build context naturally: first messages -> communication style; first day -> projects,
team, priorities; ongoing -> refine and update.How Memories Are Injected#
When your agent builds its system prompt, stored memories are appended as a structured section. The agent sees them formatted like this:
## Your Memory (remembered facts about this user)
- **preferred_language**: TypeScript [user_pref]
- **team_lead**: Sarah Chen, Engineering [fact]
- **current_project**: Migrating auth service to OAuth 2.0 [context]
- **timezone**: US/Eastern (EST) [user_pref]This appears after all config files (SOUL.md, PERSONA.md, RULES.md, TOOLS.md, SKILLS.md, MEMORY.md) in the system prompt. The agent can reference any memory naturally in its responses.
Sync & Refresh#
Memory stays in sync between the platform and your running agent through multiple mechanisms:
- Immediate push — Any dashboard change (add/edit/delete) is pushed to the bridge within seconds
- Periodic refresh — The bridge refreshes its memory list every 5 minutes to catch auto-extracted memories
- Startup load — On boot, the bridge fetches all memories from the platform before accepting messages
Memory is safe