Overview
Thebd memories command lists all stored memories or searches them by keyword. It helps you discover what knowledge has been saved and find specific insights quickly.
Added in: v0.58.0
Syntax
Arguments
string
Optional keyword or phrase to filter memories. Searches both memory keys and content (case-insensitive).
How It Works
The command queries the key-value store for all entries with thekv.memory. prefix. When a search term is provided, it filters memories where either:
- The memory key contains the search term
- The memory content contains the search term
Output Format
Memories are displayed in alphabetical order by key with:- Key - The memory identifier (shown on its own line)
- Content - The stored insight (indented, truncated at 120 characters)
Examples
List All Memories
View everything you’ve stored:Search by Keyword
Find memories about a specific topic:Search by Phrase
Use quotes for multi-word searches:Search Matches Content
Search finds matches in both keys and content:No Results
When no memories match:JSON Output
For programmatic access, add the--json flag:
Use Cases
Quick Reference
Find that configuration detail you stored weeks ago:Knowledge Discovery
Browse all stored knowledge before starting work:Preventing Duplicates
Check if you’ve already stored similar knowledge:Agent Context Building
AI agents can use this to gather project-specific knowledge:Audit Trail
Review what knowledge has been accumulated:Agent Workflow
AI agents should usebd memories to:
- Check existing knowledge before asking questions
- Avoid duplicate storage by searching first
- Build context for unfamiliar projects
- Validate assumptions against stored insights
Sorting and Display
Memories are always sorted alphabetically by key for consistency. The content is truncated at 120 characters to keep the list readable. To see full content, use:Related Commands
bd remember- Store a new memorybd recall- Retrieve full content of a specific memorybd forget- Delete a memorybd prime- Inject all memories into AI context (auto-called by hooks)
Tips
Memories are sorted alphabetically by key, not by creation date. Use descriptive key prefixes to group related memories:
test-*for testing insightsdeploy-*for deployment notesapi-*for API details