SmartMemory
POST
/memory/ask

Answer a question from stored memories and their one-hop graph relations.

400 on a blank question or an out-of-range limit — a caller error that must surface rather than be silently normalized. 502 when the configured LLM errors or returns nothing: there is deliberately no fallback answer, because a fabricated one is indistinguishable from a grounded one at the point it is read.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for POST /memory/ask.

Response Body

application/json

application/json

curl -X POST "https://example.com/memory/ask" \  -H "Content-Type: application/json" \  -d '{    "question": "string"  }'
{
  "answer": "string",
  "reasoning": "string",
  "evidence": [
    {
      "item_id": "string",
      "content": "string"
    }
  ],
  "relations": [
    {
      "source": "string",
      "type": "string",
      "target": "string",
      "source_id": "string",
      "target_id": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}