# get_snapshot_for_binding

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/workspace/get_snapshot_for_binding)

Read the persisted comparison snapshot recorded for a binding.

## Signature

```python
get_snapshot_for_binding(
    binding: WorkspaceBinding,
) -> WorkspaceSnapshot | None
```

## Returns

`WorkspaceSnapshot | None`

The snapshot, or `None` when the binding predates snapshotting.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/workspace.py#L402)