|
39 | 39 | # ============================================================================= |
40 | 40 | # Output Presets |
41 | 41 | # ============================================================================= |
| 42 | +# |
| 43 | +# Preset Hierarchy (from least to most output): |
| 44 | +# silent → Nothing (default for SDK, max performance) |
| 45 | +# text → Response only, simple format |
| 46 | +# verbose → Task + Tools inline + Response panel |
| 47 | +# debug → verbose + metrics footer (tokens, cost, model) |
| 48 | +# stream → Real-time token streaming |
| 49 | +# json → Machine-readable JSONL events |
| 50 | +# |
| 51 | +# ============================================================================= |
42 | 52 |
|
43 | 53 | OUTPUT_PRESETS: Dict[str, Dict[str, Any]] = { |
44 | 54 | # Silent preset - DEFAULT for SDK |
|
52 | 62 | "reasoning_steps": False, |
53 | 63 | "actions_trace": False, |
54 | 64 | }, |
55 | | - # Actions preset - opt-in observability |
56 | | - # Shows action trace (tool calls, agent lifecycle) + final output |
57 | | - # Registers callbacks, outputs to stderr |
58 | | - "actions": { |
| 65 | + # Text preset - Shows final response only |
| 66 | + # Simple one-line format without panels |
| 67 | + "text": { |
59 | 68 | "verbose": False, |
60 | 69 | "markdown": False, |
61 | 70 | "stream": False, |
62 | 71 | "metrics": False, |
63 | 72 | "reasoning_steps": False, |
64 | | - "actions_trace": True, # Special flag for action trace mode |
| 73 | + "actions_trace": True, # Triggers final output display |
| 74 | + "simple_output": True, # New flag for simple text format |
65 | 75 | }, |
66 | | - # Plain preset - final output only, no action trace |
67 | | - "plain": { |
| 76 | + # Verbose preset - Full interactive output |
| 77 | + # Shows: Task prompt, Tool calls (inline), Response panel |
| 78 | + "verbose": { |
| 79 | + "verbose": True, |
| 80 | + "markdown": True, |
| 81 | + "stream": False, |
| 82 | + "metrics": False, # No metrics footer |
| 83 | + "reasoning_steps": False, |
| 84 | + }, |
| 85 | + # Debug preset - verbose + metrics footer |
| 86 | + # Shows everything verbose shows + token counts, cost, model info |
| 87 | + "debug": { |
| 88 | + "verbose": True, |
| 89 | + "markdown": True, |
| 90 | + "stream": False, |
| 91 | + "metrics": True, # Shows metrics footer |
| 92 | + "reasoning_steps": True, |
| 93 | + "show_parameters": True, # New: show LLM parameters |
| 94 | + }, |
| 95 | + # Streaming preset - enables streaming by default |
| 96 | + "stream": { |
| 97 | + "verbose": True, |
| 98 | + "markdown": True, |
| 99 | + "stream": True, |
| 100 | + "metrics": False, |
| 101 | + "reasoning_steps": False, |
| 102 | + }, |
| 103 | + # Status preset - Clean inline status updates without boxes |
| 104 | + # Shows: [timestamp] Calling LLM..., Executing tool..., Response: ... |
| 105 | + # Ideal for external apps that want to track progress |
| 106 | + "status": { |
68 | 107 | "verbose": False, |
69 | 108 | "markdown": False, |
70 | 109 | "stream": False, |
71 | 110 | "metrics": False, |
72 | 111 | "reasoning_steps": False, |
73 | | - "actions_trace": False, |
| 112 | + "actions_trace": True, |
| 113 | + "status_trace": True, # New: enable simple status output |
74 | 114 | }, |
75 | | - "minimal": { |
| 115 | + # JSON preset - JSONL output for piping/scripting |
| 116 | + "json": { |
76 | 117 | "verbose": False, |
77 | 118 | "markdown": False, |
78 | 119 | "stream": False, |
79 | 120 | "metrics": False, |
80 | 121 | "reasoning_steps": False, |
| 122 | + "actions_trace": True, |
| 123 | + "json_output": True, # Output as JSONL |
81 | 124 | }, |
82 | | - "normal": { |
83 | | - "verbose": True, |
84 | | - "markdown": True, |
| 125 | + |
| 126 | + # ========================================================================== |
| 127 | + # ALIASES (for backward compatibility) |
| 128 | + # ========================================================================== |
| 129 | + # plain → silent (identical behavior) |
| 130 | + "plain": { |
| 131 | + "verbose": False, |
| 132 | + "markdown": False, |
85 | 133 | "stream": False, |
86 | 134 | "metrics": False, |
87 | 135 | "reasoning_steps": False, |
| 136 | + "actions_trace": False, |
88 | 137 | }, |
89 | | - "verbose": { |
90 | | - "verbose": True, |
91 | | - "markdown": True, |
| 138 | + # minimal → silent (identical behavior) |
| 139 | + "minimal": { |
| 140 | + "verbose": False, |
| 141 | + "markdown": False, |
92 | 142 | "stream": False, |
93 | | - "metrics": True, |
94 | | - "reasoning_steps": True, |
| 143 | + "metrics": False, |
| 144 | + "reasoning_steps": False, |
95 | 145 | }, |
96 | | - "debug": { |
| 146 | + # normal → verbose (consolidated) |
| 147 | + "normal": { |
97 | 148 | "verbose": True, |
98 | 149 | "markdown": True, |
99 | 150 | "stream": False, |
100 | | - "metrics": True, |
101 | | - "reasoning_steps": True, |
102 | | - }, |
103 | | - # Streaming preset - enables streaming by default |
104 | | - "stream": { |
105 | | - "verbose": True, |
106 | | - "markdown": True, |
107 | | - "stream": True, |
108 | 151 | "metrics": False, |
109 | 152 | "reasoning_steps": False, |
110 | 153 | }, |
111 | | - # JSON preset - JSONL output for piping |
112 | | - "json": { |
| 154 | + # actions → text (renamed for clarity) |
| 155 | + "actions": { |
113 | 156 | "verbose": False, |
114 | 157 | "markdown": False, |
115 | 158 | "stream": False, |
116 | 159 | "metrics": False, |
117 | 160 | "reasoning_steps": False, |
118 | 161 | "actions_trace": True, |
119 | | - "json_output": True, # Output as JSONL |
120 | 162 | }, |
121 | 163 | } |
122 | 164 |
|
123 | 165 | # Default output mode - can be overridden by PRAISONAI_OUTPUT env var |
124 | 166 | # "silent" = zero overhead, fastest performance (DEFAULT) |
125 | | -# "actions" = tool call trace + final output (opt-in observability) |
| 167 | +# "verbose" = full interactive display |
| 168 | +# "debug" = verbose + metrics |
126 | 169 | DEFAULT_OUTPUT_MODE = "silent" |
127 | 170 |
|
128 | 171 |
|
|
0 commit comments