---
title: "Answer"
method: POST
path: "/api/v2/agents/{agent_id}/answer"
tags: ["Sessions & Agents", "Memory Operations"]
---

# Answer

`POST /api/v2/agents/{agent_id}/answer`

Answer a question using RAG (Session-based)

Requires:
- X-Session-Token: {session_token}

Uses Moorcheh's answer.generate endpoint to produce LLM-generated answers
based on the agent's stored memories.

## Path parameters

- `agent_id` string, required

## Headers

- `x-session-token` string, nullable

## Cookies

- `memanto_session_token` string, nullable

## Request body

- AnswerRequest — Request body for answer endpoint
  - `question` string, required — Question to ask
  - `limit` integer, nullable — Number of context memories to use
  - `threshold` number, nullable — Confidence threshold (used only in kiosk mode)
  - `temperature` number, nullable — Temperature for the LLM response
  - `ai_model` string, nullable — AI model to use for generating the answer
  - `kiosk_mode` boolean — Kiosk mode setting

## Response `200`

Successful Response

- AnswerResponse
  - `agent_id` string, required
  - `session_id` string, required
  - `question` string, required
  - `answer` string, required
  - `sources` unknown[]
    - unknown
  - `namespace` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/moorcheh-ai/apis/memanto-memory-that-ai-agents-love.md) · [All operations](https://skmtc.net/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/moorcheh-ai/memanto-memory-that-ai-agents-love/revisions/ff157f2fc5d5/schema)
