<!-- source: https://deepwiki.com/MervinPraison/PraisonAI/8.1-consolidated-parameters -->

# Consolidated Parameters

- src/praisonai-agents/praisonaiagents/agent/agent.py
- src/praisonai-agents/praisonaiagents/agents/agents.py
- src/praisonai-agents/praisonaiagents/llm/llm.py

This document describes PraisonAI's **consolidated parameters system**, which provides a unified configuration interface for Agent and Workflow configuration. The system standardizes how 12 core features (memory, output, execution, planning, reflection, guardrails, web, context, autonomy, caching, knowledge, hooks) are configured across the framework through a flexible multi-form input pattern and precedence hierarchy.

For implementation details of individual subsystems, see: [Memory Management](/MervinPraison/PraisonAI/4.1-memory-management), [Knowledge Management](/MervinPraison/PraisonAI/4.2-knowledge-management), [Planning System](/MervinPraison/PraisonAI/3.3-planning-system), [Reflection System](/MervinPraison/PraisonAI/3.4-reflection-system), [Guardrails](/MervinPraison/PraisonAI/6.1-guardrails). For preset configurations, see [Presets and Defaults](/MervinPraison/PraisonAI/8.2-presets-and-defaults). For environment-level configuration, see [Environment Variables](/MervinPraison/PraisonAI/8.3-environment-variables).

## System Overview

The consolidated parameters system implements a **multi-form input pattern** where each parameter accepts multiple input types (bool, string, dict, array, config instance) that are internally normalized to a common configuration object. This provides both simple string-based presets for common use cases and detailed dict/instance configuration for advanced scenarios.

```

```

**Sources:** [examples/consolidated_params/README.md1-97](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L1-L97) [examples/consolidated_params/basic_agent.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_agent.py#L1-L19)

## Precedence Hierarchy

Configuration values follow a strict precedence ladder when multiple sources provide the same parameter:

```
Instance > Config > Array > Dict > String > Bool > Default
```

This hierarchy allows step-level overrides in workflows, where a step can override its parent workflow's configuration:

```

```

**Sources:** [examples/consolidated_params/README.md6-10](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L6-L10) [examples/consolidated_params/basic_step_override.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_step_override.py#L1-L19)

## The Twelve Consolidated Parameters

```

```

**Sources:** [examples/consolidated_params/README.md11-24](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L11-L24)

### 1. memory

Controls agent memory persistence for short-term context, long-term facts, entities, and episodic history.

**Available Presets:** `file`, `sqlite`, `redis`, `postgres`, `mem0`, `mongodb`

**Mapping to Implementation:**

- "file" -> FileMemory class from praisonaiagents/memory/file_memory.py
- "sqlite" -> SQLiteMemory class
- "redis" -> RedisMemory class
- "postgres" -> PostgresMemory class
- "mem0" -> Mem0Memory class
- "mongodb" -> MongoDBMemory class

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_memory.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_memory.py#L1-L19) [examples/consolidated_params/README.md15](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L15-L15)

### 2. output

Controls verbosity and formatting of agent output during execution.

**Available Presets:** `minimal`, `normal`, `verbose`, `debug`, `silent`

**Preset Definitions:**

- minimal : Only final results, no intermediate steps
- normal : Standard output with key steps
- verbose : Detailed output including reasoning
- debug : Full debug information including internal state
- silent : Suppress all console output

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_output.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_output.py#L1-L19) [examples/consolidated_params/README.md16](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L16-L16)

### 3. execution

Controls execution parameters like timeouts, retries, and resource limits.

**Available Presets:** `fast`, `balanced`, `thorough`, `unlimited`

**Preset Characteristics:**

- fast : Short timeouts, minimal retries, quick completion
- balanced : Moderate timeouts and retries (default)
- thorough : Extended timeouts, multiple retries, comprehensive execution
- unlimited : No timeouts or retry limits

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_execution.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_execution.py#L1-L19) [examples/consolidated_params/README.md17](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L17-L17)

### 4. planning

Enables agent planning capabilities for multi-step task decomposition.

**Available Presets:** `reasoning`, `read_only`, `auto`

**Preset Behaviors:**

- reasoning : Agent creates plan with chain-of-thought reasoning
- read_only : Plan created but agent doesn't modify it
- auto : Automatic planning mode selection based on task

**Mapping to Implementation:**

- Configured via PlanningAgent class
- Uses planning_tools parameter for plan execution
- planning_reasoning enables chain-of-thought

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_planning.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_planning.py#L1-L19) [examples/consolidated_params/README.md18](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L18-L18)

### 5. reflection

Enables self-reflection for output quality assessment and improvement.

**Available Presets:** `minimal`, `standard`, `thorough`

**Preset Characteristics:**

- minimal : Single-pass quality check
- standard : Multi-aspect evaluation
- thorough : Deep analysis with multiple iterations

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_reflection.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_reflection.py#L1-L19) [examples/consolidated_params/README.md19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L19-L19)

### 6. guardrails

Provides safety and validation checks for agent outputs and tool calls.

**Available Presets:** `strict`, `permissive`, `safety`

**Preset Characteristics:**

- strict : Stringent validation, high retry limits
- permissive : Relaxed validation, lower retry limits
- safety : Focus on content safety and harmful output prevention

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_guardrails.py1-25](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_guardrails.py#L1-L25) [examples/consolidated_params/README.md20](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L20-L20)

### 7. web

Enables web search capabilities with different search providers.

**Available Presets:** `duckduckgo`, `tavily`, `google`, `bing`, `serper`

**Mapping to Implementation:**

- "duckduckgo" -> DuckDuckGo search tool (no API key required)
- "tavily" -> Tavily API search
- "google" -> Google Custom Search API
- "bing" -> Bing Search API
- "serper" -> Serper.dev API

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_web.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_web.py#L1-L19) [examples/consolidated_params/README.md21](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L21-L21)

### 8. context

Controls context window management strategies for handling long conversations.

**Available Presets:** `sliding_window`, `summarize`, `truncate`

**Preset Behaviors:**

- sliding_window : Keep most recent N messages in context
- summarize : Compress old messages using LLM summarization
- truncate : Remove oldest messages when limit reached

**Mapping to Implementation:**

- Managed by ContextManager class
- sliding_window uses rolling buffer
- summarize calls LLM for compression
- truncate performs hard cutoff

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_context.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_context.py#L1-L19) [examples/consolidated_params/README.md22](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L22-L22)

### 9. autonomy

Controls autonomous operation modes for agent self-direction.

**Available Presets:** `suggest`, `auto_edit`, `full_auto`

**Preset Behaviors:**

- suggest : Agent suggests actions, requires approval
- auto_edit : Agent can make edits with confirmation
- full_auto : Fully autonomous operation without approval

**Mapping to Implementation:**

- Controlled by run_autonomous() method
- Uses DoomLoopTracker for infinite loop detection
- AutonomyTrigger determines when to stop

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_autonomy.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_autonomy.py#L1-L19) [examples/consolidated_params/README.md23](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L23-L23)

### 10. caching

Controls prompt and response caching for performance optimization.

**Available Presets:** `enabled`, `disabled`, `prompt`

**Preset Behaviors:**

- enabled : Cache both prompts and responses
- disabled : No caching
- prompt : Cache prompts only (for Anthropic prompt caching)

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_caching.py1-24](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_caching.py#L1-L24) [examples/consolidated_params/README.md24](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L24-L24)

### 11. knowledge

Enables RAG (Retrieval Augmented Generation) with document knowledge bases.

**Configuration Keys:**

- sources : List of file/folder paths
- vector_store : Backend (chromadb, pinecone, qdrant, weaviate, mongodb, mem0)
- chunking_strategy : How to split documents
- embedding_model : Model for embeddings
- retrieval_strategy : dense, bm25, hybrid
- reranker : Optional reranking model

**Mapping to Implementation:**

- Knowledge class handles document ingestion
- Chunking via configurable strategies
- Vector stores through unified interface
- Retrieval through ContextPack system

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_knowledge.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_knowledge.py#L1-L19) [README.md277-285](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L277-L285)

### 12. hooks

Provides lifecycle hooks for monitoring and extending agent behavior.

**Valid Hook Keys:**

- on_step : Called after each execution step
- on_tool_call : Called when tools are invoked
- middleware : Custom middleware functions

**Hook Signatures:**

```

```

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_hooks.py1-29](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_hooks.py#L1-L29) [README.md398](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/README.md?plain=1#L398-L398)

## Parameter Normalization Flow

The following diagram shows how input forms are normalized to configuration objects:

```

```

**Sources:** [examples/consolidated_params/README.md68-86](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L68-L86)

## Multi-Agent Configuration Inheritance

In multi-agent systems using the `Agents` class, consolidated parameters follow an inheritance hierarchy:

```

```

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_agents.py1-28](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_agents.py#L1-L28)

## Workflow Step-Level Overrides

Workflows support step-level parameter overrides, allowing individual steps to use different configurations:

```

```

**Example:**

```

```

**Sources:** [examples/consolidated_params/basic_step_override.py1-37](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_step_override.py#L1-L37)

## Configuration Validation

Each normalized configuration object performs validation to ensure parameter consistency:

**Error Handling:**

- Invalid presets raise ValueError with available options
- Missing required fields raise ConfigurationError
- Type mismatches raise TypeError with expected type
- Validation failures provide detailed error messages

**Sources:** Inferred from system design and validation patterns

## Usage Patterns

### Simple Agent with Presets

```

```

### Advanced Agent with Dict Config

```

```

### Workflow with Mixed Configurations

```

```

### Guardrails with Custom Validator

```

```

**Sources:** [examples/consolidated_params/basic_agent.py1-19](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/basic_agent.py#L1-L19) [examples/consolidated_params/advanced_workflow_full_features.py1-50](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/advanced_workflow_full_features.py#L1-L50)

## Parameter Reference Table

**Sources:** [examples/consolidated_params/README.md11-24](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/examples/consolidated_params/README.md?plain=1#L11-L24) [api.md15-75](https://github.com/MervinPraison/PraisonAI/blob/ab80807b/api.md?plain=1#L15-L75)
