Documentation Index Fetch the complete documentation index at: https://mintlify.com/basicmachines-co/basic-memory/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Basic Memory provides powerful search capabilities that help you find information quickly. You can search by:
Full-text content
Note titles
Permalinks and paths
Tags and metadata
Date ranges
Entity types
Basic Search
The simplest way to search is with a text query:
search_notes("coffee brewing")
This searches across all content in your knowledge base, including:
Note titles
Observation content
Relation context
Frontmatter fields
Search Types
Basic Memory supports several search modes:
Text Search (FTS)
Semantic Search
Hybrid Search
Title Search
Permalink Search
Full-text search using SQLite’s FTS5 engine: search_notes( "project planning" , search_type = "text" )
Features:
Fast searching across large knowledge bases
Boolean operators (AND, OR, NOT)
Phrase search with quotes
Prefix matching
Best for:
General content search
Boolean queries
Performance-critical searches
Meaning-based search using embeddings: search_notes( "ideas about performance" , search_type = "semantic" )
Features:
Understands query meaning
Finds conceptually related content
Works with natural language
Best for:
Conceptual queries
Finding related topics
Natural language questions
Requires:
BASIC_MEMORY_SEMANTIC_SEARCH_ENABLED=true
Additional dependencies installed
Combines text and semantic search: search_notes( "authentication security" , search_type = "hybrid" )
Features:
Best of both approaches
Precise keyword matching + conceptual understanding
Automatic result fusion
Best for:
Most general searches
Balanced precision and recall
Unknown query types
Search only in note titles: search_notes( "Authentication" , search_type = "title" )
Best for:
Finding specific notes by name
Quick navigation
When you remember the title
Search by file path or permalink: search_notes( "docs/api/*" , search_type = "permalink" )
Features:
Pattern matching with *
Exact permalink lookup
Path-based filtering
Best for:
Finding notes by location
Bulk operations on folders
Path pattern matching
Boolean Search
Use boolean operators for precise queries:
AND Operator
Find notes containing all terms:
search_notes("coffee AND brewing")
search_notes("authentication AND security AND jwt")
OR Operator
Find notes containing any term:
search_notes("meeting OR discussion")
search_notes("redis OR memcached OR cache")
NOT Operator
Exclude terms from results:
search_notes("project NOT archived")
search_notes("database NOT mongodb")
Grouping
Combine operators with parentheses:
search_notes("(coffee OR tea) AND brewing")
search_notes("(bug OR issue) AND NOT resolved")
search_notes("(api OR endpoint) AND (auth OR authentication)")
Phrase Search
Use quotes for exact phrase matching:
search_notes('"weekly standup meeting"')
search_notes('"pour over coffee"')
search_notes('"technical debt"')
Advanced Filters
Search within specific tags:
search_notes( "architecture" , tags = [ "security" ])
search_notes( "design" , tags = [ "api" , "rest" ])
Filter by Note Type
Search specific note types:
search_notes( "meeting" , note_types = [ "meeting" ])
search_notes( "paul" , note_types = [ "person" ])
search_notes( "project" , note_types = [ "note" , "project" ])
Filter by Entity Type
Search specific entity types:
search_notes( "performance" , entity_types = [ "observation" ])
search_notes( "related" , entity_types = [ "relation" ])
Filter by Date
Find recent or date-range content:
Relative Dates
Absolute Dates
search_notes( "bug" , after_date = "1 week" )
search_notes( "meeting" , after_date = "3 days" )
search_notes( "decision" , after_date = "1 month" )
Filter by Status
Filter by frontmatter status field:
search_notes( "task" , status = "in-progress" )
search_notes( "project" , status = "active" )
Filter using custom frontmatter fields:
Simple Equality
Multiple Filters
Operators
search_notes(
"api" ,
metadata_filters = { "priority" : "high" }
)
Combining Filters
Combine multiple filters for precise results:
search_notes(
"authentication" ,
note_types = [ "note" , "technical" ],
tags = [ "security" ],
after_date = "1 month" ,
metadata_filters = { "status" : "active" }
)
Filter-Only Search
You can search using only filters without a text query:
# All notes with specific tag
search_notes( tags = [ "security" ])
# All notes with specific status
search_notes( status = "in-progress" )
# All recent notes of specific type
search_notes(
note_types = [ "meeting" ],
after_date = "1 week"
)
# Complex filter-only query
search_notes(
metadata_filters = { "priority" : "high" },
tags = [ "urgent" ],
after_date = "3 days"
)
Control result pagination:
# First page (default)
search_notes( "coffee" , page = 1 , page_size = 10 )
# Next page
search_notes( "coffee" , page = 2 , page_size = 10 )
# Larger page size
search_notes( "coffee" , page = 1 , page_size = 50 )
Pattern Matching
Permalink Patterns
Use wildcards in permalink search:
# All notes in a directory
search_notes("docs/*", search_type="permalink")
# Nested pattern
search_notes("projects/*/requirements", search_type="permalink")
# Prefix match
search_notes("auth*", search_type="permalink")
# Suffix match
search_notes("*/2024", search_type="permalink")
Content Patterns
Use special patterns in text search:
# Tag search (FTS mode)
search_notes("tag:security", search_type="text")
# Category search
search_notes("category:decision", search_type="text")
Recent Activity
Find recently updated content:
# Last week's updates
recent_activity( timeframe = "7d" )
# Last 24 hours
recent_activity( timeframe = "24h" )
# Natural language
recent_activity( timeframe = "last week" )
recent_activity( timeframe = "3 days ago" )
Browse Directories
Explore content by location:
# List root directory
list_directory( "/" )
# List specific folder
list_directory( "/docs" )
# With depth
list_directory( "/projects" , depth = 2 )
# Filter by pattern
list_directory( "/notes" , file_name_glob = "*.md" )
Build Context
Navigate the knowledge graph:
# Get context for a topic
build_context( "memory://specs/search" )
# With depth (follow more relations)
build_context( "memory://architecture/auth" , depth = 2 )
# Recent context only
build_context(
"memory://project/planning" ,
timeframe = "1 week"
)
Example Workflows
Finding Meeting Notes
Search by Type
search_notes( note_types = [ "meeting" ])
Filter by Date
search_notes(
note_types = [ "meeting" ],
after_date = "1 week"
)
Add Text Filter
search_notes(
"authentication" ,
note_types = [ "meeting" ],
after_date = "1 week"
)
Finding Technical Decisions
Search by Category
search_notes( "category:decision" )
Add Topic
search_notes( "database category:decision" )
Filter by Tag
search_notes(
"database category:decision" ,
tags = [ "architecture" ]
)
Finding Related Content
Start with Build Context
build_context( "memory://authentication-system" )
Search Related Topics
search_notes( "jwt OR token OR auth" )
Check Recent Changes
search_notes(
"authentication" ,
after_date = "1 week"
)
Search Tips
Begin with a general query, then add filters: # Start broad
search_notes( "performance" )
# Add filters
search_notes( "performance" , tags = [ "optimization" ])
# Narrow further
search_notes(
"performance" ,
tags = [ "optimization" ],
after_date = "1 month"
)
Use OR for exploratory search
Find related concepts with OR: search_notes( "cache OR caching OR cached" )
search_notes( "meeting OR discussion OR standup" )
Combine search with context
Use search to find starting points, then build context: # Find starting point
results = search_notes( "authentication" )
# Build context from result
context = build_context( f "memory:// { results[ 0 ].permalink } " )
Use recent_activity for discovery
When you don’t know what to search for: # See what's been updated
recent_activity( timeframe = "7d" )
# Then search based on what you find
search_notes( "specific topic from recent activity" )
Leverage directory structure
Organize notes hierarchically and search within folders: # Search specific area
search_notes( "docs/architecture/*" , search_type = "permalink" )
# Then search content within
search_notes(
"authentication" ,
note_types = [ "note" ],
# Use metadata filter for path if available
)
Troubleshooting
Try these strategies:
Broaden your search
# Instead of
search_notes( "specific long phrase" )
# Try
search_notes( "specific OR phrase" )
Check spelling
# Try variations
search_notes( "authentication OR authentification" )
Use different search type
# Try semantic instead of text
search_notes( "concept" , search_type = "semantic" )
Remove filters
# Temporarily remove date/type filters
search_notes( "query" ) # without filters
Narrow results with filters: # Add date filter
search_notes( "query" , after_date = "1 month" )
# Add type filter
search_notes( "query" , note_types = [ "note" ])
# Use AND instead of OR
search_notes( "term1 AND term2" ) # more restrictive
Common issues:
Unmatched quotes
# Wrong
search_notes( '"incomplete quote' )
# Right
search_notes( '"complete quote"' )
Invalid operators
# Wrong
search_notes( "term1 & term2" )
# Right
search_notes( "term1 AND term2" )
Special characters
# Avoid
search_notes( "term+with*specials" )
# Use simple terms
search_notes( "term with specials" )
Next Steps
Writing Notes Learn how to write searchable notes
Managing Projects Organize search across multiple projects
Building Context Navigate your knowledge graph
Search API Reference Complete search API documentation