Skip to main content
Set default values for all Agent parameters using a configuration file. When you pass True to a feature, it uses your configured defaults.
The user sets defaults in .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):
  1. Explicit parameters in code
  2. Environment variables
  3. Config file
  4. Built-in defaults

Project Config

.praisonai/config.toml — project-specific defaults

Root Config

praisonai.toml — project root alternative

User Global

~/.praisonai/config.toml — applies across projects

Environment Override

PRAISONAI_* env vars beat config file values

Quick Start

1

Create Config File

Create .praisonai/config.toml in your project:
2

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:
LocationScope
.praisonai/config.toml · .yaml · .ymlProject-specific
praisonai.toml · .yaml · .ymlProject root
~/.praisonai/config.toml · .yaml · .ymlUser 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.
When unset, behaviour is byte-identical to today: internal calls fall back to gpt-4o-mini. Resolution precedence (highest first):
FieldTypeDefaultDescription
small_modelstrNone (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

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.
FieldTypeDefaultDescription
defaults.small_modelstr (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.
Resolution order for get_small_model(primary_model, fallback):
  1. defaults.small_model (or agent.small_model CLI namespace) — if set.
  2. primary_model — the running agent’s model, if any.
  3. defaults.model (or agent.model) — if set.
  4. fallback — preserves today’s hardcoded gpt-4o-mini when nothing is configured.

Usage Examples

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.

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.
Set small_model to a local model to keep background calls off third-party APIs:
The resolver picks the first available source top to bottom: Precedence: explicit llm_model > defaults.small_model > primary_model > defaults.model > built-in gpt-4o-mini. Resolve the auxiliary model programmatically:
The CLI/schema namespace 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

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.
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.
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.
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.

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.