Create middleware for loading agent-specific long-term memory.
This middleware loads the agent's long-term memory from a file (agent.md) and injects it into the system prompt. The memory is loaded once at the start of the conversation and stored in state.
createAgentMemoryMiddleware(
options: AgentMemoryMiddlewareOptions
): AgentMiddleware<any, undefined, unknown, readonly ClientTool | ServerTool[]>| Name | Type | Description |
|---|---|---|
options* | AgentMemoryMiddlewareOptions | Configuration options |