PRAISONAI_DESKTOP_HOME="" no longer picks a different directory for the Rust shell than for the Python engine.
Quick Start
1
Override the data directory
Set
PRAISONAI_DESKTOP_HOME to a folder before launching to keep a separate profile.2
Isolate secrets
Set
PRAISONAI_KEYCHAIN_SERVICE to keep test keys out of your real keychain entry.3
Leave the encoding vars alone
PYTHONUTF8 and PYTHONIOENCODING are set by the shell for the engine. You do not need to set them yourself.How the engine gets its environment
The Desktop shell rebuilds the engine’s environment from the resolved venv before spawning it — it does not hand the engine your shell untouched. Most variables pass through unchanged — provider keys (OPENAI_API_KEY, TAVILY_API_KEY), Desktop vars (PRAISONAI_DESKTOP_HOME, PRAISONAI_KEYCHAIN_SERVICE, PRAISONAI_AGENTS_SOURCE, PRAISONAI_TRAIN_CMD, PRAISONAI_MODEL), and platform vars (HOME, APPDATA, XDG_DATA_HOME).
Three variables are stripped by the shell before the engine spawns: PYTHONHOME, PYTHONPATH, PYTHONSTARTUP. Setting them in your shell does nothing for the engine — they would otherwise redirect the engine’s stdlib or site-packages away from the venv the shell just resolved.
Two variables are always set by the shell: VIRTUAL_ENV (points at the resolved venv root) and PATH (the venv’s bin/Scripts prepended to whatever PATH you exported).
Reference
Per-provider variables the engine writes
The app does not send your credential fields to OpenAI only. It writes them to the variables named for the selected provider — thebase_url field is exported as <PROVIDER>_API_BASE, and api_key as <PROVIDER>_API_KEY. The provider is taken from the model id’s slashed prefix; a bare id is treated as OpenAI. The specific overrides encoded in PROVIDER_ENV_OVERRIDES in the engine’s server.py:
The OpenAI pair is always kept in step, so switching back to a bare id after using a slashed one does not leave a stale endpoint behind.
Data Directory Precedence
The data directory follows one order per platform, and both the Rust shell and the Python engine derive it the same way.Encoding on Non-English Locales
The shell exportsPYTHONUTF8=1 and PYTHONIOENCODING=utf-8 to the engine so its output decodes cleanly on CP932 (Japanese) or CP1252 (Western European) systems.
Setting these yourself is redundant — the shell already does it.
Best Practices
Unset rather than blank
Unset rather than blank
An empty value is unset. To fall back to the platform default, remove the variable rather than setting it to
"".Isolate secrets for testing
Isolate secrets for testing
Set
PRAISONAI_KEYCHAIN_SERVICE to a distinct name so a test run never overwrites the key you actually use — PRAISONAI_DESKTOP_HOME isolates data, not the system keyring. The engine’s own redaction test suite makes this a hard rule: it refuses to run unless the service is set away from the default ai.praison.desktop, so a test can never touch your real keychain entry.Leave a provider key in the environment
Leave a provider key in the environment
Export
OPENAI_API_KEY and leave the settings api_key blank to keep the credential out of the app entirely.Point the engine at a local checkout with PRAISONAI_AGENTS_SOURCE, not PYTHONPATH
Point the engine at a local checkout with PRAISONAI_AGENTS_SOURCE, not PYTHONPATH
PYTHONPATH is stripped by design before the engine spawns, so it never reaches the engine. Set PRAISONAI_AGENTS_SOURCE to your praisonaiagents checkout instead — that variable passes through unchanged.Don't override the UTF-8 exports
Don't override the UTF-8 exports
The shell already sets
PYTHONUTF8=1 and PYTHONIOENCODING=utf-8 so the engine starts on non-English locales. Overriding them reintroduces the startup-timeout bug they fix.Related
Data & Privacy
Where the data directory lives and what it holds
Models & API Keys
How provider keys and the keychain interact
Engine API
Read the true
data_dir from /healthTroubleshooting
The non-UTF-8 startup timeout

