MemoryStore
class, which provides both short-term and long-term memory capabilities.
AgentRuntime
:
MemoryStore
with OpenAI API credentials and an embedding model:
top_k
)MemoryStore
class accepts several parameters:
Parameter | Description | Default |
---|---|---|
short_term_memory_limit | Maximum number of interactions in short-term memory | 20 |
api_key | OpenAI API key for embeddings (required for long-term memory) | None |
embedding_model | OpenAI embedding model to use | None |
agent_name | Identifier for the agent using this memory store | ”agent” |
short_term_memory_limit
parameter controls how many recent interactions your agent remembers before moving older memories to long-term storage. You can adjust this based on your use case: