runtime.memory.provider: local). On the cloud runner, workspace files are persisted under a managed workspace path (backed by cloud storage for serverless/daemon workloads).
For Redis, PostgreSQL, or other backends, install a memory plugin or use the built-in supabase provider where configured.
Configuring a provider
CHARM_MEMORY_PROVIDER from this block so runtime code can resolve the active backend.
Built-in provider names today:
| Provider | Source |
|---|---|
local (default) | Core — file-backed |
supabase | Core — when Supabase memory is configured |
| Custom names | charm.memory entry points |
Underlying Checkpoint Mechanism
When using an external provider likesupabase, Charm leverages thread identifiers (thread_id) and checkpoint namespaces to continuously sync state to the database. Upon waking up or migrating across devices, the runtime automatically queries the most recent state checkpoint. This architecture provides zero-downtime perception and seamless cross-device continuity without additional developer overhead.
Creating a memory plugin
1. Implement BaseMemoryStore
2. Register via entry points
3. Use in charm.yaml
Using memory from agent code
StorageManager caches the active provider for the process. Pass the same config dict shape as runtime.memory.config when constructing plugins that need connection settings.
Cloud deployment
Unlike heavy adapters, Memory plugins are typically lightweight (e.g.redis, pymongo). This means the Charm Cloud Runner can install them dynamically at boot time without timing out.
You do NOT need a custom_image to use most Memory Providers!
- Add the package to your agent’s
requirements.txt:
- Enable it in
charm.yaml:
- Ensure
policies.allow_internet_access(or network policy) allows reaching your database. - Provide connection secrets via environment variables — not in committed
charm.yaml.
psycopg2-binary takes longer), you should bake it into a runtime.custom_image instead.
If the configured plugin is not found at runtime, Charm falls back to local file memory and logs a warning.
Share with the Community
Once your memory provider is working and published to PyPI, you can list it in the official Charm Store! Submit a Pull Request to the charm-community-plugin repository to add your package tomemory/registry.json. Your integration will immediately appear on the Plugins page for other developers to discover.
