> ## 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.compatibility

> 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 |
| - | - |
| [`FRAMEWORK_COMPATIBILITY`](#framework_compatibility) | Value or type alias |
| [`FrameworkCompatibility`](#frameworkcompatibility) | Class |
| [`FrameworkCompatibilityError`](#frameworkcompatibilityerror) | Class |
| [`ResolvedFrameworkCompatibility`](#resolvedframeworkcompatibility) | Class |
| [`current_harnest_version`](#current_harnest_version) | Function |
| [`validate_framework_compatibility`](#validate_framework_compatibility) | Function |

## FRAMEWORK\_COMPATIBILITY

```python theme={null}
FRAMEWORK_COMPATIBILITY = mappingproxy({'adk': FrameworkCompatibility(framework='adk', distribution='google-adk', versions='>=2.8,<3', install_extra='adk'), 'langgraph': FrameworkCompatibility(framework='langgraph', distribution='langgraph', versions='>=1.2,<2', install_extra='langgraph')})
```

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

## FrameworkCompatibility

Supported distribution range for one framework backend.

```python theme={null}
FrameworkCompatibility(framework: str, distribution: str, versions: str, install_extra: str) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `framework` | `str` | `—` |
| `distribution` | `str` | `—` |
| `versions` | `str` | `—` |
| `install_extra` | `str` | `—` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `framework` | `str` | Required |
> | `distribution` | `str` | Required |
> | `versions` | `str` | Required |
> | `install_extra` | `str` | Required |
>
> ```python theme={null}
> from harnest.compatibility import FrameworkCompatibility
>
> compatibility = FrameworkCompatibility(
>     framework=...,
>     distribution=...,
>     versions=...,
>     install_extra=...,
> )
> ```

## FrameworkCompatibilityError

An installed framework is absent or unsupported by this release.

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

## ResolvedFrameworkCompatibility

Versions resolved and validated for one compilation.

```python theme={null}
ResolvedFrameworkCompatibility(
    harnest_version: str,
    framework: str,
    distribution: str,
    distribution_version: str,
    supported_versions: str,
) -> None
```

Fields (`—` means no declared default):

| Field | Type | Default |
| - | - | - |
| `harnest_version` | `str` | `—` |
| `framework` | `str` | `—` |
| `distribution` | `str` | `—` |
| `distribution_version` | `str` | `—` |
| `supported_versions` | `str` | `—` |

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `harnest_version` | `str` | Required |
> | `framework` | `str` | Required |
> | `distribution` | `str` | Required |
> | `distribution_version` | `str` | Required |
> | `supported_versions` | `str` | Required |
>
> ```python theme={null}
> from harnest.compatibility import ResolvedFrameworkCompatibility
>
> compatibility = ResolvedFrameworkCompatibility(
>     harnest_version=...,
>     framework=...,
>     distribution=...,
>     distribution_version=...,
>     supported_versions=...,
> )
> ```

## current\_harnest\_version

Return the installed Harnest distribution version.

The fallback keeps source-tree execution useful before an editable install;
release automation must keep it aligned with `pyproject.toml`.

```python theme={null}
current_harnest_version() -> str
```

> [accordion] Example
>
> ```python theme={null}
> from harnest.compatibility import current_harnest_version
>
> result = current_harnest_version()
> ```

## validate\_framework\_compatibility

Resolve and validate the framework distribution installed at compile time.

```python theme={null}
validate_framework_compatibility(framework: str) -> ResolvedFrameworkCompatibility
```

> [accordion] Parameters and example
>
> | Parameter | Type | Default |
> | - | - | - |
> | `framework` | `str` | Required |
>
> ```python theme={null}
> from harnest.compatibility import validate_framework_compatibility
>
> compatibility = validate_framework_compatibility(framework=...)
> ```


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