cm-memory is a personal memory storage service. It stores memories from various sources (phone screenshots, bookmarks, watch notes, social media), and uses an AI vision model to generate titles, descriptions, and tags. Runs on port 5003.
API_TOKEN is set, all write endpoints (POST/PUT/DELETE)
require Authorization: Bearer <token>.
List all memories. Supports search and filtering.
| Param | Default | Description |
|---|---|---|
q | — | Full-text search across title, description, content, reference |
source | — | Filter by created_from value |
processed | — | 0 = unprocessed, 1 = processed, blank = all |
page | 1 | Page number (20 per page) |
View a single memory with all fields and screenshot.
Create a new memory.
{
"created_by": "mart", // required
"created_from": "manual", // required — see valid values below
"reference": "https://...", // optional URL
"text": "Some text", // optional
"images": ["<base64>"], // optional — JSON array of base64-encoded images
"audio": "<base64 m4a>", // optional — base64 audio recording
"people": ["mart", "john"], // optional — associated people
"location": "45.50,-73.57", // optional — GPS coords or place name
"status": "pending", // optional — for todos: pending/done/cancelled
"notifications": ["2026-04-01T09:00:00Z"], // optional — reminder datetimes
"memory_refs": ["uuid-1"] // optional — linked memory IDs
}
created_from values (any string accepted)
phone_screenshot · phone_url · raindrop · watch ·
manual · web_clip · twitter · reddit · note ·
interaction · todo · iphone_status
{ "id": "uuid", "created_at": "2025-01-01T00:00:00+00:00" }
Update one or more fields of a memory. Updatable fields:
created_by, created_from, reference, text,
ai_summary, ai_tags, ai_title, images,
ai_processed, ai_processed_at, ai_error, tags,
people, location, notifications, status, memory_refs,
audio, ai_audio_transcription, ai_image_description.
{ "updated": true, "id": "uuid" }
Permanently delete a memory.
{ "deleted": true, "id": "uuid" }
Serve an image file attached to a memory.
Serve an audio file attached to a memory.
View pending memory count and error list.
AI-process up to limit unprocessed memories.
Delegates to cm-ai-router for transcription, image description, and analysis.
Generates ai_title, ai_summary, and ai_tags.
{ "limit": 10 } // optional, default 10, max 50
{ "processed": 8, "errors": [{ "id": "uuid", "error": "..." }] }
Reset all memories with ai_error back to unprocessed so they can be retried.
{ "reset": 3 }
Fetch new bookmarks from Raindrop.io API. Requires RAINDROP_TOKEN env var.
{ "imported": 12 }
Scrape Reddit saved posts via cm-ai-router Playwright. Requires AI_ROUTER_URL and REDDIT_USERNAME.
Browser session in ai-router must be logged in to Reddit.
{ "imported": 5 }
Scrape X/Twitter bookmarks via cm-ai-router Playwright. Requires AI_ROUTER_URL.
Browser session in ai-router must be logged in to Twitter/X.
{ "imported": 7 }
Run a read-only SQL query against the memories table. Only SELECT statements allowed. Designed for LLMs and external tools to search and analyze memory data.
{
"sql": "SELECT id, ai_title, status FROM memories WHERE status = ?",
"params": ["pending"]
}
{
"columns": ["id", "ai_title", "status"],
"rows": [{"id": "uuid", "ai_title": "Buy groceries", "status": "pending"}],
"count": 1
}
View request audit log.
| Param | Default | Description |
|---|---|---|
format | html | Set to json for JSON output |
limit | 50 | Max rows (JSON mode) |
offset | 0 | Skip rows (JSON mode) |
| Variable | Required | Description |
|---|---|---|
API_TOKEN | No | Bearer token for write endpoint auth |
AI_ROUTER_URL | Required for compute | URL of cm-ai-router for transcription, image description, and analysis |
AI_ROUTER_TOKEN | No | Bearer token for cm-ai-router |
RAINDROP_TOKEN | No | Raindrop.io API token |
REDDIT_USERNAME | No | Reddit username for saved posts URL |
PORT | No | Server port (default: 5003) |