Agent(...) constructor — False disables, True uses safe defaults, and config objects give full control.
The user configures memory, execution, and output in one Agent(...) call; the agent runs with those settings on the next prompt.
Each feature follows a consistent pattern:
False- Disabled (zero overhead)True- Enabled with safe defaultsConfig- Custom configuration objectInstance- Power user: pass your own manager/engine
How It Works
The agent reads the consolidated config once, then runs each prompt with those features active.Quick Start
1
Minimal agent
2
With feature configs
Feature Parameters
Output Configuration
Controls verbosity, formatting, and display behavior."minimal"- Quiet mode, no formatting"normal"- Default behavior"verbose"- Show metrics and reasoning"debug"- Maximum verbosity"silent"- No console output
Execution Configuration
Controls iteration limits, rate limiting, and timeouts.max_steps is the unified outer-loop step budget honoured identically by both execution loops. Detect truncation with agent.last_stop_reason == "max_steps". See Step Budget.
Presets:
"fast"- 10 iterations, 1 retry"balanced"- 20 iterations, 2 retries (default)"thorough"- 50 iterations, 5 retries"unlimited"- 1000 iterations, 10 retries
Memory Configuration
Enables persistent memory across conversations.Knowledge Configuration
Enables RAG (Retrieval-Augmented Generation) with documents.Planning Configuration
Enables multi-step planning before execution.Reflection Configuration
Enables self-reflection for improved responses.Guardrails Configuration
Enables output validation and safety checks.Web Configuration
Enables web search and fetch capabilities.Context Configuration
Enables unified context management.Autonomy Configuration
Controls agent autonomy, escalation, and doom-loop detection.Templates Configuration
Custom prompt templates.Caching Configuration
Controls response and prompt caching.Hooks Configuration
Middleware and callbacks.Skills Configuration
Agent skills integration.Backward Compatibility
All legacy flat parameters are still supported:Zero Overhead Design
All features use lazy initialization:- No imports until feature is accessed
- No memory allocated for disabled features
- No runtime cost when
feature=False
Best Practices
Prefer config objects over legacy flat params
Prefer config objects over legacy flat params
Use
execution=ExecutionConfig(...) instead of deprecated standalone flags — consolidated params win when both are set.Leave features disabled until needed
Leave features disabled until needed
memory=False, knowledge=False, etc. add zero import cost; enable only what the agent actually uses.Start with True, then tune
Start with True, then tune
Enable a feature with
True, observe behaviour, then swap in a config object for production limits.Import configs from the package root
Import configs from the package root
from praisonaiagents import MemoryConfig, OutputConfig keeps examples copy-paste friendly for non-developers.Related
Agent Config
Full reference for consolidated configuration objects.
Memory
Short- and long-term memory wired through
memory=MemoryConfig(...).
