Retrieving memories

The memory search endpoint lets you search through your stored memories using hybrid semantic and keyword search.

Retrieved results are ranked by relevance to the query and include a score indicating the strength of the match.

import { Fabric } from "@fbrc/sdk";

const api = new Fabric({
  apiKey: process.env.FABRIC_API_KEY,
});

const memoryJob = await api.memory.search({
  query: 'my favourite ice cream flavor',
});

Response:

{
  "hits": [{
    "id": "e51681e7-18c9-4067-b40b-94196915e34a",
    "name": "Favorite ice cream",
    "content": "User likes pistachio ice cream.",
    "createdAt": "2026-02-03 10:16:19.057+00",
    "modifiedAt": "2026-02-03 10:16:19.057+00",
    "score": 0.42,
  }],
  "total": 6,
  "hasMore": false
}

Individual memories

You can also retrieve individual memories by their IDs.

const memoryJob = await api.memory.get({
  id: 'e51681e7-18c9-4067-b40b-94196915e34a',
});

Response:

{
  "id": "e51681e7-18c9-4067-b40b-94196915e34a",
  "name": "Favorite ice cream",
  "content": "User likes pistachio ice cream.",
  "createdAt": "2026-02-03 10:16:19.057+00",
  "modifiedAt": "2026-02-03 10:16:19.057+00"
}