Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bytedance/deer-flow/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Memory API provides endpoints to retrieve and manage DeerFlow’s global memory system. Memory stores user context, conversation history, and facts across all threads for personalized AI interactions.Get Memory Data
GET /api/memory
Retrieve the current global memory data including user context, history, and facts
Response
Memory schema version
Last update timestamp (ISO 8601 format)
User context sections
Historical context sections
List of memory facts
Example Request
Example Response
Reload Memory Data
POST /api/memory/reload
Reload memory data from the storage file, refreshing the in-memory cache
Response
Returns the reloaded memory data (same structure as GET /api/memory).Example Request
Use Case
Use this endpoint when the memory file has been modified externally and you need to refresh the cached data without restarting the server.Get Memory Configuration
GET /api/memory/config
Retrieve the current memory system configuration
Response
Whether memory is enabled
Path to memory storage file (relative to project root)
Debounce time for memory updates (seconds)
Maximum number of facts to store
Minimum confidence threshold for facts (0-1)
Whether memory injection is enabled
Maximum tokens for memory injection into prompts
Example Request
Example Response
Get Memory Status
GET /api/memory/status
Retrieve both memory configuration and current data in a single request
Response
Memory configuration (same as GET /api/memory/config)
Memory data (same as GET /api/memory)
Example Request
Example Response
Memory System
How Memory Works
- Collection: Memory is collected from conversations across all threads
- Storage: Memory data is persisted to a JSON file (
.deer-flow/memory.json) - Injection: Memory is automatically injected into AI prompts when enabled
- Updates: Memory is updated with debouncing to prevent excessive writes
Memory Categories
User Context
- workContext: Work-related information and current projects
- personalContext: Personal preferences, communication style
- topOfMind: Current priorities and focus areas
History Context
- recentMonths: Recent development activities and conversations
- earlierContext: Historical context from earlier periods
- longTermBackground: Long-term background information
Facts
Structured facts extracted from conversations:- preference: User preferences (e.g., coding style, tools)
- skill: User skills and expertise
- context: General contextual information
- goal: User goals and objectives
Confidence Scores
Facts have confidence scores (0-1) indicating reliability:- 0.9-1.0: High confidence (explicitly stated by user)
- 0.7-0.9: Medium confidence (inferred from behavior)
- 0.5-0.7: Low confidence (weak signals)
- < 0.5: Very low confidence (filtered out by default)
Configuration
Memory can be configured in your application config:Parameters
- enabled: Enable/disable memory system
- storage_path: Path to memory JSON file
- debounce_seconds: Wait time before writing updates
- max_facts: Maximum number of facts to store
- fact_confidence_threshold: Minimum confidence to keep facts
- injection_enabled: Enable/disable memory injection into prompts
- max_injection_tokens: Maximum tokens to inject
Use Cases
Display Memory Data
Filter High-Confidence Facts
Check Memory Status
Reload Memory
Related
Memory System
Learn about the memory system
Gateway Overview
Learn about the Gateway API