Price: $0.01 USDC
Ingest is the easiest way to add memories. Dump a conversation or raw text and MemoClaw will extract facts, deduplicate against existing memories, and optionally create relations between them — all in one call.
Request Body
Array of conversation messages ({role, content}). Provide either messages or text.
Raw text to extract facts from. Provide either messages or text.
Namespace for extracted memories. Default: "default".
Session identifier for multi-agent scoping.
Agent identifier for multi-agent scoping.
Automatically create relations between extracted facts. Default: false.
Response (201 Created)
Array of UUIDs for the stored memories.
Total facts extracted from the input.
Facts that were stored (after deduplication).
Facts that were skipped because they already existed.
Number of relations created between facts (when auto_relate is true).
Tokens consumed by the LLM extraction.
Example
curl -X POST https://api.memoclaw.com/v1/ingest \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "I prefer dark mode and use vim. My timezone is PST."},
{"role": "assistant", "content": "Got it! Dark mode, vim, and PST timezone noted."}
],
"namespace": "default",
"auto_relate": true
}'
{
"memory_ids": [
"550e8400-e29b-41d4-a716-446655440020",
"550e8400-e29b-41d4-a716-446655440021",
"550e8400-e29b-41d4-a716-446655440022"
],
"facts_extracted": 3,
"facts_stored": 3,
"facts_deduplicated": 0,
"relations_created": 2,
"tokens_used": 185
}
Ingest combines extract, dedup, and relate into a single call. If you only need extraction without dedup/relations, use the Extract endpoint instead.