Skip to main content
Control what your agent prints during a run — silent for APIs, status for CLI, stream for chat UIs.
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are helpful.",
    output="status",
)
result = agent.start("What is the capital of France?")
The user runs the agent; output presets control whether responses stay silent, stream, or show status lines.

How It Works

Quick Start

1

Simple Usage

Pass output as a string preset:
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant.",
    output="status"
)

result = agent.start("What is the weather in Tokyo?")
2

With Configuration

Use OutputConfig for fine-grained control:
from praisonaiagents import Agent, OutputConfig

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant.",
    output=OutputConfig(
        verbose=True,
        markdown=True,
        stream=True,
        metrics=True,
    )
)

result = agent.start("Explain machine learning in simple terms")

Which Style Should I Use?

Pick a preset based on where the output is consumed.

How It Works

PresetDescriptionBest For
silentNo output, returns value only (default)SDK / programmatic use
editorStep 1: 📄 Creating file → ✓ DoneCLI default, beginners
status▸ AI → thinking + inline tool callsSimple CLI output
traceStatus with [HH:MM:SS] timestampsProgress monitoring
debugTrace + metrics, no boxesDeveloper debugging
verboseTask + Tools + Response panelsInteractive sessions
streamReal-time token streamingChat interfaces
jsonJSONL events on stdoutScripting / piping

Configuration Options

OutputConfig SDK Reference

Full parameter reference for OutputConfig
Precedence ladder — choose the level you need:
# Level 1: String preset
agent = Agent(output="verbose")   # "silent" | "minimal" | "normal" | "verbose" | "debug"

# Level 2: OutputConfig (full control)
agent = Agent(output=OutputConfig(verbose=True, stream=True, output_file="results.md"))
from praisonaiagents import Agent, OutputConfig

agent = Agent(
    instructions="...",
    output=OutputConfig(
        verbose=False,
        markdown=False,
        stream=False,
        metrics=False,
        reasoning_steps=False,
        actions_trace=False,
        json_output=False,
        simple_output=False,
        status_trace=False,
        editor_output=False,
        show_parameters=False,
        output_file=None,
        template=None,
        tool_output_limit=16000,
    )
)
OptionTypeDefaultDescription
verboseboolFalseShow Rich panels for tasks and responses
markdownboolFalseRender markdown formatting
streamboolFalseStream tokens in real time
metricsboolFalseDisplay token usage and cost after each response
reasoning_stepsboolFalseShow internal reasoning steps
actions_traceboolFalseShow tool calls and lifecycle events on stderr
json_outputboolFalseEmit JSONL events for piping
simple_outputboolFalsePrint response without Rich panels
status_traceboolFalseClean inline status updates
editor_outputboolFalseNumbered steps with emoji icons (CLI default)
show_parametersboolFalseShow LLM parameters (debug preset)
styleAnyNoneCustom output styling object
output_filestrNoneFile path to automatically save the agent response
templatestrNoneFormat template for the response
tool_output_limitint16000Maximum characters for tool output

String Preset Aliases

AliasMaps To
plain, minimalsilent
normalverbose
text, actionsstatus

Common Patterns

Silent (SDK Default)

from praisonaiagents import Agent

agent = Agent(
    instructions="You are a helpful assistant.",
)

result = agent.start("Summarize this article: ...")
print(result)

Status (CLI / Interactive)

from praisonaiagents import Agent

agent = Agent(
    instructions="You are a helpful assistant.",
    output="status"
)

result = agent.start("What is the capital of France?")

Save Response to File

from praisonaiagents import Agent, OutputConfig

agent = Agent(
    instructions="Write a detailed report",
    output=OutputConfig(
        output_file="report.md",
        markdown=True,
    )
)

agent.start("Write a report on renewable energy trends")

Best Practices

Silent mode (the default) has zero output overhead. Use it when the agent’s return value is consumed by code rather than displayed to users.
output="editor" shows human-friendly numbered steps with emoji icons. It is the default when running praisonai "prompt" from the command line.
Set output="stream" when building conversational UIs — tokens appear in real time for a responsive feel.
Set output=OutputConfig(output_file="result.md") to automatically save the agent’s response. Useful for reports, summaries, and generated documents.

Async Agents

Run agents asynchronously for better performance

Callbacks

Hook into agent lifecycle events