curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember/extract" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "I prefer email over phone calls"},
{"role": "assistant", "content": "Got it, I will note that preference."}
],
"dry_run": false,
"max_memories": 20
}'
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": true,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"count": 1
}
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 1,
"successful": 1,
"failed": 0,
"results": [
{
"id": "3e681f12-a28c-4d1d-9632-b8dadf1f9d0c",
"status": "stored"
}
]
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Data
Extract Memories
Extract typed memory candidates from chat-style conversation turns.
POST
/
api
/
v2
/
agents
/
{agent_id}
/
remember
/
extract
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember/extract" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "I prefer email over phone calls"},
{"role": "assistant", "content": "Got it, I will note that preference."}
],
"dry_run": false,
"max_memories": 20
}'
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": true,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"count": 1
}
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 1,
"successful": 1,
"failed": 0,
"results": [
{
"id": "3e681f12-a28c-4d1d-9632-b8dadf1f9d0c",
"status": "stored"
}
]
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Overview
Distills a chat-style conversation transcript into typed memory candidates, using the same Moorcheh answer-generation path as the RAG Answer endpoint. Candidates are auto-classified into valid memory types, de-duplicated, confidence-scored, and taggedconversation-extract. Secrets, API keys, and tokens are explicitly excluded by the extraction prompt.
When dry_run is true, candidates are returned without writing. Otherwise the candidates are persisted through the same batch memory path used by Batch Remember.
Authentication
API clients do not send an API key orAuthorization header.
Session token from Activate Agent. Must match
agent_id.Path Parameters
Body
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember/extract" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "I prefer email over phone calls"},
{"role": "assistant", "content": "Got it, I will note that preference."}
],
"dry_run": false,
"max_memories": 20
}'
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": true,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"count": 1
}
{
"agent_id": "my-agent",
"session_id": "sess_abc123",
"dry_run": false,
"candidates": [
{
"type": "preference",
"title": "Prefers email communication",
"content": "User prefers email over phone calls",
"confidence": 0.9,
"source": "conversation",
"provenance": "explicit_statement"
}
],
"total_submitted": 1,
"successful": 1,
"failed": 0,
"results": [
{
"id": "3e681f12-a28c-4d1d-9632-b8dadf1f9d0c",
"status": "stored"
}
]
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
Next Steps
- Remember to store a single memory directly
- Batch Remember to store a pre-built list of memories
- Recall to search stored memories