# pllm.state Python API

Public objects, practical usage, and research context for pllm.state.

[View canonical HTML](https://pllm.run/sdk/reference/python/pllm/state/)

Document ID: `pllm.docs.reference.python.pllm.state`  
Release: `0.1.0`

State components identify where persistent decoder state lives and keep mutable KV lifecycle out of immutable configuration records. Presence documents API availability, not complete model, security, or deployment coverage; check [implementation status](/sdk/reference/status/) before relying on a path.

## Research context

Relevant design inputs: [MPCache](/research/papers/r23-mpcache/). PLLM's implementation and evidence claims remain independent.

## Python SDK example

The example performs a bounded offline task and checks an observable result. It does not download a checkpoint or contact a provider.

```python
import pllm.state as state

protocol = state.ClientLocalKv()
assert protocol.component == "pllm/client-local-kv"
```

API: [`pllm.state`](/sdk/reference/python/pllm/state/#objects-and-signatures)

## Objects and signatures

### `ClientLocalKv`

Selects component `pllm/client-local-kv` during `online`; it provides `fixed-capacity-client-kv` for roles client.

- Canonical object: `pllm.state.ClientLocalKv`
- Kind: `class`
- Signature/type: `__init__(self) -> None`
- Public exports: `pllm.state.ClientLocalKv`
- Public members: `descriptor: ComponentDescriptor`; `__init__(self) -> None`; `classmethod describe(cls) -> ComponentDescriptor`

### `StateProtocol`

Immutable `StateProtocol` record carrying `component`, `params` for the workflow where state components identify where persistent decoder state lives and keep mutable kv lifecycle out of immutable configuration records.

- Canonical object: `pllm.state.StateProtocol`
- Kind: `class`
- Signature/type: `constructor not exposed`
- Public exports: `pllm.state.StateProtocol`
