Skip to content
Navigation

Retrieve memory context for a message

Retrieve the full memory context that would be injected during a chat turn.

Runs the same pipeline as POST /v1/chat/completions — session context via cache/fallback, low-information gating, and per-message graph search. Returns raw data, rendered prompts, and cache diagnostics.

POST
https://truememory-api.mvstg.com/memories/retrieve
View as Markdown

Authorization

  • HTTPBearerHTTPrequired

Header parameters

  • X-On-Behalf-Ofoptional

    One of the following:

    • string
    • null
  • X-External-User-Idoptional

    One of the following:

    • string
    • null
  • X-App-Idoptional

    One of the following:

    • string
    • null

Request bodyJSONrequired

  • querystringrequired

    The user message to retrieve memories for

    maxLength: 5000 · minLength: 1
  • agent_idstringrequired
  • display_nameoptional

    User display name rendered into the context prompt (chat parity)

    One of the following:

    • string
    • null
  • emailoptional

    User email rendered into the context prompt (chat parity)

    One of the following:

    • string
    • null
  • graph_idsoptional

    Shared knowledge graphs to blend into the per-message retrieval alongside the user's own memory.

    One of the following:

    • array<string>
    • null

Returns

200

Successful Response

JSON
  • querystringrequired
  • user_idstringrequired
  • agent_idstringrequired
  • elapsed_secondsnumberrequired
  • promptrequired

    One of the following:

    • string
    • null
  • contextobjectrequired
    • dataobjectrequired
      • entitiesarray ofobjectrequired
        • namestringrequired
        • summaryrequired

          One of the following:

          • string
          • null
      • factsarray ofstringrequired
    • promptrequired

      One of the following:

      • string
      • null
    • elapsed_secondsnumberrequired
    • cache_hitbooleanrequired
    • cache_age_secondsrequired

      One of the following:

      • number
      • null
    • sourcestringrequired

      Where the context came from, e.g. cypher_fallback.

    • prefetch_in_flightbooleanrequired
    • cache_sizeintegerrequired
  • retrievalobjectrequired
    • low_info_skippedbooleanrequired
    • resultsarray ofobjectrequired
      • idstringrequired
      • namestringrequired
      • contentstringrequired
      • created_atrequired

        One of the following:

        • string
        • null
      • valid_atrequired

        One of the following:

        • string
        • null
      • source_namerequired

        One of the following:

        • string
        • null
      • target_namerequired

        One of the following:

        • string
        • null
      • source_descriptionsarray ofstringrequired
      • scopeuserorgraphrequired
      • graph_idrequired

        One of the following:

        • string
        • null
    • promptrequired

      One of the following:

      • string
      • null
    • errorrequired

      One of the following:

      • string
      • null
    • elapsed_secondsnumberrequired
    • result_countintegerrequired

422

Validation Error
JSON
  • detailoptionalarray ofobject
    • locarray ofrequired

      One of the following:

      • string
      • integer
    • msgstringrequired
    • typestringrequired
    • inputoptionalunknown
    • ctxoptionalobject

Type to search…

↑↓ navigate↵ selectEsc close