Skip to content
Navigation

Search memory graph

Search the user's knowledge graph for relevant facts and entities.

Uses hybrid retrieval (BM25 + cosine + graph traversal + cross-encoder reranking) to find the most relevant memory edges.

POST
https://truememory-api.mvstg.com/memories/search
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
    maxLength: 5000 · minLength: 1
  • agent_idstringrequired
  • max_resultsoptionalinteger
    maximum: 50 · minimum: 1 · default: 10
  • created_afteroptional

    Only return memories created after this datetime

    One of the following:

    • string
    • null
  • created_beforeoptional

    Only return memories created before this datetime

    One of the following:

    • string
    • null
  • graph_idsoptional

    Shared knowledge graphs to blend into the search alongside the user's own memory. Results from these come back tagged scope="graph" with their graph_id.

    One of the following:

    • array<string>
    • null
  • visibilityoptional

    Optional. Keep only facts whose both endpoint nodes carry this visibility — 'public' therefore returns facts that expose no private node, which is what makes them safe to surface outside the owner's private view. Omit for no visibility filtering. Every result reports source_visibility and target_visibility regardless, so you can filter on your own terms instead.

    One of the following:

    • string
    • null

Returns

200

Successful Response

JSON
  • 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_labelsarray ofstringrequired
  • target_labelsarray ofstringrequired
  • source_descriptionsarray ofstringrequired
  • source_visibilityprivateorpublicrequired
  • target_visibilityprivateorpublicrequired
  • scopeuserorgraphrequired
  • graph_idrequired

    Set only when scope is graph.

    One of the following:

    • string
    • null

422

Validation Error
JSON
  • detailoptionalarray ofobject
    • locarray ofrequired

      One of the following:

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

Type to search…

↑↓ navigate↵ selectEsc close