Properties
add Memory Key
add Memory Key : string = "addMemory"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:333
llm
llm : BaseLanguageModel < any , BaseLanguageModelCallOptions >
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:319
memory Chain
memory Chain : GenerativeAgentMemoryChain
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:343
memory Retriever
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:321
most Recent Memories Key
most Recent Memories Key : string = "most_recent_memories"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:339
most Recent Memories Token Key
most Recent Memories Token Key : string = "recent_memories_token"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:331
now Key
now Key : string = "now"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:341
queries Key
queries Key : string = "queries"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:329
relevant Memories Key
relevant Memories Key : string = "relevant_memories"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:335
relevant Memories Simple Key
relevant Memories Simple Key : string = "relevant_memories_simple"
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:337
verbose
verbose : boolean
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:323
Optional
reflection Threshold
reflection Threshold ?: number
Defined in docs/api_refs/langchain/src/experimental/generative_agents/generative_agent_memory.ts:325
Class that manages the memory of a generative agent in LangChain. It extends the
BaseMemory
class and has methods for adding a memory, formatting memories, getting memories until a token limit is reached, loading memory variables, saving the context of a model run to memory, and clearing memory contents.Example