Skip to main content
Import: from gaia.agents.base.console import AgentConsole, SilentConsole

Detailed Spec: spec/console Purpose: Control agent output display.

AgentConsole (Rich CLI Output)

from gaia.agents.base.console import AgentConsole

class MyAgent(Agent):
    def _create_console(self):
        # Rich console with syntax highlighting
        return AgentConsole()

# Displays:
# - Colored step headers
# - Syntax-highlighted tool calls
# - Progress indicators
# - Formatted results

SilentConsole (No Output)

from gaia.agents.base.console import SilentConsole

class MyAgent(Agent):
    def _create_console(self):
        # No console output (for API/testing)
        return SilentConsole()

# Use for:
# - API servers
# - Background processing
# - Unit tests
# - JSON-only responses

SSEOutputHandler (Streaming API)

from gaia.api.sse_handler import SSEOutputHandler

# For API endpoints
handler = SSEOutputHandler()
agent = MyAgent(console=handler)

# Output is formatted as Server-Sent Events
# Compatible with OpenAI streaming API

When to Use Each Handler

HandlerUse CaseOutputBest For
AgentConsoleInteractive CLIRich, colored textDevelopment, debugging
SilentConsoleHeadless operationNoneAPIs, tests, background
SSEOutputHandlerStreaming APIServer-Sent EventsWeb applications