This page covers terminal output only. For per-channel presentation (streaming, tool progress, footers), see Display Policy.
How It Works
Quick Start
Core Types
TaskOutput
| Field | Type | Description |
|---|---|---|
raw | str | Text result from the task |
json_output | dict | Parsed JSON when structured output is enabled |
pydantic_output | BaseModel | Parsed model when a schema is set |
task_id | str | Task identifier |
metadata | dict | Execution metrics and context |
ReflectionOutput
| Field | Type | Description |
|---|---|---|
reflection | str | Self-reflection content |
satisfactory | bool | Whether reflection passed |
improvement_suggestions | list | Suggested improvements |
from praisonaiagents import TaskOutput, ReflectionOutput.
Global Registries
| Registry | Purpose |
|---|---|
sync_display_callbacks | Sync handlers keyed by event type |
async_display_callbacks | Async handlers keyed by event type |
register_display_callback | Register into either registry |
display_interaction, display_tool_call, display_error, and others) call registered callbacks even when verbose output is off.
Best Practices
Prefer register_display_callback over patching Rich
Prefer register_display_callback over patching Rich
Register handlers once at startup instead of monkey-patching internal display functions.
Use task callbacks for structured pipelines
Use task callbacks for structured pipelines
When you need the full
TaskOutput object, attach a callback on Task rather than an interaction handler.Turn off verbose for headless runs
Turn off verbose for headless runs
Set
output=False in CI or server mode and rely on callbacks for structured logs.See Display Callbacks for event catalogue
See Display Callbacks for event catalogue
Event names, autonomy callbacks, and async patterns are documented on the Display Callbacks page.
Related
Display Callbacks
Event types and registration patterns
Output Config
Verbose, stream, and markdown output settings

