curl -X POST "https://api.memanto.ai/agents/my-agent/answer" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What UI does the user prefer?",
"stream": false
}'
{
"agent_id": "my-agent",
"question": "What UI does the user prefer?",
"answer": "The user prefers **dark mode**.",
"sources": [
{
"id": "eff9d310-…",
"score": 0.281,
"text": "[PREFERENCE] Dark mode\n\nThe user prefers dark mode\n\nTags: ui",
"metadata": {
"actor_id": "my-agent",
"memory_type": "preference",
"title": "Dark mode",
"confidence": 0.8,
"provenance": "explicit_statement",
"source": "my-app",
"status": "active",
"tags": [
"ui"
],
"created_at": "2026-11-20T04:25:48.421107476+00:00"
}
}
],
"model": "gemini-3.8-flash",
"context_count": 1,
"used_context": true
}
AI Generation
Answer
Answer a question from the agent’s memories.
POST
/
agents
/
{agent_id}
/
answer
curl -X POST "https://api.memanto.ai/agents/my-agent/answer" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What UI does the user prefer?",
"stream": false
}'
{
"agent_id": "my-agent",
"question": "What UI does the user prefer?",
"answer": "The user prefers **dark mode**.",
"sources": [
{
"id": "eff9d310-…",
"score": 0.281,
"text": "[PREFERENCE] Dark mode\n\nThe user prefers dark mode\n\nTags: ui",
"metadata": {
"actor_id": "my-agent",
"memory_type": "preference",
"title": "Dark mode",
"confidence": 0.8,
"provenance": "explicit_statement",
"source": "my-app",
"status": "active",
"tags": [
"ui"
],
"created_at": "2026-11-20T04:25:48.421107476+00:00"
}
}
],
"model": "gemini-3.8-flash",
"context_count": 1,
"used_context": true
}
Overview
Searches the agent’s memories for the question and has an LLM answer from them. By default the response is streamed as server-sent events:data: {"type": "token", "text": "…"} events as the answer is written, then one final event with the full response object shown below (no type). A failure mid-stream arrives as data: {"error": "…", "detail": "…"}. Set stream: false to get only the final object.
Authentication
Your Memanto Cloud API key (
mk_...). See Authentication.Path Parameters
Body
Model ID from List Models. Defaults to the server’s default model.
curl -X POST "https://api.memanto.ai/agents/my-agent/answer" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What UI does the user prefer?",
"stream": false
}'
{
"agent_id": "my-agent",
"question": "What UI does the user prefer?",
"answer": "The user prefers **dark mode**.",
"sources": [
{
"id": "eff9d310-…",
"score": 0.281,
"text": "[PREFERENCE] Dark mode\n\nThe user prefers dark mode\n\nTags: ui",
"metadata": {
"actor_id": "my-agent",
"memory_type": "preference",
"title": "Dark mode",
"confidence": 0.8,
"provenance": "explicit_statement",
"source": "my-app",
"status": "active",
"tags": [
"ui"
],
"created_at": "2026-11-20T04:25:48.421107476+00:00"
}
}
],
"model": "gemini-3.8-flash",
"context_count": 1,
"used_context": true
}