Quick Start
Give your AI agent permanent, encrypted memory in under 5 minutes.
1. Create a Vault
Sign up at memry.ai, then create your encrypted vault with a password. Your password never leaves your device.
2. Generate an API Key
In your dashboard, go to Settings → API Keys and create a new key for your agent.
3. Store a Memory
curl -X POST https://memry.ai/api/v1/memories \
-H "Authorization: Bearer mem_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark theme and concise responses",
"type": "preference",
"importance": 8
}'4. Retrieve Context
curl -X POST https://memry.ai/api/v1/context \
-H "Authorization: Bearer mem_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"query_embedding": [0.1, 0.2, ...],
"limit": 5
}'Tip
Authentication
All API requests require a Bearer token. Generate API keys from your dashboard.
Authorization: Bearer mem_your_api_key| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Content-Type | Yes | application/json for POST requests |
X-Vault-Key | Optional | Encrypted vault key for ZK operations |
Note
Storing Memories
Store memories with automatic importance scoring, type detection, and reinforcement.
POST /api/v1/memories
{
"content": "User's timezone is Singapore (GMT+8)",
"embedding": [0.1, 0.2, ...], // 384-dim vector
"type": "fact", // optional, auto-detected
"importance": 7, // optional, auto-scored
"entities": ["Singapore"], // optional, auto-extracted
"namespace": "personal", // optional, for organization
"session_id": "sess_abc123" // optional, for grouping
}Response
{
"id": "mem_xyz789",
"action": "created", // or "reinforced"
"strength": 1.0,
"mentionCount": 1,
"type": "fact",
"importance": 7
}Tip
| Field | Type | Description |
|---|---|---|
content | string | Memory content (encrypted for ZK mode) |
embedding | number[] | 384-dimensional embedding vector |
type | MemoryType | One of: constraint, identity, relationship, preference, how_to, fact, event |
importance | number | 1-10 scale. Auto-scored if omitted |
entities | string[] | Named entities. Auto-extracted if omitted |
namespace | string | Project/namespace for organization |
session_id | string | Conversation session ID |
metadata | object | Arbitrary JSON metadata |
Retrieving Memories
Retrieve relevant memories using vector similarity search. Memories that are retrieved together strengthen their connections.
POST /api/v1/context
{
"query_embedding": [0.1, 0.2, ...],
"limit": 10,
"namespace": "personal", // optional
"min_strength": 0.3, // optional, filter weak memories
"types": ["fact", "preference"] // optional, filter by type
}Response
{
"memories": [
{
"id": "mem_abc",
"content": "<encrypted>",
"type": "fact",
"importance": 8,
"strength": 1.2,
"similarity": 0.89,
"createdAt": "2026-02-27T10:00:00Z"
}
],
"co_retrieval_strengthened": 3 // edges strengthened
}Note
Heuristic Scoring
MEMRY scores memory importance using deterministic heuristics—no LLM required at extraction time. This keeps costs at zero while maintaining high accuracy.
| Signal | Points | Pattern Examples |
|---|---|---|
Explicit markers | +3.0 | "remember this", "my name is", "I prefer" |
Decision markers | +2.0 | "decided", "going with", "committed to" |
Correction signals | +1.5 | "actually", "no wait", "I meant" |
Emotional intensity | +1.5 | High arousal words, exclamations, ALL CAPS |
Temporal specificity | +1.0 | "January 5th", "next Tuesday", "every morning" |
Causality | +1.0 | "because", "therefore", "as a result" |
Task completion | +1.0 | "done", "shipped", "finished", "failed" |
Entity density | +2.0 | Named entities per sentence |
Scoring Formula
Final_Score = Base_Heuristic_Score (0-7)
+ Context_Modifiers (0-2)
+ Safety_Boost (0-2)
Type_Adjusted = Final_Score × Type_Multiplier
Threshold: ≥ 6.0 for storageTip
Reinforcement
Instead of deduplicating, MEMRY strengthens memories that are mentioned repeatedly. This mirrors how biological memory consolidation works.
Frequency Boost
| Mention Count | Strength Multiplier |
|---|---|
1st mention | 1.0× (base) |
2nd mention | 1.4× (+40%) |
3rd-5th mention | +20% each |
6th+ mention | +5% each (logarithmic) |
Maximum | 2.5× cap |
Strength Update (EMA)
new_strength = (existing_strength × 0.7) + (trigger_intensity × 0.3)
trigger_intensity = heuristic_score / 10Note
Memory Decay
Memories that aren't accessed fade over time, following an Ebbinghaus-inspired forgetting curve. Access resets the decay clock.
Decay Formula
current_strength = base_strength × (0.9 ^ (days_since_access / halflife))Type-Specific Halflives
| Memory Type | Halflife | Rationale |
|---|---|---|
constraint | 180 days | Safety-critical, persists longest |
how_to | 120 days | Procedural knowledge, slow decay |
identity | 120 days | Core self-concept, stable |
fact | 90 days | Encyclopedic knowledge |
preference | 60 days | Tastes can change |
relationship | 30 days | Social data needs maintenance |
event | 14 days | Episodic memories fade fast |
Pruning Strategy
- Strength drops below 0.3 → Memory enters Limbic Archive (soft delete)
- 30 days in archive without access → Hard delete (true forgetting)
- Retrieval resets the decay clock to zero
- 3+ retrievals in a week → +50% halflife boost (consolidation)
Memory Types
Each memory type has different scoring multipliers and decay rates, optimized for its use case.
| Type | Multiplier | Halflife | Use Case |
|---|---|---|---|
constraint | 1.3× | 180 days | Hard limits, allergies, deadlines, must-nots |
identity | 1.2× | 120 days | Self-concept, roles, core values |
relationship | 1.1× | 30 days | Social graph, colleagues, connections |
preference | 1.0× | 60 days | Likes, dislikes, tastes |
how_to | 1.0× | 120 days | Procedures, workflows, recipes |
fact | 0.9× | 90 days | Objective knowledge, properties |
event | 0.8× | 14 days | Specific occurrences, episodes |
Warning
Zero-Knowledge Architecture
MEMRY is designed so the server never sees your plaintext data. All encryption and embedding happens client-side.
What MEMRY Sees
| Component | Server Access | Notes |
|---|---|---|
Memory content | ❌ No | Only encrypted ciphertext |
Embedding vectors | ✅ Yes | Used for similarity search |
Memory metadata | ✅ Yes | Type, importance, timestamps |
Vault password | ❌ No | Never leaves your device |
Arweave wallet | ❌ No | Encrypted with your vault key |
Encryption Flow
1. Agent extracts memory from conversation
2. Agent scores importance (heuristics run locally)
3. Agent generates embedding (local ONNX model)
4. Agent encrypts content with vault key (AES-256-GCM)
5. Agent sends encrypted blob + embedding to MEMRY
6. MEMRY stores without decryption capabilityTip
MCP Server
The MEMRY MCP Server integrates with Claude Desktop and other MCP-compatible agents.
Installation
npm install -g @memry/mcp-serverConfiguration (Claude Desktop)
{
"mcpServers": {
"memry": {
"command": "memry-mcp",
"args": [],
"env": {
"MEMRY_API_KEY": "mem_your_api_key",
"MEMRY_VAULT_PASSWORD": "your_vault_password"
}
}
}
}Available Tools
| Tool | Description |
|---|---|
memry_store | Store an encrypted memory |
memry_search | Search memories by semantic similarity |
memry_context | Get relevant context for a query |
memry_list | List recent memories |
memry_delete | Delete a memory by ID |
Python SDK
The Python SDK provides full ZK encryption with local embeddings via FastEmbed.
Installation
pip install memry-sdkUsage
from memry import MemryClient
client = MemryClient(
api_key="mem_your_api_key",
vault_password="your_vault_password"
)
# Store a memory (auto-encrypted, auto-embedded)
client.store(
content="User prefers dark theme",
memory_type="preference"
)
# Retrieve context
memories = client.context(
query="What are the user's UI preferences?",
limit=5
)
for mem in memories:
print(f"{mem.type}: {mem.content}")Note
fastembed for local ONNX embeddings. No API calls to external embedding services—everything runs locally.