# snapshot_for_payload

> **Function** in `deepagents_code`

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

Build the snapshot persisted with a workspace binding.

## Signature

```python
snapshot_for_payload(
    workspace_payload: Mapping[str, Any],
) -> WorkspaceSnapshot
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `workspace_payload` | `Mapping[str, Any]` | Yes | The full `ServerConfig.to_workspace_payload()` dict. |

## Returns

`WorkspaceSnapshot`

The versioned, allowlisted snapshot.

---

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