Skip to content

MemoryBackend

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/context/checkpoint-backend.ts

Implements: CheckpointBackend

Methods

MethodSignatureReturns
savesave(snap: Snapshot)void
loadload(relPath: string)Snapshot[]
loadLatestloadLatest(relPath: string)`Snapshot
deleteFiledeleteFile(relPath: string)void
deleteFromdeleteFrom(relPath: string, fromIndex: number)void
getTrackedFilesgetTrackedFiles()string[]
getTotalCountgetTotalCount()number
getSnapshotCountgetSnapshotCount(relPath: string)number
clearclear()void
evictOldestevictOldest()boolean

Where it refuses work

  • MemoryBackend stops the work with an early return when !snaps || snaps.length === 0.
  • MemoryBackend stops the work with an early return when !snaps.
  • MemoryBackend stops the work with an early return when fromIndex < 0 || fromIndex >= snaps.length.

Was this page helpful?

Download as PDF