> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/2-4-1/cybus-helm-charts/connectware-agent-helm-chart/agent-persistence.md).

# Configuring Agent Persistence for the connectware-agent Helm Chart

Agents deployed with the `connectware-agent` Helm chart use persistent storage to retain data across pod restarts and upgrades.

You can configure the storage class, volume size, and access mode to match your cluster's storage capabilities and performance requirements.

{% hint style="warning" %}
You cannot change persistence configuration for existing agents. To apply persistence changes, you must uninstall the agent and remove its PersistentVolumeClaim, then reinstall the agent with the new configuration.
{% endhint %}

## Configuring the Storage Class

By default, agents use the Kubernetes cluster's default storage class. To specify a different storage class, set the `persistence.storageClassName` parameter in your `values.yaml` file. Replace `${STORAGE_CLASS_NAME}` with the name of your storage class.

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  persistence:
    storageClassName: ${STORAGE_CLASS_NAME}
```

{% endcode %}

To see which storage classes are available in your cluster, run `kubectl get sc`.

If your cluster has no default storage class and you do not configure this parameter, the PersistentVolumeClaim remains unscheduled and the agent cannot start.

To override this setting for specific agents, set `persistence.storageClassName` within specific agent entries in `protocolMapperAgents`, as described in [Configuration Principles for the connectware-agent Helm Chart](/2-4-1/cybus-helm-charts/connectware-agent-helm-chart.md#configuration-principles-for-the-connectware-agent-helm-chart).

## Configuring the Volume Size

To specify the size of the PersistentVolume used by agents, set the `persistence.size` parameter in your `values.yaml` file to a valid Kubernetes quantity:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  persistence:
    size: 500Mi
```

{% endcode %}

## Configuring the Access Mode

To specify the access mode for the PersistentVolume used by agents, set the `persistence.accessMode` parameter in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  persistence:
    accessMode: ReadWriteMany
```

{% endcode %}

Valid values are `ReadWriteOnce`, `ReadWriteMany`, and `ReadWriteOncePod`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cybus.io/2-4-1/cybus-helm-charts/connectware-agent-helm-chart/agent-persistence.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
