Skip to main content

marvin.handlers.print_handler

A simplified print handler for rendering streaming events from the engine.

Constants

RUNNING_SPINNER

Classes

EventPanel

Base class for panels that represent events. Methods:
  • render
    Render this event as a panel.

MessagePanel

Panel for displaying agent messages with streaming updates. Methods:
  • render
    Render the message as a markdown panel.

PrintHandler

A handler that renders events with streaming updates. Methods:
  • format_timestamp
    Format timestamp for display.
  • on_actor_message
    Handle complete agent messages.
  • on_actor_message_delta
    Handle streaming updates to agent messages.
  • on_end_turn_tool_call
    Handle end turn tool call events.
  • on_end_turn_tool_result
  • on_orchestrator_end
    Clean up when orchestrator ends.
  • on_orchestrator_start
    Start the live display when orchestrator starts.
  • on_tool_call
    Handle complete tool calls.
  • on_tool_call_delta
    Handle streaming updates to tool calls.
  • on_tool_result
    Handle tool result events.
  • on_tool_retry
    Handle tool retry events.
  • update_display
    Update the terminal display with current panels.

ToolCallPanel

Panel for displaying tool calls with streaming updates. Methods:
  • get_status_style
    Returns (icon, text style, border style) for current status.
  • render
    Render the tool call as a panel.

Parent Module: handlers