Memory Operations
Add
Write memories from messages or raw content.
POST /v1/memories
Add a conversation (FishMem extracts facts) or raw content (infer: false).
curl https://fishmem.com/v1/memories \
-H "Authorization: Bearer fm_..." \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "I moved to Berlin."}],
"user_id": "alex"
}'| Field | Notes |
|---|---|
messages or content | conversation messages, or raw text |
user_id / agent_id / run_id | scope — see Scoping |
metadata | arbitrary JSON stored with the memory |
infer | false to store raw content without extraction |
Credits: an inferred add costs 2, a raw add costs 1.