InMemoryPersistenceStorageProvider

In-memory implementation of PersistenceStorageProvider. This provider stores snapshots in a mutable map.

Constructors

Link copied to clipboard
constructor()

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

open suspend fun getCheckpoints(sessionId: String): List<AgentCheckpointData>

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 matching the provided filter

open suspend fun getLatestCheckpoint(sessionId: String): 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)