Agent Process Persistence
object AgentProcessPersistence
Entry point for assembling a durable AgentProcessRepository.
An application supplies an AgentProcessSnapshotStore for its own backend, and this builds the snapshot, serialization and restore machinery around it. That machinery stays internal deliberately: the snapshot model is an implementation detail that must be free to change, whereas the pieces an integrator supplies (AgentProcessSnapshotStore, AgentProcessCheckpointPolicy and BlackboardEntrySerializer) are stable contracts.
val repository = AgentProcessPersistence.persistentRepository(
runtimeRepository = InMemoryAgentProcessRepository(),
snapshotStore = myRedisSnapshotStore,
objectMapper = objectMapper,
agents = agentPlatform::agents,
platformServices = { agentPlatform.platformServices },
)Content copied to clipboard
Functions
Link copied to clipboard
fun persistentRepository(runtimeRepository: AgentProcessRepository, snapshotStore: AgentProcessSnapshotStore, objectMapper: <Error class: unknown class>, agents: () -> Collection<Agent>, platformServices: () -> PlatformServices, checkpointPolicy: AgentProcessCheckpointPolicy = LifecycleCheckpointPolicy, blackboardEntrySerializers: List<BlackboardEntrySerializer> = emptyList(), clock: Clock = Clock.systemUTC()): AgentProcessRepository
Decorate runtimeRepository so that processes are checkpointed to snapshotStore and restored from it when runtime state has been lost.