CLI Pretty Output Feature
đ AgentMap â Deployment â CLI Pretty Output
Overviewâ
The --pretty
flag has been added to the run
command to format graph execution output for better readability during development and testing.
Usageâ
Basic pretty output:â
agentmap run --graph gm_orchestration --pretty
Detailed output with node execution timeline:â
agentmap run --graph gm_orchestration --pretty --verbose
Example Outputâ
Without --pretty (current behavior):â
â
Graph execution completed successfully
â
Output: {'input': 'end', '__next_node': 'EndNode', 'orchestrator_result': 'EndNode', 'exploration_result': {'processed': True, 'agent_type': 'exploration_router', 'node': 'EnvironmentInteraction', 'timestamp': 'placeholder'}, 'combat_result': {'processed': True, 'agent_type': 'combat_router', 'node': 'CombatTurn', 'timestamp': 'placeholder'}, '__execution_summary': ExecutionSummary(...), '__policy_success': True}
With --pretty:â
â
Graph execution completed successfully
================================================================================
GRAPH EXECUTION SUMMARY
================================================================================
Graph Name: gm_orchestration
Status: COMPLETED
Success: â
Yes
Total Duration: 4032.04 seconds
Start Time: 2025-07-02 02:07:50
End Time: 2025-07-02 03:15:02
Nodes Executed: 12
================================================================================
NODE EXECUTION ORDER
================================================================================
1. UserInput 29.8s â
â "run for cover"
2. Orchestrator 2.0s â
â EnvironmentInteraction
3. EnvironmentInteraction 0.0s â
4. UserInput 3899.6s â
â "climb the tree"
5. Orchestrator 2.9s â
â EnvironmentInteraction
6. EnvironmentInteraction 0.0s â
7. UserInput 83.0s â
â "punch the zombie"
8. Orchestrator 0.8s â
â CombatTurn
9. CombatTurn 0.0s â
10. UserInput 13.4s â
â "end"
11. Orchestrator 0.6s â
â EndNode
12. EndNode 0.0s â
================================================================================
FINAL STATE
================================================================================
Orchestrator Decision: EndNode
Exploration Result: EnvironmentInteraction
Combat Result: CombatTurn
Policy Success: â
Yes
Last Input: end
Next Node: EndNode
âšī¸ Use --pretty --verbose to see detailed node execution info
With --pretty --verbose:â
Includes detailed node-by-node execution timeline with:
- Node names and execution order
- Success/failure status
- Execution duration
- Time window (start â end)
- Output preview for each node
Implementation Detailsâ
- Added
--pretty
boolean flag to therun
command - Added
--verbose
boolean flag for detailed output - Created
ExecutionFormatterService
in the services layer following established patterns - Added service to DI container (
ApplicationContainer
) - No changes to production code paths - only affects display
Notesâ
- This is a development/testing feature
- No impact on graph execution or performance
- Output formatting is purely for human readability
- Raw output is still available without the flag
- Basic
--pretty
mode shows node execution order with timing - Verbose mode adds detailed output and timestamps for each node