Memory Management
Search Memories
Find relevant memories using semantic search
POST
Search for relevant memories using natural language queries. MemSync uses semantic search with vector embeddings to find memories that match the meaning and context of your query, not just keywords.
Authentication
string
required
Your MemSync API key for authentication
Request Body
string
required
Natural language search query (e.g., “What does the user do for work?”)
integer
default:"10"
Maximum number of memories to return (1-100)
array
Filter results to specific memory categories
boolean
default:"false"
Enable reranking for improved search quality (recommended for complex queries)
boolean
default:"true"
Include user bio in the response
string
Filter results to memories from a specific agent
string
Filter results to memories from a specific conversation thread
Response
string
Auto-generated biographical summary of the user
array
Array of relevant memories matching the search query
Query Examples
Basic Queries
Advanced Queries
Understanding Search Results
Vector Distance
Thevector_distance indicates semantic similarity:
- 0.0-0.3: Highly relevant and closely related
- 0.3-0.6: Moderately relevant
- 0.6-1.0: Less relevant, may be tangentially related
Rerank Score
Whenrerank: true is enabled, the rerank_score provides enhanced relevance:
- 0.8-1.0: Excellent match for the query
- 0.6-0.8: Good match with clear relevance
- 0.4-0.6: Fair match, some relevance
- 0.0-0.4: Weak match, limited relevance
Result Ordering
Results are ordered by relevance:- With reranking: Ordered by
rerank_score(descending) - Without reranking: Ordered by
vector_distance(ascending)
Best Practices
Query Optimization
Use Natural Language
Use Natural Language
Write queries as natural questions rather than keywords
Be Specific
Be Specific
Specific queries often yield better results than generic ones
Use Categories
Use Categories
Filter by categories for more targeted results
Enable Reranking
Enable Reranking
Use reranking for complex or important queries
Performance Tips
- Appropriate Limits: Use reasonable limits (5-15 for most use cases)
- Category Filtering: Reduce search space with relevant categories
- Caching: Cache frequent queries to improve response times
- Batch Processing: Group related searches when possible
Common Use Cases
Personalized Responses
User Analysis
Content Recommendations
Rate Limiting
Search endpoints have enhanced rate limiting:- 50 requests per minute per authenticated user
- Complex queries with reranking may take slightly longer
- Consider implementing client-side caching for frequent queries
Error Codes
Next Steps
Store Memories
Learn how to add memories to search from
User Profiles
Get comprehensive user profiles and insights
Memory Categories
Understand how to use categories effectively
Search Best Practices
Learn advanced search techniques and strategies

