> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# persistent_store

```python theme={null}
from intuned_runtime import persistent_store

persistent_store: PersistentStore
```

A persistent key-value store that maintains data across different API executions. This allows you to share data between different runs of your Projects.

**Constraints:**

* Keys must be at least 1 character long.
* Keys cannot contain `:` (colon) or `#` (hash) characters.
* Data stored must be JSON-serializable.

## `PersistentStore`

```python theme={null}
class PersistentStore:
    async def get(self, key: str) -> Any: ...
    async def set(self, key: str, value: Any) -> None: ...
```

## Method reference

### get

```python theme={null}
async def get(self, key: str) -> Any: ...
```

Retrieve a value from the persistent store.

**Parameters**

<ParamField body="key" type="str" required>
  The key to retrieve the value for. Must be at least 1 character long and cannot contain `:` or `#` characters.
</ParamField>

**Returns**

Returns the value associated with the key, or `None` if not found.

**Raises**

* `ValueError` — Raised if the key is invalid (empty or contains forbidden characters).

### set

```python theme={null}
async def set(self, key: str, value: Any) -> None: ...
```

Store a value in the persistent store.

**Parameters**

<ParamField body="key" type="str" required>
  The key to set the value for. Must be at least 1 character long and cannot contain `:` or `#` characters.
</ParamField>

<ParamField body="value" type="Any" required>
  The value to store. Can be any JSON-serializable type (dict, list, str, int, float, bool, None).
</ParamField>

**Returns**

Returns `None` when the value is successfully stored.

**Raises**

* `ValueError` — Raised if the key is invalid (empty or contains forbidden characters).

## Related

* [KV cache recipe](/main/01-learn/recipes/kv-cache) — Examples and patterns for using key-value stores.
* [attempt\_store](/main/05-references/runtime-sdk-python/attempt-store) — Store data scoped to the current attempt.
