curl -X POST "https://api.memanto.ai/agents/my-agent/remember/extract" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I'm vegetarian and I live in Toronto."
},
{
"role": "assistant",
"content": "Noted!"
}
]
}'
{
"agent_id": "my-agent",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Dietary Preference",
"content": "The user is vegetarian.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
},
{
"type": "fact",
"title": "User Location",
"content": "The user lives in Toronto.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 2,
"successful": 2,
"failed": 0,
"results": [
{
"id": "fe52eef5-…",
"status": "stored"
},
{
"id": "f27b1427-…",
"status": "stored"
}
]
}
Memories
Extract Memories
Extract typed memories from a conversation and store them.
POST
/
agents
/
{agent_id}
/
remember
/
extract
curl -X POST "https://api.memanto.ai/agents/my-agent/remember/extract" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I'm vegetarian and I live in Toronto."
},
{
"role": "assistant",
"content": "Noted!"
}
]
}'
{
"agent_id": "my-agent",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Dietary Preference",
"content": "The user is vegetarian.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
},
{
"type": "fact",
"title": "User Location",
"content": "The user lives in Toronto.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 2,
"successful": 2,
"failed": 0,
"results": [
{
"id": "fe52eef5-…",
"status": "stored"
},
{
"id": "f27b1427-…",
"status": "stored"
}
]
}
Overview
Reads a conversation and extracts the durable facts, preferences, decisions and so on as typed memories, using an LLM. Withdry_run: true it returns the candidates without storing them. Stored memories get the tag conversation-extract.
Authentication
Your Memanto Cloud API key (
mk_...). See Authentication.Path Parameters
Body
Model to extract with. See List Models.
dry_run: true the response has candidates and count only. Extracted memories get source: "conversation".
curl -X POST "https://api.memanto.ai/agents/my-agent/remember/extract" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I'm vegetarian and I live in Toronto."
},
{
"role": "assistant",
"content": "Noted!"
}
]
}'
{
"agent_id": "my-agent",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Dietary Preference",
"content": "The user is vegetarian.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
},
{
"type": "fact",
"title": "User Location",
"content": "The user lives in Toronto.",
"confidence": 1,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 2,
"successful": 2,
"failed": 0,
"results": [
{
"id": "fe52eef5-…",
"status": "stored"
},
{
"id": "f27b1427-…",
"status": "stored"
}
]
}