# WorkspaceBinding

> **Class** in `deepagents_code`

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

Server-authoritative workspace and resource policy for one thread.

## Signature

```python
WorkspaceBinding(
    self,
    schema_version: int,
    workspace_id: str,
    cwd: str,
    project_root: str | None,
    generation: int,
    resource_key: str,
    config_fingerprint: str,
    workspace_config_json: str,
    policy_fingerprint: str = '',
    runtime_fingerprint: str = '',
)
```

## Constructors

```python
__init__(
    self,
    schema_version: int,
    workspace_id: str,
    cwd: str,
    project_root: str | None,
    generation: int,
    resource_key: str,
    config_fingerprint: str,
    workspace_config_json: str,
    policy_fingerprint: str = '',
    runtime_fingerprint: str = '',
) -> None
```

| Name | Type |
|------|------|
| `schema_version` | `int` |
| `workspace_id` | `str` |
| `cwd` | `str` |
| `project_root` | `str \| None` |
| `generation` | `int` |
| `resource_key` | `str` |
| `config_fingerprint` | `str` |
| `workspace_config_json` | `str` |
| `policy_fingerprint` | `str` |
| `runtime_fingerprint` | `str` |


## Properties

- `schema_version`
- `workspace_id`
- `cwd`
- `project_root`
- `generation`
- `resource_key`
- `config_fingerprint`
- `workspace_config_json`
- `policy_fingerprint`
- `runtime_fingerprint`

## Methods

- [`to_payload()`](https://reference.langchain.com/python/deepagents-code/workspace/WorkspaceBinding/to_payload)
- [`workspace_config()`](https://reference.langchain.com/python/deepagents-code/workspace/WorkspaceBinding/workspace_config)

---

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