Memory Overview
Store, search, and manage knowledge in your personal graph with semantic retrieval
The memory adapter provides access to Mirra's internal knowledge graph, enabling you to create, search, update, and delete memory entities. The knowledge graph stores structured information with semantic embeddings, supporting both keyword search and vector-based semantic retrieval.
What is Memory?
The memory system is Mirra's core knowledge storage layer, built on top of Neo4j graph database. It stores various types of entities (tasks, notes, ideas, shopping items, contacts, topics) with relationships and metadata, making information semantically searchable and contextually relevant.
When you create a memory, Mirra performs several operations:
- Entity Creation - Creates a node in the knowledge graph with the specified type and content
- Keyword Extraction - Generates searchable keywords from the content
- Embedding - Creates vector embeddings for semantic search (when available)
- Relationship Linking - Automatically links related entities (e.g., tasks to contacts)
- Graph Assignment - Associates the memory with a specific graph ID for access control
Syntax
Creating a Memory
Memory Structure
Memory Types
The memory system supports several predefined memory types, each optimized for specific use cases:
Tasks
Tasks represent actionable items with deadlines, priorities, and completion tracking.
Task-specific metadata:
priority- Task importance (low, medium, high)deadline- Due date (ISO 8601 format)status- Current state (open, in_progress, completed, cancelled)effort_level- Estimated effort (low, medium, high)assigned_to- User ID for delegation
Notes
Notes store general information, observations, and reference material.
Note-specific metadata:
category- Note classification (reference, observation, meeting, learning, personal)importance- Note priority (high, medium, low)tags- Categorization tags
Ideas
Ideas capture concepts, plans, and creative thoughts with feasibility tracking.
Idea-specific metadata:
idea_type- Category (business, creative, technical, personal, improvement)feasibility- Viability assessment (high, medium, low, research_needed)development_effort- Estimated work (weekend_project, month_project, major_undertaking)
Shopping Items
Shopping items manage shopping lists with store preferences and priorities.
Shopping item metadata:
priority- Purchase urgency (low, medium, high)store_preference- Preferred retailercategory- Product categorystatus- Purchase state (open, purchased, cancelled)
Topics
Topics represent general knowledge, concepts, and subjects for semantic linking.
Contacts
Contacts store information about people, including relationships and context.
Search Capabilities
The memory adapter provides three complementary search methods:
Semantic Search
Semantic search uses vector embeddings to find conceptually similar memories, even when exact keywords don't match.
Returns memories ranked by semantic similarity score (0.0 to 1.0).
Query (Filtered Search)
Query enables precise filtering by type, status, metadata fields, and graph context.
Supports pagination and complex filtering logic.
Find One
Find a specific entity by ID or unique criteria.
Graph-Based Access Control
All memory operations respect graph-based permissions. Memories are associated with a graph ID that determines who can access them:
- Personal Graph (
user:{userId}) - Private memories accessible only by the owner - Group Graphs (
group:{groupId}) - Shared memories accessible to group members - Contact Graphs (
user_contact:{contactId}) - Memories shared in direct conversations
By default, memories are created in your personal graph. The graph ID is automatically determined from the service context (authenticated user, delegated visitor, or service account).
Memory Operations
The memory adapter provides comprehensive CRUD operations:
- Create - Add new memory entities to the knowledge graph
- Search - Semantic search across all memory types
- Query - Filtered search with pagination and type filtering
- Find One - Retrieve a specific entity by ID or criteria
- Update - Modify existing memory content and metadata
- Delete - Remove memory entities from the graph
- Upload Document - Add documents with automatic chunking and embedding
- Search Documents - Semantic search across document chunks
- Get Document Chunks - Retrieve document chunks for a specific document
- Get Document Status - Check document processing status
Aggregation Operations
The memory adapter implements aggregation operations for analytics and reporting:
Get Task Completion
Returns task completion statistics over a time range:
Get Upcoming Reminders
Returns upcoming tasks and deadlines:
Get Memory Stats
Returns general statistics about stored memories:
Next Steps
- Operations - Complete API reference for all memory operations
- Examples - Practical code examples and patterns
- Technical Notes - Graph structure, embeddings, and best practices