actrone-memory
    Preparing search index...

    Function langgraphMemory

    • LangGraph.js: memory for a graph whose state carries a messages array (e.g. MessagesState). loadMemories returns a system message to MERGE into the graph state before the model node (or null when there is nothing relevant), and saveTurn persists a completed turn, typically wired as a pre-model node + a post-model node. Structural, so @langchain/langgraph stays an optional peer dependency.

      Parameters

      Returns {
          loadMemories: (
              query: string,
              tokenBudget?: number,
          ) => Promise<LangGraphSystemMessage | null>;
          saveTurn: (
              userMessage: string,
              assistantMessage: string,
          ) => Promise<string>;
      }