Memory Modes
1. Self-Managed Memory (memoryEnabled: true)
When memoryEnabled is set to true (the default), the agent automatically manages conversation history internally. This is the simplest option for most use cases.
2. No Memory (memoryEnabled: false)
When memoryEnabled is set to false, the agent has no internal memory and treats each interaction independently.
Memory Management Methods
The MCPAgent provides methods to inspect and control conversation history:getConversationHistory()
Returns a copy of the current conversation history as an array of messages.
clearConversationHistory()
Clears the internal conversation history. If memoryEnabled is true and a system message exists, it will be preserved.