> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Answer

> Answer a question from the agent's memories.

## 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

**x-api-key** `string` *required*

Your Memanto Cloud API key (`mk_...`). See [Authentication](https://docs.memanto.ai/cloud/api/introduction.md#authentication).

## Path Parameters

**agent\_id** `string` *required*

The agent's ID.

## Body

**question** `string` *required*

The question.

**limit** `integer`

Most memories to use as context.

**threshold** `number`

Leave out memories below this relevance, `0.0`–`1.0`.

**kiosk\_mode** `boolean`

Apply a stricter minimum relevance, so the answer only uses clearly relevant memories.

**temperature** `number`

Sampling temperature.

**ai\_model** `string`

Model ID from [List Models](https://docs.memanto.ai/cloud/api/ai/list-models.md). Defaults to the server's default model.

**header\_prompt** `string`

Text added before the prompt.

**footer\_prompt** `string`

Text added after the prompt.

**chat\_history** `array`

Earlier turns, as objects with `role` and `content`.

**stream** `boolean` (default: true)

`false` returns one JSON object instead of a server-sent event stream.

**source** `string`

The calling tool, such as `cursor`.

```bash cURL theme={null}
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
  }'
```

```json 200 - OK theme={null}
{
  "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
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.