# Remember something
$ curl -X POST https://mem.prim.sh/v1/collections/my-brain/upsert \
-H "X-402-Payment: $TOKEN" \
-d '{"text": "The user prefers dark mode.", "metadata": {"source": "chat"}}'
# Recall it later
$ curl -G https://mem.prim.sh/v1/collections/my-brain/query \
-H "X-402-Payment: $TOKEN" \
--data-urlencode "text=what does the user like?"
Agents spin up on spawn.sh and disappear. mem.sh persists what they learn so the next instance remembers the past.
Upload manuals, runbooks, FAQs. Query semantically instead of stuffing 50KB of docs into every context window.
A swarm of agents reads and writes to the same collection. One discovers a pattern, all of them learn it.
Store short-lived conversation state and workflow checkpoints in a cheap KV cache beside the vector store.
# Collections
POST /v1/collections # Create collection
# Vectors
POST /v1/collections/:id/upsert # Text → embedding → store
GET /v1/collections/:id/query # Semantic search
# Cache
POST /v1/cache/set # Set key
GET /v1/cache/get # Get key
| Action | Cost | Notes |
|---|---|---|
| Storage | $0.10/GB/mo | Vectors + metadata |
| Write (embed) | $0.0001 | Per 1k tokens |
| Query | $0.0001 | Per search |
| KV cache | $0.01/GB/mo | Ephemeral |