praisonai CLI reads defaults from a layered hierarchy so you can set a model once and have it work everywhere — globally, per project, or per command.
Quick Start
When you
praisonai run, CLI defaults flow into the agent automatically:
How It Works
Layers are deep-merged. Lists are concatenated. Scalars are overridden by higher layers.| Layer | Source | Precedence |
|---|---|---|
| 1 | Built-in defaults | Lowest |
| 2 | Global ~/.praisonai/config.yaml (+ legacy paths) | |
| 3 | Project config (walk-up to git root) | |
| 4 | Environment variables | |
| 5 | CLI flags | Highest |
Project vs Global Config
| Location | Scope | Commit to repo? |
|---|---|---|
~/.praisonai/config.yaml | All projects on this machine | No |
./.praisonai/config.yaml | This project (and subdirectories) | Yes |
./praison.yaml / ./praison.yml | Alternative project names | Yes |
./.praison/config.toml | Legacy TOML (backward compat) | Optional |
cwd up to the git root:
.praisonai/config.yaml.praisonai/config.ymlpraison.yamlpraison.yml.praison/config.toml(legacy)
Choose Your Scope
Configuration Schema
agent.* defaults
| Key | Type | Default | Notes |
|---|---|---|---|
agent.model | str | None | e.g. gpt-4o-mini, claude-sonnet-4-6 |
agent.provider | str | None | e.g. openai, anthropic |
agent.base_url | str | None | Custom LLM base URL |
agent.tools | list[str] | [] | Default tool names |
agent.toolset | str | None | Named toolset |
agent.default_agent | str | None | Default agent slug |
agent.memory | bool or dict | None | Enable memory or config dict |
agent.stream | bool | True | Stream responses |
agent.temperature | float | 0.7 | LLM temperature |
agent.max_tokens | int | 16000 | LLM token budget |
api_key is never serialised to YAML — use environment variables or praisonai auth.output, mcp, rules, traces, session) are unchanged — see Config CLI reference and linked feature pages.
Environment Variables
| Variable | Maps to | Notes |
|---|---|---|
MODEL_NAME | agent.model | |
OPENAI_MODEL_NAME | agent.model | |
PRAISONAI_MODEL | agent.model | |
PRAISONAI_PROVIDER | agent.provider | |
OPENAI_BASE_URL | agent.base_url | |
OPENAI_API_BASE | agent.base_url | |
PRAISONAI_BASE_URL | agent.base_url | |
PRAISONAI_OUTPUT_FORMAT | output.format | |
PRAISONAI_COLOR | output.color | bool: true/1/yes |
PRAISONAI_VERBOSE | output.verbose | bool |
PRAISONAI_QUIET | output.quiet | bool |
PRAISONAI_TELEMETRY | telemetry | bool |
Subcommand Reference
| Command | Flags | Behaviour |
|---|---|---|
praisonai config show | --format yaml|json|table, --sources/-s | Prints fully resolved config; with --sources, lists contributing layers |
praisonai config validate [FILE] | optional FILE | Validates YAML syntax + schema; no arg validates resolved config |
praisonai config sources | none | Prints precedence hierarchy and active layers |
praisonai config list | --scope all|user|project | Lists resolved values; verbose shows sources |
praisonai config get KEY | dotted path | e.g. agent.model |
praisonai config set KEY VALUE | --scope user|project | Writes YAML (0600 user, 0644 project) |
praisonai config reset | --scope user|project, -y | Deletes corresponding config.yaml |
praisonai config path | --scope user|project | Shows config file path and existence |
praisonai config env | --scope, --validate | Registered env vars and validation |
praisonai config doctor | none | Configuration diagnostics |
Backward Compatibility
Legacy ~/.praison/config.toml
Legacy ~/.praison/config.toml
Still read on startup if no YAML config exists. RAG and model keys are migrated to the new
agent.* / rag.* schema automatically.Legacy ~/.praisonai/.env
Legacy ~/.praisonai/.env
Model and provider keys from
.env are merged into the resolved config when no YAML is present.Project .praison/config.toml
Project .praison/config.toml
Walk-up discovery still finds legacy TOML project configs and migrates them on read.
Best Practices
Pin model per project
Pin model per project
Commit
.praisonai/config.yaml to your repo so teammates get the same defaults.Keep secrets out of YAML
Keep secrets out of YAML
api_key is never serialised; use env vars or praisonai auth.Use config sources to debug
Use config sources to debug
When behaviour surprises you,
praisonai config sources prints exactly which layer won.Walk-up means subdirectories inherit
Walk-up means subdirectories inherit
Running
praisonai from repo/scripts/ finds repo/.praisonai/config.yaml.Related
Config CLI Reference
Full subcommand reference for
praisonai configConfiguration Index
SDK-level agents, tasks, and memory configuration
Runtime Selection
Model-scoped runtime configuration
LLM Endpoint Config
Custom base URLs and provider routing

