getSnapshot method
Reads a snapshot without starting a chat. Requires a server store.
Returns a typed AgentSnapshot wrapper (with the same stateSchema
applied to snapshot.state), or null when no snapshot is found.
Pass metadataOnly to read the shaped metadata without the state payload.
Implementation
Future<AgentSnapshot<State>?> getSnapshot({
String? snapshotId,
String? sessionId,
Map<String, dynamic>? context,
bool metadataOnly = false,
}) => _api.getSnapshot(
snapshotId: snapshotId,
sessionId: sessionId,
context: context,
metadataOnly: metadataOnly,
);