CompositeBackend(
self,
default: BackendProtocol | StateBackend,
routes: dict[str, | Name | Type | Description |
|---|---|---|
default* | BackendProtocol | StateBackend | Backend for paths that don't match any route. |
routes* | dict[str, BackendProtocol] | Map of path prefixes to backends. Prefixes must start with "/" and should end with "/" (e.g., "/memories/"). |
artifacts_root | str | Default: '/' |
| Name | Type |
|---|---|
| default | BackendProtocol | StateBackend |
| routes | dict[str, BackendProtocol] |
| artifacts_root | str |
Routes file operations to different backends by path prefix.
Matches paths against route prefixes (longest first) and delegates to the corresponding backend. Unmatched paths use the default backend.
Root path for artifacts, such as messages offloaded
by middleware. Defaults to "/".