Getting Started with RememberOS
Give your agents shared, persistent memory in under 10 minutes — from your first key to your first store/recall cycle, on memory your organization owns.
Most AI agents forget everything between sessions. Your chatbot doesn't remember the user's name. Your coding assistant can't recall the project structure. Your support agent asks the same questions every time.
RememberOS fixes this. It's the organizational memory layer for humans and AI agents — semantic search, automatic relevance scoring, and hybrid retrieval (vector + keyword), on infrastructure your organization controls (EU-hosted, self-hostable, bring your own model).
Let's build a simple agent that remembers user preferences.
1. Get Your API Key
Sign up at rememberos.ai and grab your API key from the dashboard. Free tier includes 1,000 memories and 10,000 queries per month.
2. Store Your First Memory
Let's store a user preference:
import requests
API_KEY = "mv_your_api_key_here"
BASE_URL = "https://api.rememberos.ai"
# Store a memory
response = requests.post(
f"{BASE_URL}/collections/default/memories",
headers={"X-API-Key": API_KEY},
json={
"text": "User prefers concise technical explanations over simplified ones",
"metadata": {
"user_id": "user_123",
"category": "preference",
"importance": 0.9
}
}
)
memory = response.json()
print(f"Stored memory: {memory['id']}")
That's it. The memory is now stored with:
- Semantic embedding - Automatically generated for similarity search
- Metadata - Filterable fields (user_id, category, importance)
- Timestamp - When it was created
3. Recall Relevant Memories
Now let's retrieve memories based on context:
# User asks a question
user_query = "How should I explain this database concept?"
# Search for relevant memories
response = requests.post(
f"{BASE_URL}/collections/default/search",
headers={"X-API-Key": API_KEY},
json={
"query": user_query,
"filter": {"user_id": "user_123"},
"limit": 5
}
)
memories = response.json()
for memory in memories:
print(f"Relevance: {memory['score']:.2f}")
print(f"Memory: {memory['text']}")
The search returns:
Relevance: 0.87
Memory: User prefers concise technical explanations over simplified ones
Even though the query didn't mention "preferences" or "explanations," the semantic search found the relevant context.
4. Use It in Your Agent
Now integrate memories into your agent's prompt:
def get_agent_response(user_id, user_message):
# Recall relevant memories
memories = recall_memories(user_id, user_message, limit=3)
# Build context from memories
context = "\n".join([m["text"] for m in memories])
# Add to prompt
prompt = f"""
You are an AI assistant. Use this context about the user:
{context}
User message: {user_message}
Respond accordingly.
"""
# Send to LLM (OpenAI, Anthropic, etc.)
response = llm.generate(prompt)
return response
Your agent now:
- Recalls user preferences automatically
- Adjusts responses based on past interactions
- Remembers context across sessions
5. Advanced: Hybrid Search
RememberOS uses hybrid search by default - combining semantic similarity (vector) with keyword matching (full-text). This catches both:
- Semantic: "login broken" matches "authentication failing"
- Keyword: "ticket #4523" matches exact IDs
Example:
response = requests.post(
f"{BASE_URL}/collections/default/search",
headers={"X-API-Key": API_KEY},
json={
"query": "authentication issue ticket 4523",
"mode": "hybrid", # default
"weights": {
"semantic": 0.7,
"keyword": 0.3
}
}
)
6. Automatic Cleanup
Set TTL (time-to-live) on memories to auto-delete after expiry:
requests.post(
f"{BASE_URL}/collections/default/memories",
headers={"X-API-Key": API_KEY},
json={
"text": "User is working on project Alpha this week",
"metadata": {"user_id": "user_123"},
"ttl_seconds": 604800 # 7 days
}
)
After 7 days, the memory is automatically deleted. Use for:
- Session context (short TTL)
- Temporary project info (medium TTL)
- Long-term preferences (no TTL)
What You Just Built
In under 10 minutes, you built an AI agent that:
- Stores structured memories with semantic embeddings
- Recalls relevant context using hybrid search
- Filters by user, category, or any metadata
- Auto-cleans expired memories
No vector database setup. No embedding pipeline. No infrastructure headaches.
Next Steps
- Collections: Separate memories by tenant/project (
/collections/{name}/memories) - Importance scoring: Weight memories by relevance (0.0-1.0)
- Metadata filters: Query by date ranges, categories, custom fields
- Self-hosting: Run RememberOS on your own infrastructure — your memory stays your asset (GitHub)
Full API docs: api.rememberos.ai/docs
Questions? Feedback? Reach out at [email protected] or open an issue on GitHub.