Memory for agents.
Managed vector database. Ephemeral cache. Long-term knowledge retrieval. Give your agent a hippocampus, gated by x402.
# 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?"
x402 auth
Vector store
Session cache
Embeddings included
Part of agentstack

What agents use it for

Long-term memory

Agents spin up on spawn.sh and disappear. mem.sh persists what they learn so the next instance remembers the past.

Knowledge retrieval (RAG)

Upload manuals, runbooks, FAQs. Query semantically instead of stuffing 50KB of docs into every context window.

Shared context

A swarm of agents reads and writes to the same collection. One discovers a pattern, all of them learn it.

Session caching

Store short-lived conversation state and workflow checkpoints in a cheap KV cache beside the vector store.

API reference

# 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
  

Pricing

ActionCostNotes
Storage$0.10/GB/moVectors + metadata
Write (embed)$0.0001Per 1k tokens
Query$0.0001Per search
KV cache$0.01/GB/moEphemeral

Memory is an API call.

Agents don't have a hippocampus. They have vectors.

Read the docs →