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.

Diagram

Output Modes

silent

actions

verbose

json

🤖 Agent

Mode

🔇 No Output

⚡ Tool Trace

📊 Rich Panels

📋 JSONL

Quick Start

  1. 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"
    )
  2. 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"
    )
  3. 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

python
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
)
ParameterTypeDefaultDescription
verboseboolFalseEnable verbose output
markdownboolFalseFormat output as markdown
streamboolFalseStream output tokens
metricsboolFalseShow performance metrics
reasoning_stepsboolFalseDisplay reasoning process
style`Any \None`NoneCustom output styling
actions_traceboolFalseShow tool calls and lifecycle
json_outputboolFalseEmit JSONL events
simple_outputboolFalsePlain text without panels
show_parametersboolFalseShow LLM parameters (debug)
status_traceboolFalseInline status updates
editor_outputboolFalseBeginner-friendly numbered steps
output_file`str \None`NoneSave response to file
template`str \None`NoneResponse format template
tool_output_limitint16000Max characters per tool output

Output Presets

Eight primary presets cover the common cases. Default is "silent".

PresetDescriptionEquivalent OutputConfig(...)
"silent"No output (default, fastest)all flags False
"status"Tool calls without timestampsactions_trace=True, simple_output=True
"trace"Full execution trace with timestampsactions_trace=True, status_trace=True
"verbose"Detailed with rich panelsverbose=True, markdown=True
"debug"Trace + metrics + reasoningmetrics=True, reasoning_steps=True, actions_trace=True, status_trace=True, show_parameters=True
"stream"Real-time token streamingverbose=True, markdown=True, stream=True
"json"Machine-readable JSONL eventsactions_trace=True, json_output=True
"editor"Beginner-friendly numbered stepseditor_output=True

Aliases

Aliases map to a primary preset for backward compatibility.

AliasMaps To
"plain""silent"
"minimal""silent"
"normal""verbose"
"actions""status"
"text""status"

Common Patterns

Pattern 1: Streaming Chat

python
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

python
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

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


Related