OutputConfig
Configure agent output behavior including verbosity, streaming, and formatting
Control how agents display output, from silent mode for programmatic use to verbose mode with rich formatting.
Quick Start
- Default (Silent Mode)
Silent mode is the default for programmatic use:
python from praisonaiagents import Agent # No output overhead - fastest performance agent = Agent( name="Silent Agent", instructions="Work quietly" ) - With Presets
Use string presets for common configurations:
python from praisonaiagents import Agent # Actions mode - shows tool calls agent = Agent( name="Traced Agent", instructions="Show what I do", output="actions" ) # Verbose mode - rich panels agent = Agent( name="Verbose Agent", instructions="Show everything", output="verbose" ) - With Configuration
Fine-grained control:
python from praisonaiagents import Agent from praisonaiagents.config import OutputConfig agent = Agent( name="Custom Output Agent", instructions="Custom output settings", output=OutputConfig( verbose=True, markdown=True, stream=True, metrics=True ) )
Configuration Options
from praisonaiagents.config import OutputConfig
config = OutputConfig(
# Verbosity
verbose=False,
# Formatting
markdown=False,
# Streaming
stream=False,
# Metrics display
metrics=False,
# Show reasoning steps
reasoning_steps=False,
# Output style
style=None,
# Actions trace mode
actions_trace=False,
# JSON output mode
json_output=False,
# Simple output (no panels)
simple_output=False,
# Show LLM parameters (debug)
show_parameters=False,
# Status trace mode
status_trace=False,
# Editor mode (numbered steps)
editor_output=False,
# Save response to file
output_file=None,
# Response format template
template=None,
# Max characters for tool output
tool_output_limit=16000
)| Parameter | Type | Default | Description | |
|---|---|---|---|---|
verbose | bool | False | Enable verbose output | |
markdown | bool | False | Format output as markdown | |
stream | bool | False | Stream output tokens | |
metrics | bool | False | Show performance metrics | |
reasoning_steps | bool | False | Display reasoning process | |
style | `Any \ | None` | None | Custom output styling |
actions_trace | bool | False | Show tool calls and lifecycle | |
json_output | bool | False | Emit JSONL events | |
simple_output | bool | False | Plain text without panels | |
show_parameters | bool | False | Show LLM parameters (debug) | |
status_trace | bool | False | Inline status updates | |
editor_output | bool | False | Beginner-friendly numbered steps | |
output_file | `str \ | None` | None | Save response to file |
template | `str \ | None` | None | Response format template |
tool_output_limit | int | 16000 | Max characters per tool output |
Output Presets
Eight primary presets cover the common cases. Default is "silent".
| Preset | Description | Equivalent OutputConfig(...) |
|---|---|---|
"silent" | No output (default, fastest) | all flags False |
"status" | Tool calls without timestamps | actions_trace=True, simple_output=True |
"trace" | Full execution trace with timestamps | actions_trace=True, status_trace=True |
"verbose" | Detailed with rich panels | verbose=True, markdown=True |
"debug" | Trace + metrics + reasoning | metrics=True, reasoning_steps=True, actions_trace=True, status_trace=True, show_parameters=True |
"stream" | Real-time token streaming | verbose=True, markdown=True, stream=True |
"json" | Machine-readable JSONL events | actions_trace=True, json_output=True |
"editor" | Beginner-friendly numbered steps | editor_output=True |
Aliases
Aliases map to a primary preset for backward compatibility.
| Alias | Maps To |
|---|---|
"plain" | "silent" |
"minimal" | "silent" |
"normal" | "verbose" |
"actions" | "status" |
"text" | "status" |
Common Patterns
Pattern 1: Streaming Chat
from praisonaiagents import Agent
from praisonaiagents.config import OutputConfig
agent = Agent(
name="Chat Agent",
instructions="Interactive chat",
output=OutputConfig(
stream=True,
markdown=True,
simple_output=True
)
)Pattern 2: Save to File
from praisonaiagents import Agent
from praisonaiagents.config import OutputConfig
agent = Agent(
name="Writer Agent",
instructions="Generate content",
output=OutputConfig(
output_file="output.md",
template="# {title}\n\n{content}"
)
)Pattern 3: JSON Pipeline
from praisonaiagents import Agent
from praisonaiagents.config import OutputConfig
agent = Agent(
name="Pipeline Agent",
instructions="Emit structured events",
output=OutputConfig(json_output=True)
)Best Practices
Use Silent Mode for Production
Silent mode has zero output overhead, making it ideal for programmatic use.
Use Actions Mode for Debugging
Actions trace shows tool calls and agent lifecycle without full verbosity.
Enable Streaming for Interactive Use
Streaming improves perceived responsiveness for chat interfaces.