QUICK START GUIDE
Get started with Memory-of-Agents in minutes. Essential API calls and examples to build intelligent applications with persistent memory.
ESSENTIAL API CALLS
AUTHENTICATION
Include your API key in the Authorization header for all requests:
# Set your API key export MEMOF_API_KEY="..." # All requests use this header curl -H "Authorization: Bearer $MEMOF_API_KEY" \ -H "Content-Type: application/json" \ https://api.beta.memof.ai/v1/memories
STORE MEMORY
Store any information in the dual-track memory system:
curl -X POST "https://api.beta.memof.ai/v1/memories" \ -H "Authorization: Bearer $MEMOF_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "User John prefers dark mode and uses keyboard shortcuts", "metadata": { "user_id": "john_doe", "type": "preference", "priority": "high", "tags": ["ui", "accessibility", "shortcuts"] }, "context": { "session_id": "session_abc123", "conversation_id": "conv_456", "timestamp": "2024-08-02T10:30:00Z" } }' # Response { "id": "mem_7x9k2m", "status": "stored", "tracks": { "raw": "verified", "semantic": "processed" } }
SEARCH MEMORIES
Retrieve relevant memories using hybrid search:
# Search with natural language curl -X GET "https://api.beta.memof.ai/v1/memories/search" \ -H "Authorization: Bearer $MEMOF_API_KEY" \ -G -d "query=user interface preferences" \ -d "user_id=john_doe" \ -d "limit=10" # Advanced search with weights curl -X GET "https://api.beta.memof.ai/v1/memories/search" \ -H "Authorization: Bearer $MEMOF_API_KEY" \ -G -d "query=dark mode settings" \ -d "vector_weight=0.7" \ -d "keyword_weight=0.3" \ -d "tags=ui,accessibility" # Response { "memories": [ { "id": "mem_7x9k2m", "content": "User John prefers dark mode...", "relevance_score": 0.94, "metadata": {...}, "created_at": "2024-08-02T10:30:00Z" } ], "total": 1, "search_time_ms": 45 }
UPDATE MEMORY
Update existing memories while preserving history:
curl -X PUT "https://api.beta.memof.ai/v1/memories/mem_7x9k2m" \ -H "Authorization: Bearer $MEMOF_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "User John prefers dark mode, uses vim shortcuts, and likes compact layouts", "metadata": { "tags": ["ui", "accessibility", "shortcuts", "layout"], "priority": "high" } }'
COMMON USE CASES
CHATBOT MEMORY
Give your AI assistant perfect memory of user preferences and conversation history.
# Store user preference
POST /memories → "User likes concise responses"
# Later retrieve context
GET /search → "communication style"
PERSONALIZATION
Build apps that remember and adapt to individual user behaviors and preferences.
# Track user behavior
POST /memories → "Clicked 'advanced mode'"
# Personalize experience
GET /search → "interface preferences"
ANALYTICS & INSIGHTS
Store and analyze user interactions to discover patterns and improve your product.
# Store interaction data
POST /memories → "Feature X used 5 times"
# Analyze patterns
GET /search → "feature usage patterns"
KNOWLEDGE BASE
Create intelligent knowledge systems that learn and remember information over time.
# Store knowledge
POST /memories → "API rate limit is 1000/hour"
# Retrieve when needed
GET /search → "rate limits"
READY TO BUILD?
Questions? Email us at developers@memof.ai