XDG_{CONFIG,DATA,STATE,CACHE}_HOME so config, data, state, and cache can live on different volumes. Existing single-root installs (~/.praisonai/ or PRAISONAI_HOME) keep working unchanged.
Quick Start
1
Default (existing installs, unchanged)
2
Split classes onto different volumes
3
Explicit single root (PRAISONAI_HOME) still wins
Which directory does what?
Each class has its own purpose, precedence, and helper.One asymmetry:
get_data_dir() keeps ~/.praisonai as the branded fallback (not ~/.local/share/praisonai) unless you explicitly set XDG_DATA_HOME. This is intentional back-compat with existing installs.How It Works
The single-root decision runs once, then per-class XDG dirs apply on a fresh install. Behaviour notes:- Back-compat is preserved. If
~/.praisonai/(or~/.praison/) already exists, orPRAISONAI_HOMEis set, every class stays under that single root. - The single-root decision is snapshotted once per process. If PraisonAI later creates
~/.praisonai/mid-run for data, config/state/cache do not retroactively move onto it. - Relative XDG paths are ignored, per spec.
XDG_CONFIG_HOME=relative/pathfalls back to~/.config/praisonai. get_session_spill_dir()now lives under<state>/state/session_spill/— no longer under~/.praisonai/state/.get_config_path()now returns<config>/config.yaml— no longer<data>/config.yaml.- Split state ends. MRU model recency now writes under the canonical state home, so
~/.praisonand~/.praisonaino longer disagree.
Configuration Options
Python API
Common Patterns
- Kubernetes
- systemd service
- CI runners
- Existing install
Mount a ConfigMap at
$XDG_CONFIG_HOME, a PVC at $XDG_DATA_HOME, and an emptyDir at $XDG_CACHE_HOME.Best Practices
🗂️ Separate volumes by class
🗂️ Separate volumes by class
Back up
$XDG_CONFIG_HOME/praisonai (small, precious); put $XDG_CACHE_HOME/praisonai on tmpfs (disposable); size $XDG_DATA_HOME/praisonai for session/memory growth.🧭 Use PRAISONAI_HOME when you want one directory
🧭 Use PRAISONAI_HOME when you want one directory
It short-circuits XDG entirely and keeps every class under one root.
🧾 Check the resolved paths
🧾 Check the resolved paths
Run
praisonai paths show — the output now includes config_dir and state_dir.🚫 Don't use relative XDG paths
🚫 Don't use relative XDG paths
Per spec they’re ignored and the default applies.
Related
Storage Paths
The full storage-path concept reference.
CLI Configuration
Layered config precedence for the CLI.
Env Config Injection
Supply the config layer from the environment.
Security Environment Variables
Zero-disk auth and other security env vars.

