# Interface ICheckpointStore

Abstract checkpoint store interface. Implementations provide persistence (in-memory, JSON file, SQLite, etc.).

interface ICheckpointStore {
save(checkpoint: Checkpoint): void;
load(id: string): Checkpoint | undefined;
latest(executionId: string): Checkpoint | undefined;
list(executionId: string): readonly CheckpointSummary[];
delete(id: string): boolean;
deleteExecution(executionId: string): number;
size(): number;
clear(): void;
}

#### Implemented by

- InMemoryCheckpointStore

- Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:110

##### Index

### Methods

save
load
latest
list
delete
deleteExecution
size
clear

## Methods

### save

- save(checkpoint: Checkpoint): void

  Saves a checkpoint. Overwrites if ID already exists.

  #### Parameters

  - checkpoint: Checkpoint

  #### Returns void

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:112

### load

- load(id: string): Checkpoint | undefined

  Loads a checkpoint by ID. Returns undefined if not found.

  #### Parameters

  - id: string

  #### Returns Checkpoint | undefined

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:115

### latest

- latest(executionId: string): Checkpoint | undefined

  Loads the latest checkpoint for a given execution ID.

  #### Parameters

  - executionId: string

  #### Returns Checkpoint | undefined

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:118

### list

- list(executionId: string): readonly CheckpointSummary[]

  Lists all checkpoint summaries for a given execution ID.

  #### Parameters

  - executionId: string

  #### Returns readonly CheckpointSummary[]

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:121

### delete

- delete(id: string): boolean

  Deletes a checkpoint by ID. Returns true if found and deleted.

  #### Parameters

  - id: string

  #### Returns boolean

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:124

### deleteExecution

- deleteExecution(executionId: string): number

  Deletes all checkpoints for a given execution ID.

  #### Parameters

  - executionId: string

  #### Returns number

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:127

### size

- size(): number

  Returns total number of checkpoints across all executions.

  #### Returns number

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:130

### clear

- clear(): void

  Clears all checkpoints.

  #### Returns void

  - Defined in packages/nexus-agents/src/orchestration/graph/checkpoint-types.ts:133