True to a feature, it uses your configured defaults.
.praisonai/config.toml; explicit Agent parameters still override the file.
How It Works
classDef agent fill:#8B0000,color:#fff classDef tool fill:#189AB4,color:#fff Precedence (highest to lowest):- Explicit parameters in code
- Environment variables
- Config file
- Built-in defaults
Project Config
.praisonai/config.toml — project-specific defaultsRoot Config
praisonai.toml — project root alternativeUser Global
~/.praisonai/config.toml — applies across projectsEnvironment Override
PRAISONAI_* env vars beat config file valuesQuick Start
Use in Code
PraisonAI now validates field names automatically — see Automatic Field Validation for typo detection and suggestions.
Config File Locations
Config files are searched in this order:| Location | Scope |
|---|---|
.praisonai/config.toml · .yaml · .yml | Project-specific |
praisonai.toml · .yaml · .yml | Project root |
~/.praisonai/config.toml · .yaml · .yml | User global |
Small Model for Cheap Internal Calls
small_model routes internal LLM calls (session title generation today; summarisation/compaction going forward) to a cheaper model than your primary model.
gpt-4o-mini.
Resolution precedence (highest first):
| Field | Type | Default | Description |
|---|---|---|---|
small_model | str | None (falls back to gpt-4o-mini) | Cheap auxiliary model for internal LLM calls. Falls back to primary_model, then defaults.model, then gpt-4o-mini. |
An explicit
llm_model= at the call site (e.g. generate_title(..., llm_model="gpt-4o")) always wins over small_model.The CLI/JSON-schema namespace
agent.small_model is honoured too — both defaults.small_model and agent.small_model read the same config file.Full Configuration Reference
- Plugins
- LLM Defaults
- Memory
- Knowledge
- Planning & Reflection
- Output & Execution
Both formats are discovered —
.praisonai/config.toml and .praisonai/config.yaml (plus .yml) share the same search walk. A per-plugin <name>: { ... } block also implicitly opts that plugin in unless it sets enabled: false.When
[plugins] enabled = true (or PRAISONAI_PLUGINS=true), constructing any Agent(...) calls plugins.maybe_enable_from_config() internally — you don’t need to call plugins.enable() yourself. Per-plugin option maps are delivered automatically to each plugin’s on_config(options) hook. See Plugins → Configure from config.yaml for the full per-plugin surface.Cheap auxiliary model for internal calls
small_model sets a cheap/fast model for PraisonAI’s internal LLM calls (session-title generation today; summarisation/compaction in future), independent of your agent’s primary model.
| Field | Type | Default | Description |
|---|---|---|---|
defaults.small_model | str (optional) | None (falls back to primary model, then gpt-4o-mini) | Cheap/fast auxiliary model used for internal LLM calls. Honoured under both [defaults] (typed loader) and [agent] (CLI/JSON-schema) namespaces of the same config file. |
get_small_model(primary_model, fallback):
defaults.small_model(oragent.small_modelCLI namespace) — if set.primary_model— the running agent’s model, if any.defaults.model(oragent.model) — if set.fallback— preserves today’s hardcodedgpt-4o-miniwhen nothing is configured.
Usage Examples
Cheap auxiliary model for internal calls
Cheap auxiliary model for internal calls
Use a cheap/fast model for internal work (session titles, summarisation) while keeping a powerful primary model for the agent itself.Single-provider setups work the same way:Explicit
Agent(...) kwargs still override the config file, same as model.Memory with PostgreSQL
Memory with PostgreSQL
Knowledge with Reranking
Knowledge with Reranking
Verbose Output Mode
Verbose Output Mode
Local LLM (Ollama)
Local LLM (Ollama)
Programmatic Access
Access config values programmatically:Auxiliary / Small Model Resolution
small_model routes PraisonAI’s internal LLM calls — session-title generation today, summarisation and compaction going forward — to a cheap, fast, or local model without changing your agent’s primary model.
small_model to a local model to keep background calls off third-party APIs:
llm_model > defaults.small_model > primary_model > defaults.model > built-in gpt-4o-mini.
Resolve the auxiliary model programmatically:
agent.small_model reaches the same resolver, so both [defaults] and [agent] in the same config file work.
small_model is fully additive. When it is unset and no primary model is available, the resolver returns gpt-4o-mini — reproducing the previous hardcoded behaviour exactly.Config Validation
Config files are validated automatically. Invalid keys trigger helpful error messages with suggestions.
Override Precedence
Explicit parameters always override config defaults:Sample Config File
Best Practices
Set org-wide defaults, override per agent
Set org-wide defaults, override per agent
Put values every project should share (model, memory backend, output preset) in
.praisonai/config.toml, and let explicit Agent(...) parameters override them where a specific agent needs something different. Explicit parameters always win over the file, so the config is a floor, not a cage.Remember the precedence order
Remember the precedence order
Configuration resolves as Explicit Agent parameter > Environment variable > Config file > Built-in default. When a setting seems ignored, check for a higher-precedence source (an env var like
PRAISONAI_PLUGINS=true or an explicit kwarg) before editing the TOML.Keep the file in version control
Keep the file in version control
Commit
.praisonai/config.toml so every teammate and CI run starts from the same defaults. Keep secrets (API keys) in environment variables, not the config file, so the file stays safe to share.Enable features conservatively
Enable features conservatively
Most feature defaults ship disabled (
enabled = false) for a reason — turning on memory, knowledge, or reflection globally adds latency and cost to every agent. Enable them in the config only when the whole project needs them; otherwise flip them on per agent.Related
Run agents and YAML configs directly from your terminal.
See every field available in YAML agent and task configuration.
Plugins
Auto-enable plugins from
[plugins] on Agent init.Tool Discovery
How Agent resolves tool names at runtime.

