Documentation Index
Fetch the complete documentation index at: https://docs.charmos.io/llms.txt
Use this file to discover all available pages before exploring further.
State & Memory Storage
By default, Charm persists your agent’s memory and state using the local filesystem (which the Charm Cloud Runner automatically syncs to a Google Cloud Storage bucket). However, if you are self-hosting your agents, or if you require an enterprise database like Redis or PostgreSQL for horizontal scaling and faster state retrieval, you can swap out the default memory provider by installing and configuring a Memory Storage Plugin.Configuring a Memory Provider
To use an external memory provider, specify it in yourcharm.yaml file under the runtime.memory section.
Creating a Custom Memory Plugin
If a plugin for your database doesn’t exist yet, you can easily build one. Just like adapters and telemetry exporters, Memory Storage plugins are discovered dynamically using Pythonentry_points.
1. Implement BaseMemoryStore
Create a new Python class that inherits from charm.core.storage.BaseMemoryStore.
2. Register the Plugin
In your package’spyproject.toml, add an entry to the charm.memory group:
pip install .), the Charm Runner will automatically discover the redis provider name and use it when configured in charm.yaml.
Using Memory in Custom Adapters
If you are writing a custom adapter or a standard Python agent and need to manually read or save the conversation history, you can access the active memory provider via theStorageManager:
Cloud Runner Considerations
When deploying to the Charm Cloud Runner, if yourcharm.yaml defines a custom memory provider like redis, the Runner will skip mounting the default GCS storage bucket. Instead, your agent container will boot immediately and connect directly to your external database, which can significantly reduce cold start times.