InMemoryPersistenceStorageProvider
class InMemoryPersistenceStorageProvider : PersistenceStorageProvider<AgentCheckpointPredicateFilter> (source)
In-memory implementation of PersistenceStorageProvider. This provider stores snapshots in a mutable map.
Functions
Link copied to clipboard
open suspend override fun getCheckpoints(sessionId: String, filter: AgentCheckpointPredicateFilter?): List<AgentCheckpointData>
Retrieves the list of checkpoints of the AI agent with the given sessionId that match the provided filter
Retrieves the list of checkpoints of the AI agent with the given sessionId
Link copied to clipboard
open suspend override fun getLatestCheckpoint(sessionId: String, filter: AgentCheckpointPredicateFilter?): AgentCheckpointData?
Retrieves the latest checkpoint of the AI agent with sessionId
Link copied to clipboard
Removes all stored checkpoints from the in-memory storage. If a filter is provided, this method will determine which checkpoints to remove based on the filter's logic.
Link copied to clipboard
open suspend override fun saveCheckpoint(sessionId: String, agentCheckpointData: AgentCheckpointData)
Saves provided checkpoint (agentCheckpointData) of the agent with sessionId to the storage (ex: database, S3, file)