Skip to content

Llm.MemoryStores ​

Overview ​

Available Operations ​

create ​

Creates a memory store for persistent agent notes. Stores are private by default and can be shared across the workspace.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.create({
    createMemoryStoreRequest: {
      name: "Bug Reports",
      description: "Persistent bug reports seen by the triage agent.",
      instructions: "Store every confirmed bug report here using one markdown file per product area.",
      visibility: "workspace",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresCreate } from "@meetkai/mka1/funcs/llmMemoryStoresCreate.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresCreate(sdk, {
    createMemoryStoreRequest: {
      name: "Bug Reports",
      description: "Persistent bug reports seen by the triage agent.",
      instructions: "Store every confirmed bug report here using one markdown file per product area.",
      visibility: "workspace",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresCreate failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresCreateMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresCreate.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateMemoryStoreRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryStore>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

list ​

List memory stores

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.list({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresList } from "@meetkai/mka1/funcs/llmMemoryStoresList.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresList(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresList failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMemoryStoresList,
  useLlmMemoryStoresListSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMemoryStoresList,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMemoryStoresList,
  invalidateAllLlmMemoryStoresList,
} from "@meetkai/mka1/react-query/llmMemoryStoresList.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListMemoryStoresRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryStoreList>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

get ​

Retrieve memory store

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.get({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresGet } from "@meetkai/mka1/funcs/llmMemoryStoresGet.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresGet(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresGet failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMemoryStoresGet,
  useLlmMemoryStoresGetSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMemoryStoresGet,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMemoryStoresGet,
  invalidateAllLlmMemoryStoresGet,
} from "@meetkai/mka1/react-query/llmMemoryStoresGet.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.GetMemoryStoreRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryStore>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

update ​

Update memory store

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.update({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    updateMemoryStoreRequest: {
      description: "Persistent bug reports seen by the triage agent and support team.",
      visibility: "workspace",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresUpdate } from "@meetkai/mka1/funcs/llmMemoryStoresUpdate.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresUpdate(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    updateMemoryStoreRequest: {
      description: "Persistent bug reports seen by the triage agent and support team.",
      visibility: "workspace",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresUpdate failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresUpdateMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresUpdate.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.UpdateMemoryStoreRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryStore>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

delete ​

Delete memory store

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.delete({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresDelete } from "@meetkai/mka1/funcs/llmMemoryStoresDelete.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresDelete(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresDelete failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresDeleteMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresDelete.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteMemoryStoreRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryStoreDeleted>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

createEntry ​

Create memory entry

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.createEntry({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    createMemoryEntryRequest: {
      path: "reports/login-rate-limit.md",
      content: "# Login rate limit\n\nReported by Acme on 2026-05-05.",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresCreateEntry } from "@meetkai/mka1/funcs/llmMemoryStoresCreateEntry.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresCreateEntry(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    createMemoryEntryRequest: {
      path: "reports/login-rate-limit.md",
      content: "# Login rate limit\n\nReported by Acme on 2026-05-05.",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresCreateEntry failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresCreateEntryMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresCreateEntry.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateMemoryEntryRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryEntry>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

listEntries ​

List memory entries

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.listEntries({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresListEntries } from "@meetkai/mka1/funcs/llmMemoryStoresListEntries.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresListEntries(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresListEntries failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMemoryStoresListEntries,
  useLlmMemoryStoresListEntriesSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMemoryStoresListEntries,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMemoryStoresListEntries,
  invalidateAllLlmMemoryStoresListEntries,
} from "@meetkai/mka1/react-query/llmMemoryStoresListEntries.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListMemoryEntriesRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryEntryList>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

getEntry ​

Retrieve memory entry

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.getEntry({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresGetEntry } from "@meetkai/mka1/funcs/llmMemoryStoresGetEntry.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresGetEntry(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresGetEntry failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useLlmMemoryStoresGetEntry,
  useLlmMemoryStoresGetEntrySuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchLlmMemoryStoresGetEntry,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateLlmMemoryStoresGetEntry,
  invalidateAllLlmMemoryStoresGetEntry,
} from "@meetkai/mka1/react-query/llmMemoryStoresGetEntry.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.GetMemoryEntryRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryEntry>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

updateEntry ​

Update memory entry

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.updateEntry({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
    updateMemoryEntryRequest: {
      content: "# Login rate limit\n\nReported by Acme and Globex.",
      ifMatch: "c378790c771dbb9651bae4c156f88a6b684d5b520a588e5b33d641aa96103680",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresUpdateEntry } from "@meetkai/mka1/funcs/llmMemoryStoresUpdateEntry.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresUpdateEntry(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
    updateMemoryEntryRequest: {
      content: "# Login rate limit\n\nReported by Acme and Globex.",
      ifMatch: "c378790c771dbb9651bae4c156f88a6b684d5b520a588e5b33d641aa96103680",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresUpdateEntry failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresUpdateEntryMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresUpdateEntry.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.UpdateMemoryEntryRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryEntry>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

deleteEntry ​

Delete memory entry

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.memoryStores.deleteEntry({
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
    deleteMemoryEntryRequest: {
      ifMatch: "c378790c771dbb9651bae4c156f88a6b684d5b520a588e5b33d641aa96103680",
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { llmMemoryStoresDeleteEntry } from "@meetkai/mka1/funcs/llmMemoryStoresDeleteEntry.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await llmMemoryStoresDeleteEntry(sdk, {
    memoryStoreId: "mem_aa87e2b1112a455b8deabed784372198",
    entryId: "mem_entry_bb98f3c2223b566c9dfbcef895483209",
    deleteMemoryEntryRequest: {
      ifMatch: "c378790c771dbb9651bae4c156f88a6b684d5b520a588e5b33d641aa96103680",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("llmMemoryStoresDeleteEntry failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useLlmMemoryStoresDeleteEntryMutation
} from "@meetkai/mka1/react-query/llmMemoryStoresDeleteEntry.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteMemoryEntryRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<components.MemoryEntryDeleted>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*