> ## Documentation Index
> Fetch the complete documentation index at: https://usefused.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# harnest.checkpoint

> Public Python signatures, fields, and methods.

[All Python modules](https://usefused.com/docs/harnest/reference/api/overview.md) · [Import and compatibility guidance](https://usefused.com/docs/harnest/build/python-imports.md)

## Exports

| Name | Kind |
| - | - |
| [`A2ATaskConflictError`](#a2ataskconflicterror) | Class |
| [`A2ATaskCursorError`](#a2ataskcursorerror) | Class |
| [`A2ATaskPage`](#a2ataskpage) | Class |
| [`A2ATaskPersistence`](#a2ataskpersistence) | Class |
| [`A2ATaskRecord`](#a2ataskrecord) | Class |
| [`ADKStore`](#adkstore) | Class |
| [`CheckpointAuthority`](#checkpointauthority) | Class |
| [`CheckpointConflictError`](#checkpointconflicterror) | Class |
| [`CheckpointError`](#checkpointerror) | Class |
| [`CheckpointRecord`](#checkpointrecord) | Class |
| [`CheckpointStore`](#checkpointstore) | Class |
| [`CheckpointWrite`](#checkpointwrite) | Class |
| [`HarnestStore`](#harneststore) | Class |
| [`LangGraphStore`](#langgraphstore) | Class |
| [`MemoryStore`](#memorystore) | Class |
| [`PendingAction`](#pendingaction) | Class |
| [`RunRecord`](#runrecord) | Class |
| [`RunScope`](#runscope) | Class |
| [`RunStatus`](#runstatus) | Value or type alias |
| [`checkpoint_metadata`](#checkpoint_metadata) | Function |

## A2ATaskConflictError

An A2A task mutation conflicts with its durable ownership.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskConflictError
>
> try:
>     ...
> except A2ATaskConflictError as error:
>     ...
> ```

## A2ATaskCursorError

An A2A list cursor does not identify a task in the selected scope.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskCursorError
>
> try:
>     ...
> except A2ATaskCursorError as error:
>     ...
> ```

## A2ATaskPage

One bounded durable task page plus its pre-pagination total.

```python theme={null}
A2ATaskPage(records: tuple[A2ATaskRecord, ...], total_size: int) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `records` | `tuple[A2ATaskRecord, ...]` | `—` |
| `total_size` | `int` | `—` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `records` | `tuple[A2ATaskRecord, ...]` | Required |
> | `total_size` | `int` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPage
>
> page = A2ATaskPage(records=..., total_size=...)
> ```

## A2ATaskPersistence

Optional indexed A2A persistence implemented by built-in stores.

```python theme={null}
A2ATaskPersistence(*args, **kwargs)
```

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPersistence
>
> class MyA2ATaskPersistence(A2ATaskPersistence):
>     ...
> ```

### A2ATaskPersistence.put\_a2a\_task

```python theme={null}
async A2ATaskPersistence.put_a2a_task(record: A2ATaskRecord) -> A2ATaskRecord
```

Create or update one owner-scoped A2A task snapshot.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `record` | `A2ATaskRecord` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPersistence
>
> persistence: A2ATaskPersistence
> record = await persistence.put_a2a_task(record=...)
> ```

### A2ATaskPersistence.get\_a2a\_task

```python theme={null}
async A2ATaskPersistence.get_a2a_task(*, application_id: str, user_id: str, task_id: str) -> A2ATaskRecord | None
```

Read one A2A task through its complete ownership key.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `task_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPersistence
>
> persistence: A2ATaskPersistence
> record = await persistence.get_a2a_task(application_id=..., user_id=..., task_id=...)
> ```

### A2ATaskPersistence.list\_a2a\_tasks

```python theme={null}
async A2ATaskPersistence.list_a2a_tasks(
    *,
    application_id: str,
    user_id: str,
    context_id: str | None = None,
    status: int | None = None,
    status_timestamp_after: str | None = None,
    cursor_task_id: str | None = None,
    limit: int = 51,
) -> A2ATaskPage
```

Return a filtered, cursor-based page of owner-scoped A2A tasks.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `context_id` | `str \| None` | `None` |
> | `status` | `int \| None` | `None` |
> | `status_timestamp_after` | `str \| None` | `None` |
> | `cursor_task_id` | `str \| None` | `None` |
> | `limit` | `int` | `51` |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPersistence
>
> persistence: A2ATaskPersistence
> page = await persistence.list_a2a_tasks(application_id=..., user_id=...)
> ```

### A2ATaskPersistence.delete\_a2a\_task

```python theme={null}
async A2ATaskPersistence.delete_a2a_task(*, application_id: str, user_id: str, task_id: str) -> bool
```

Delete one owner-scoped A2A task and report whether it existed.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `task_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskPersistence
>
> persistence: A2ATaskPersistence
> result = await persistence.delete_a2a_task(application_id=..., user_id=..., task_id=...)
> ```

## A2ATaskRecord

Transport-neutral durable snapshot of one protobuf A2A task.

```python theme={null}
A2ATaskRecord(
    application_id: str,
    user_id: str,
    task_id: str,
    context_id: str,
    status: int,
    payload: bytes,
    status_timestamp: str | None = None,
    created_at: str = ...,
    updated_at: str = ...,
) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `application_id` | `str` | `—` |
| `user_id` | `str` | `—` |
| `task_id` | `str` | `—` |
| `context_id` | `str` | `—` |
| `status` | `int` | `—` |
| `payload` | `bytes` | `—` |
| `status_timestamp` | `str \| None` | `None` |
| `created_at` | `str` | `<lambda>()` |
| `updated_at` | `str` | `<lambda>()` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `task_id` | `str` | Required |
> | `context_id` | `str` | Required |
> | `status` | `int` | Required |
> | `payload` | `bytes` | Required |
> | `status_timestamp` | `str \| None` | `None` |
> | `created_at` | `str` | `...` |
> | `updated_at` | `str` | `...` |
>
> ```python theme={null}
> from harnest.checkpoint import A2ATaskRecord
>
> record = A2ATaskRecord(
>     application_id=...,
>     user_id=...,
>     task_id=...,
>     context_id=...,
>     status=...,
>     payload=...,
> )
> ```

## ADKStore

Explicit lifecycle ownership wrapper for native ADK persistence.

```python theme={null}
ADKStore(session_service: Any) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `owner` | `CheckpointOwner` | `'adk'` |
| `framework` | `str \| None` | `'adk'` |
| `schema_id` | `str` | `'adk-native'` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_service` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import ADKStore
>
> store = ADKStore(session_service=...)
> ```

### ADKStore.start

```python theme={null}
async ADKStore.start() -> None
```

Initialize the wrapped ADK session service when supported.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import ADKStore
>
> store: ADKStore
> await store.start()
> ```

### ADKStore.close

```python theme={null}
async ADKStore.close() -> None
```

Release resources owned by the wrapped ADK session service.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import ADKStore
>
> store: ADKStore
> await store.close()
> ```

## CheckpointAuthority

Typed lifecycle value identifying one checkpoint authority.

```python theme={null}
CheckpointAuthority()
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `owner` | `CheckpointOwner` | `—` |
| `framework` | `str \| None` | `—` |
| `schema_id` | `str` | `—` |

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointAuthority
>
> authority = CheckpointAuthority()
> ```

## CheckpointConflictError

A compare-and-swap or run exclusivity condition failed.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointConflictError
>
> try:
>     ...
> except CheckpointConflictError as error:
>     ...
> ```

## CheckpointError

Base error for checkpoint persistence and ownership.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointError
>
> try:
>     ...
> except CheckpointError as error:
>     ...
> ```

## CheckpointRecord

Opaque framework checkpoint with portable lineage and CAS revision.

```python theme={null}
CheckpointRecord(
    run_id: str,
    checkpoint_id: str,
    namespace: str,
    framework: Literal['adk', 'langgraph'],
    type_name: str,
    payload: bytes,
    metadata_type: str,
    metadata: bytes,
    versions_type: str,
    versions: bytes,
    parent_checkpoint_id: str | None = None,
    revision: int = 0,
    created_at: str = ...,
) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `run_id` | `str` | `—` |
| `checkpoint_id` | `str` | `—` |
| `namespace` | `str` | `—` |
| `framework` | `Literal['adk', 'langgraph']` | `—` |
| `type_name` | `str` | `—` |
| `payload` | `bytes` | `—` |
| `metadata_type` | `str` | `—` |
| `metadata` | `bytes` | `—` |
| `versions_type` | `str` | `—` |
| `versions` | `bytes` | `—` |
| `parent_checkpoint_id` | `str \| None` | `None` |
| `revision` | `int` | `0` |
| `created_at` | `str` | `<lambda>()` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `run_id` | `str` | Required |
> | `checkpoint_id` | `str` | Required |
> | `namespace` | `str` | Required |
> | `framework` | `Literal['adk', 'langgraph']` | Required |
> | `type_name` | `str` | Required |
> | `payload` | `bytes` | Required |
> | `metadata_type` | `str` | Required |
> | `metadata` | `bytes` | Required |
> | `versions_type` | `str` | Required |
> | `versions` | `bytes` | Required |
> | `parent_checkpoint_id` | `str \| None` | `None` |
> | `revision` | `int` | `0` |
> | `created_at` | `str` | `...` |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointRecord
>
> record = CheckpointRecord(
>     run_id=...,
>     checkpoint_id=...,
>     namespace=...,
>     framework=...,
>     type_name=...,
>     payload=...,
>     metadata_type=...,
>     metadata=...,
>     versions_type=...,
>     versions=...,
> )
> ```

## CheckpointStore

Storage contract for resumable, in-progress framework execution.

```python theme={null}
CheckpointStore(*args, **kwargs)
```

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> class MyCheckpointStore(CheckpointStore):
>     ...
> ```

### CheckpointStore.start

```python theme={null}
async CheckpointStore.start() -> None
```

Initialize resources required by the checkpoint store.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> await store.start()
> ```

### CheckpointStore.begin\_run

```python theme={null}
async CheckpointStore.begin_run(
    *,
    application_id: str,
    user_id: str,
    session_id: str,
    run_id: str,
    framework: Literal['adk', 'langgraph'],
) -> RunRecord
```

Create or recover the active checkpoint run for a session.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `session_id` | `str` | Required |
> | `run_id` | `str` | Required |
> | `framework` | `Literal['adk', 'langgraph']` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> record = await store.begin_run(
>     application_id=...,
>     user_id=...,
>     session_id=...,
>     run_id=...,
>     framework=...,
> )
> ```

### CheckpointStore.get\_run

```python theme={null}
async CheckpointStore.get_run(*, scope: RunScope) -> RunRecord | None
```

Read a checkpoint run through its complete ownership scope.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> record = await store.get_run(scope=...)
> ```

### CheckpointStore.get\_checkpoint

```python theme={null}
async CheckpointStore.get_checkpoint(
    *,
    scope: RunScope,
    checkpoint_id: str | None = None,
    namespace: str = '',
) -> CheckpointRecord | None
```

Read an exact or latest checkpoint within an owned run.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str \| None` | `None` |
> | `namespace` | `str` | `''` |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> record = await store.get_checkpoint(scope=...)
> ```

### CheckpointStore.list\_checkpoints

```python theme={null}
CheckpointStore.list_checkpoints(
    *,
    scope: RunScope,
    namespace: str | None = None,
    before: str | None = None,
    limit: int = 20,
) -> AsyncIterator[CheckpointRecord]
```

Stream a bounded checkpoint history for an owned run.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `namespace` | `str \| None` | `None` |
> | `before` | `str \| None` | `None` |
> | `limit` | `int` | `20` |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> result = store.list_checkpoints(scope=...)
> ```

### CheckpointStore.put

```python theme={null}
async CheckpointStore.put(checkpoint: CheckpointRecord, *, scope: RunScope, expected_revision: int | None) -> CheckpointRecord
```

Persist a checkpoint when its expected revision still matches.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `checkpoint` | `CheckpointRecord` | Required |
> | `scope` | `RunScope` | Required |
> | `expected_revision` | `int \| None` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> record = await store.put(checkpoint=..., scope=..., expected_revision=...)
> ```

### CheckpointStore.put\_writes

```python theme={null}
async CheckpointStore.put_writes(
    *,
    scope: RunScope,
    checkpoint_id: str,
    writes: Sequence[CheckpointWrite],
) -> None
```

Persist pending task writes for one checkpoint.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str` | Required |
> | `writes` | `Sequence[CheckpointWrite]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> await store.put_writes(scope=..., checkpoint_id=..., writes=...)
> ```

### CheckpointStore.get\_writes

```python theme={null}
async CheckpointStore.get_writes(*, scope: RunScope, checkpoint_id: str) -> Sequence[CheckpointWrite]
```

Read pending writes for one owned checkpoint.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> result = await store.get_writes(scope=..., checkpoint_id=...)
> ```

### CheckpointStore.get\_writes\_batch

```python theme={null}
async CheckpointStore.get_writes_batch(*, scope: RunScope, checkpoint_ids: Sequence[str]) -> Mapping[str, Sequence[CheckpointWrite]]
```

Read pending writes for several owned checkpoints in one call.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_ids` | `Sequence[str]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> result = await store.get_writes_batch(scope=..., checkpoint_ids=...)
> ```

### CheckpointStore.transition

```python theme={null}
async CheckpointStore.transition(
    *,
    scope: RunScope,
    expected_status: RunStatus,
    status: RunStatus,
    pending_action: PendingAction | None = None,
) -> RunRecord
```

Apply one compare-and-swap run-state transition.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `expected_status` | `RunStatus` | Required |
> | `status` | `RunStatus` | Required |
> | `pending_action` | `PendingAction \| None` | `None` |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> record = await store.transition(scope=..., expected_status=..., status=...)
> ```

### CheckpointStore.delete\_run

```python theme={null}
async CheckpointStore.delete_run(*, scope: RunScope) -> None
```

Delete an owned run and all of its checkpoint state.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> await store.delete_run(scope=...)
> ```

### CheckpointStore.close

```python theme={null}
async CheckpointStore.close() -> None
```

Release resources owned by the checkpoint store.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointStore
>
> store: CheckpointStore
> await store.close()
> ```

## CheckpointWrite

Opaque framework write attached to a checkpoint task.

```python theme={null}
CheckpointWrite(task_id: str, channel: str, type_name: str, payload: bytes, task_path: str = '') -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `task_id` | `str` | `—` |
| `channel` | `str` | `—` |
| `type_name` | `str` | `—` |
| `payload` | `bytes` | `—` |
| `task_path` | `str` | `''` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `task_id` | `str` | Required |
> | `channel` | `str` | Required |
> | `type_name` | `str` | Required |
> | `payload` | `bytes` | Required |
> | `task_path` | `str` | `''` |
>
> ```python theme={null}
> from harnest.checkpoint import CheckpointWrite
>
> write = CheckpointWrite(task_id=..., channel=..., type_name=..., payload=...)
> ```

## HarnestStore

Base for framework-neutral stores owned by the Harnest runtime.

```python theme={null}
HarnestStore()
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `owner` | `CheckpointOwner` | `'harnest'` |
| `framework` | `str \| None` | `None` |
| `schema_id` | `str` | `'harnest-checkpoint/v1'` |

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import HarnestStore
>
> store = HarnestStore()
> ```

### HarnestStore.as\_langgraph\_checkpointer

```python theme={null}
HarnestStore.as_langgraph_checkpointer() -> Any
```

Return one stable native saver for advanced LangGraph construction.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import HarnestStore
>
> store: HarnestStore
> result = store.as_langgraph_checkpointer()
> ```

## LangGraphStore

Explicit lifecycle ownership wrapper for a native LangGraph saver.

```python theme={null}
LangGraphStore(checkpointer: Any) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `owner` | `CheckpointOwner` | `'langgraph'` |
| `framework` | `str \| None` | `'langgraph'` |
| `schema_id` | `str` | `'langgraph-native'` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `checkpointer` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store = LangGraphStore(checkpointer=...)
> ```

### LangGraphStore.config\_specs

Expose the wrapped saver configuration fields to LangGraph.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> value = store.config_specs
> ```

### LangGraphStore.get\_tuple

```python theme={null}
LangGraphStore.get_tuple(config: Any) -> Any
```

Delegate synchronous checkpoint lookup to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = store.get_tuple(config=...)
> ```

### LangGraphStore.list

```python theme={null}
LangGraphStore.list(config: Any, **options: Any) -> Any
```

Delegate synchronous checkpoint listing to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `**options` | `Any` | Optional |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = store.list(config=...)
> ```

### LangGraphStore.put

```python theme={null}
LangGraphStore.put(config: Any, checkpoint: Any, metadata: Any, new_versions: Any) -> Any
```

Delegate synchronous checkpoint persistence to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `checkpoint` | `Any` | Required |
> | `metadata` | `Any` | Required |
> | `new_versions` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = store.put(config=..., checkpoint=..., metadata=..., new_versions=...)
> ```

### LangGraphStore.put\_writes

```python theme={null}
LangGraphStore.put_writes(
    config: Any,
    writes: Sequence[tuple[str, Any]],
    task_id: str,
    task_path: str = '',
) -> None
```

Delegate synchronous pending-write persistence to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `writes` | `Sequence[tuple[str, Any]]` | Required |
> | `task_id` | `str` | Required |
> | `task_path` | `str` | `''` |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> store.put_writes(config=..., writes=..., task_id=...)
> ```

### LangGraphStore.delete\_thread

```python theme={null}
LangGraphStore.delete_thread(thread_id: str) -> None
```

Delete all checkpoints for a LangGraph thread.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `thread_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> store.delete_thread(thread_id=...)
> ```

### LangGraphStore.aget\_tuple

```python theme={null}
async LangGraphStore.aget_tuple(config: Any) -> Any
```

Delegate asynchronous checkpoint lookup to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = await store.aget_tuple(config=...)
> ```

### LangGraphStore.alist

```python theme={null}
LangGraphStore.alist(config: Any, **options: Any) -> AsyncIterator[Any]
```

Stream checkpoints from the wrapped asynchronous saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `**options` | `Any` | Optional |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> async for item in store.alist(config=...):
>     ...
> ```

### LangGraphStore.aput

```python theme={null}
async LangGraphStore.aput(config: Any, checkpoint: Any, metadata: Any, new_versions: Any) -> Any
```

Delegate asynchronous checkpoint persistence to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `checkpoint` | `Any` | Required |
> | `metadata` | `Any` | Required |
> | `new_versions` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = await store.aput(config=..., checkpoint=..., metadata=..., new_versions=...)
> ```

### LangGraphStore.aput\_writes

```python theme={null}
async LangGraphStore.aput_writes(
    config: Any,
    writes: Sequence[tuple[str, Any]],
    task_id: str,
    task_path: str = '',
) -> None
```

Delegate asynchronous pending-write persistence to the wrapped saver.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `config` | `Any` | Required |
> | `writes` | `Sequence[tuple[str, Any]]` | Required |
> | `task_id` | `str` | Required |
> | `task_path` | `str` | `''` |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> await store.aput_writes(config=..., writes=..., task_id=...)
> ```

### LangGraphStore.adelete\_thread

```python theme={null}
async LangGraphStore.adelete_thread(thread_id: str) -> None
```

Asynchronously delete all checkpoints for a LangGraph thread.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `thread_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> await store.adelete_thread(thread_id=...)
> ```

### LangGraphStore.get\_next\_version

```python theme={null}
LangGraphStore.get_next_version(current: Any, channel: Any) -> Any
```

Ask the wrapped saver to derive the next channel version.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `current` | `Any` | Required |
> | `channel` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> result = store.get_next_version(current=..., channel=...)
> ```

### LangGraphStore.start

```python theme={null}
async LangGraphStore.start() -> None
```

Initialize the wrapped saver when it owns a start hook.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> await store.start()
> ```

### LangGraphStore.close

```python theme={null}
async LangGraphStore.close() -> None
```

Release resources owned by the wrapped saver.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import LangGraphStore
>
> store: LangGraphStore
> await store.close()
> ```

## MemoryStore

Process-local session, checkpoint, and continuation store with atomic CAS.

```python theme={null}
MemoryStore() -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `owner` | `CheckpointOwner` | `'harnest'` |
| `framework` | `str \| None` | `None` |
| `schema_id` | `str` | `'harnest-checkpoint/v1'` |

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store = MemoryStore()
> ```

### MemoryStore.start

```python theme={null}
async MemoryStore.start() -> None
```

Reject reopening because closed development state is intentionally lost.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> await store.start()
> ```

### MemoryStore.create

```python theme={null}
async MemoryStore.create(*, session_id: str, user_id: str, state: Mapping[str, Any]) -> SessionRecord
```

Create one process-local tenant-scoped session.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `state` | `Mapping[str, Any]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.create(session_id=..., user_id=..., state=...)
> ```

### MemoryStore.get

```python theme={null}
async MemoryStore.get(*, session_id: str, user_id: str) -> SessionRecord | None
```

Read one process-local tenant-scoped session.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_id` | `str` | Required |
> | `user_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.get(session_id=..., user_id=...)
> ```

### MemoryStore.list

```python theme={null}
async MemoryStore.list(*, user_id: str, after: str | None = None, limit: int | None = None) -> Sequence[SessionRecord]
```

List an ordered keyset page without materializing unrelated users.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `user_id` | `str` | Required |
> | `after` | `str \| None` | `None` |
> | `limit` | `int \| None` | `None` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.list(user_id=...)
> ```

### MemoryStore.update

```python theme={null}
async MemoryStore.update(*, session_id: str, user_id: str, state_delta: Mapping[str, Any]) -> SessionRecord | None
```

Merge a state delta into a process-local session.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `state_delta` | `Mapping[str, Any]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.update(session_id=..., user_id=..., state_delta=...)
> ```

### MemoryStore.delete

```python theme={null}
async MemoryStore.delete(*, session_id: str, user_id: str) -> bool
```

Delete one process-local session after its active lease exits.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_id` | `str` | Required |
> | `user_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.delete(session_id=..., user_id=...)
> ```

### MemoryStore.acquire

```python theme={null}
MemoryStore.acquire(*, session_id: str, user_id: str) -> AsyncIterator[SessionLease]
```

Hold exclusive access to one process-local session.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `session_id` | `str` | Required |
> | `user_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> async with store.acquire(session_id=..., user_id=...):
>     ...
> ```

### MemoryStore.close

```python theme={null}
async MemoryStore.close() -> None
```

Close both session and checkpoint sides of the shared store.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> await store.close()
> ```

### MemoryStore.as\_langgraph\_checkpointer

```python theme={null}
MemoryStore.as_langgraph_checkpointer() -> Any
```

Return one stable native saver for advanced LangGraph construction.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = store.as_langgraph_checkpointer()
> ```

### MemoryStore.put\_a2a\_task

```python theme={null}
async MemoryStore.put_a2a_task(record: A2ATaskRecord) -> A2ATaskRecord
```

Upsert one owner-scoped snapshot without allowing context reassignment.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `record` | `A2ATaskRecord` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.put_a2a_task(record=...)
> ```

### MemoryStore.get\_a2a\_task

```python theme={null}
async MemoryStore.get_a2a_task(*, application_id: str, user_id: str, task_id: str) -> A2ATaskRecord | None
```

Read one snapshot only through its complete ownership key.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `task_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.get_a2a_task(application_id=..., user_id=..., task_id=...)
> ```

### MemoryStore.list\_a2a\_tasks

```python theme={null}
async MemoryStore.list_a2a_tasks(
    *,
    application_id: str,
    user_id: str,
    context_id: str | None = None,
    status: int | None = None,
    status_timestamp_after: str | None = None,
    cursor_task_id: str | None = None,
    limit: int = 51,
) -> A2ATaskPage
```

Return a stable inclusive-cursor page for the process-local backend.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `context_id` | `str \| None` | `None` |
> | `status` | `int \| None` | `None` |
> | `status_timestamp_after` | `str \| None` | `None` |
> | `cursor_task_id` | `str \| None` | `None` |
> | `limit` | `int` | `51` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> page = await store.list_a2a_tasks(application_id=..., user_id=...)
> ```

### MemoryStore.delete\_a2a\_task

```python theme={null}
async MemoryStore.delete_a2a_task(*, application_id: str, user_id: str, task_id: str) -> bool
```

Delete exactly one owner-scoped A2A snapshot.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `task_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.delete_a2a_task(application_id=..., user_id=..., task_id=...)
> ```

### MemoryStore.begin\_run

```python theme={null}
async MemoryStore.begin_run(
    *,
    application_id: str,
    user_id: str,
    session_id: str,
    run_id: str,
    framework: Literal['adk', 'langgraph'],
) -> RunRecord
```

Claim the session for one idempotent invocation run.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `session_id` | `str` | Required |
> | `run_id` | `str` | Required |
> | `framework` | `Literal['adk', 'langgraph']` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.begin_run(
>     application_id=...,
>     user_id=...,
>     session_id=...,
>     run_id=...,
>     framework=...,
> )
> ```

### MemoryStore.get\_run

```python theme={null}
async MemoryStore.get_run(*, scope: RunScope) -> RunRecord | None
```

Read one process-local run through its complete ownership scope.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.get_run(scope=...)
> ```

### MemoryStore.get\_checkpoint

```python theme={null}
async MemoryStore.get_checkpoint(
    *,
    scope: RunScope,
    checkpoint_id: str | None = None,
    namespace: str = '',
) -> CheckpointRecord | None
```

Load an exact checkpoint or the newest checkpoint in a namespace.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str \| None` | `None` |
> | `namespace` | `str` | `''` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.get_checkpoint(scope=...)
> ```

### MemoryStore.list\_checkpoints

```python theme={null}
MemoryStore.list_checkpoints(
    *,
    scope: RunScope,
    namespace: str | None = None,
    before: str | None = None,
    limit: int = 20,
) -> AsyncIterator[CheckpointRecord]
```

Yield a bounded newest-first checkpoint history.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `namespace` | `str \| None` | `None` |
> | `before` | `str \| None` | `None` |
> | `limit` | `int` | `20` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> async for item in store.list_checkpoints(scope=...):
>     ...
> ```

### MemoryStore.put

```python theme={null}
async MemoryStore.put(checkpoint: CheckpointRecord, *, scope: RunScope, expected_revision: int | None) -> CheckpointRecord
```

Persist a checkpoint only when its expected revision still matches.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `checkpoint` | `CheckpointRecord` | Required |
> | `scope` | `RunScope` | Required |
> | `expected_revision` | `int \| None` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.put(checkpoint=..., scope=..., expected_revision=...)
> ```

### MemoryStore.put\_writes

```python theme={null}
async MemoryStore.put_writes(*, scope: RunScope, checkpoint_id: str, writes: Sequence[CheckpointWrite]) -> None
```

Add pending writes idempotently by task and channel.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str` | Required |
> | `writes` | `Sequence[CheckpointWrite]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> await store.put_writes(scope=..., checkpoint_id=..., writes=...)
> ```

### MemoryStore.get\_writes

```python theme={null}
async MemoryStore.get_writes(*, scope: RunScope, checkpoint_id: str) -> Sequence[CheckpointWrite]
```

Read process-local pending writes for one owned checkpoint.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.get_writes(scope=..., checkpoint_id=...)
> ```

### MemoryStore.get\_writes\_batch

```python theme={null}
async MemoryStore.get_writes_batch(*, scope: RunScope, checkpoint_ids: Sequence[str]) -> Mapping[str, Sequence[CheckpointWrite]]
```

Load writes for several checkpoints without per-checkpoint calls.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `checkpoint_ids` | `Sequence[str]` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.get_writes_batch(scope=..., checkpoint_ids=...)
> ```

### MemoryStore.transition

```python theme={null}
async MemoryStore.transition(
    *,
    scope: RunScope,
    expected_status: RunStatus,
    status: RunStatus,
    pending_action: PendingAction | None = None,
) -> RunRecord
```

Apply one valid compare-and-swap run-state transition.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `expected_status` | `RunStatus` | Required |
> | `status` | `RunStatus` | Required |
> | `pending_action` | `PendingAction \| None` | `None` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> record = await store.transition(scope=..., expected_status=..., status=...)
> ```

### MemoryStore.suspend\_continuation

```python theme={null}
async MemoryStore.suspend_continuation(*, record: Any, external_id: str) -> Any
```

Atomically register provider work and move its owned run to waiting.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `record` | `Any` | Required |
> | `external_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.suspend_continuation(record=..., external_id=...)
> ```

### MemoryStore.get\_continuation

```python theme={null}
async MemoryStore.get_continuation(*, scope: RunScope, continuation_id: str) -> Any | None
```

Return one record only when every run ownership field matches.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `continuation_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.get_continuation(scope=..., continuation_id=...)
> ```

### MemoryStore.get\_provider\_continuation

```python theme={null}
async MemoryStore.get_provider_continuation(*, scope: RunScope, provider: str, continuation_id: str) -> Any | None
```

Return an exact continuation together with its provider external ID.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `provider` | `str` | Required |
> | `continuation_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.get_provider_continuation(
>     scope=...,
>     provider=...,
>     continuation_id=...,
> )
> ```

### MemoryStore.get\_continuation\_by\_external\_id

```python theme={null}
async MemoryStore.get_continuation_by_external_id(*, application_id: str, provider: str, external_id: str) -> Any | None
```

Resolve one provider identity through the same indexed ownership key.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `provider` | `str` | Required |
> | `external_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.get_continuation_by_external_id(
>     application_id=...,
>     provider=...,
>     external_id=...,
> )
> ```

### MemoryStore.list\_pending\_continuations

```python theme={null}
async MemoryStore.list_pending_continuations(
    *,
    application_id: str,
    provider: str,
    after: str | None = None,
    limit: int = 100,
) -> Sequence[Any]
```

Return a bounded provider page for local reconciliation.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `provider` | `str` | Required |
> | `after` | `str \| None` | `None` |
> | `limit` | `int` | `100` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.list_pending_continuations(application_id=..., provider=...)
> ```

### MemoryStore.resolve\_continuation

```python theme={null}
async MemoryStore.resolve_continuation(
    *,
    scope: RunScope,
    provider: str,
    external_id: str,
    schema_id: str,
    result: Any = None,
    failure: Any = None,
) -> Any
```

Commit a provider result or failure with one status compare-and-swap.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `provider` | `str` | Required |
> | `external_id` | `str` | Required |
> | `schema_id` | `str` | Required |
> | `result` | `Any` | `None` |
> | `failure` | `Any` | `None` |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.resolve_continuation(
>     scope=...,
>     provider=...,
>     external_id=...,
>     schema_id=...,
> )
> ```

### MemoryStore.cancel\_continuation

```python theme={null}
async MemoryStore.cancel_continuation(
    *,
    scope: RunScope,
    provider: str,
    continuation_id: str,
    expected_revision: int,
    failure: Any,
) -> Any
```

Fail one pending continuation and cancel its exact waiting run.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `provider` | `str` | Required |
> | `continuation_id` | `str` | Required |
> | `expected_revision` | `int` | Required |
> | `failure` | `Any` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.cancel_continuation(
>     scope=...,
>     provider=...,
>     continuation_id=...,
>     expected_revision=...,
>     failure=...,
> )
> ```

### MemoryStore.claim\_continuation

```python theme={null}
async MemoryStore.claim_continuation(
    *,
    scope: RunScope,
    provider: str,
    continuation_id: str,
    expected_revision: int,
) -> Any
```

Claim an outcome and return the waiting run to running atomically.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `provider` | `str` | Required |
> | `continuation_id` | `str` | Required |
> | `expected_revision` | `int` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.claim_continuation(
>     scope=...,
>     provider=...,
>     continuation_id=...,
>     expected_revision=...,
> )
> ```

### MemoryStore.arm\_continuation

```python theme={null}
async MemoryStore.arm_continuation(
    *,
    scope: RunScope,
    provider: str,
    continuation_id: str,
    expected_revision: int,
) -> Any
```

Arm a provider wait after its native suspension is checkpointed.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
> | `provider` | `str` | Required |
> | `continuation_id` | `str` | Required |
> | `expected_revision` | `int` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> result = await store.arm_continuation(
>     scope=...,
>     provider=...,
>     continuation_id=...,
>     expected_revision=...,
> )
> ```

### MemoryStore.delete\_run

```python theme={null}
async MemoryStore.delete_run(*, scope: RunScope) -> None
```

Delete a run and every private checkpoint owned by it.

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `scope` | `RunScope` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import MemoryStore
>
> store: MemoryStore
> await store.delete_run(scope=...)
> ```

## PendingAction

Portable description of a durable wait without customer payloads.

```python theme={null}
PendingAction(
    type: Literal['human_approval', 'client_tool', 'external_continuation'],
    action_id: str,
    capability: str,
) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `type` | `Literal['human_approval', 'client_tool', 'external_continuation']` | `—` |
| `action_id` | `str` | `—` |
| `capability` | `str` | `—` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `type` | `Literal['human_approval', 'client_tool', 'external_continuation']` | Required |
> | `action_id` | `str` | Required |
> | `capability` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import PendingAction
>
> action = PendingAction(type=..., action_id=..., capability=...)
> ```

## RunRecord

One framework execution associated with a committed public session.

```python theme={null}
RunRecord(
    application_id: str,
    user_id: str,
    session_id: str,
    run_id: str,
    framework: Literal['adk', 'langgraph'],
    status: RunStatus = 'running',
    revision: int = 0,
    pending_action: PendingAction | None = None,
    created_at: str = ...,
    updated_at: str = ...,
) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `application_id` | `str` | `—` |
| `user_id` | `str` | `—` |
| `session_id` | `str` | `—` |
| `run_id` | `str` | `—` |
| `framework` | `Literal['adk', 'langgraph']` | `—` |
| `status` | `RunStatus` | `'running'` |
| `revision` | `int` | `0` |
| `pending_action` | `PendingAction \| None` | `None` |
| `created_at` | `str` | `<lambda>()` |
| `updated_at` | `str` | `<lambda>()` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `session_id` | `str` | Required |
> | `run_id` | `str` | Required |
> | `framework` | `Literal['adk', 'langgraph']` | Required |
> | `status` | `RunStatus` | `'running'` |
> | `revision` | `int` | `0` |
> | `pending_action` | `PendingAction \| None` | `None` |
> | `created_at` | `str` | `...` |
> | `updated_at` | `str` | `...` |
>
> ```python theme={null}
> from harnest.checkpoint import RunRecord
>
> record = RunRecord(
>     application_id=...,
>     user_id=...,
>     session_id=...,
>     run_id=...,
>     framework=...,
> )
> ```

### RunRecord.scope

Return the complete ownership key required for later operations.

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import RunRecord
>
> record: RunRecord
> value = record.scope
> ```

## RunScope

Complete ownership key required at the store boundary for one run.

```python theme={null}
RunScope(application_id: str, user_id: str, session_id: str, run_id: str) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `application_id` | `str` | `—` |
| `user_id` | `str` | `—` |
| `session_id` | `str` | `—` |
| `run_id` | `str` | `—` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `application_id` | `str` | Required |
> | `user_id` | `str` | Required |
> | `session_id` | `str` | Required |
> | `run_id` | `str` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import RunScope
>
> scope = RunScope(application_id=..., user_id=..., session_id=..., run_id=...)
> ```

## RunStatus

```python theme={null}
RunStatus = Literal['running', 'waiting', 'completed', 'failed', 'cancelled']
```

> [accordion] Example
>
> ```python theme={null}
> from harnest.checkpoint import RunStatus
> ```

## checkpoint\_metadata

Return immutable, non-secret ownership metadata for an artifact.

```python theme={null}
checkpoint_metadata(authority: CheckpointAuthority) -> dict[str, str]
```

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `authority` | `CheckpointAuthority` | Required |
>
> ```python theme={null}
> from harnest.checkpoint import checkpoint_metadata
>
> result = checkpoint_metadata(authority=...)
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.