Skip to main content
On fresh installs, PraisonAI honours 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, or PRAISONAI_HOME is 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/path falls 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 ~/.praison and ~/.praisonai no longer disagree.

Configuration Options

Python API


Common Patterns

Mount a ConfigMap at $XDG_CONFIG_HOME, a PVC at $XDG_DATA_HOME, and an emptyDir at $XDG_CACHE_HOME.

Best Practices

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.
It short-circuits XDG entirely and keeps every class under one root.
Run praisonai paths show — the output now includes config_dir and state_dir.
Per spec they’re ignored and the default applies.

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.