Add Memory • AI Agent SDK
add_memory: Add information to session memory.
add_memory
Method
</div>
This is a method of the Session class in the session module.
Add information to session memory.
Signature
def add_memory(text: str, memory_type: str) -> NoneParameters
ParamField
strText to store
ParamField
str“short” or “long” term memory **metadata: Additional metadata
Uses
store_short_termstore_long_term
Source
View on GitHubpraisonaiagents/session.py at line 372