Skip to main content

chat.tux

Terminal UX (TUX) for the Agent Runtimes Chat assistant.

STYLE_PRIMARY

Green accent 1ABC9C - primary accent in dark mode

STYLE_SECONDARY

Green brand 16A085 - secondary accent

STYLE_ACCENT

Green bright 2ECC71 - highlights

STYLE_MUTED

Gray 59595C - supporting text

STYLE_WHITE

Primary text in dark mode

STYLE_ERROR

Error states

STYLE_WARNING

Warning states

SlashCommandCompleter Objects

class SlashCommandCompleter(Completer)

Completer for slash commands with menu-style display.

get_completions

def get_completions(document: Any, complete_event: Any) -> Any

Yield completions for slash commands.

ToolCallInfo Objects

@dataclass
class ToolCallInfo()

Information about a tool call.

status

in_progress, complete, error

format_args

def format_args(max_value_len: int = 40) -> str

Format arguments for display.

SessionStats Objects

@dataclass
class SessionStats()

Session statistics for token tracking.

CliTux Objects

class CliTux()

Terminal UX for the Agent Runtimes Chat assistant.

__init__

def __init__(agent_url: str,
server_url: str = "http://127.0.0.1:8000",
agent_id: str = "chat",
eggs: bool = False,
jupyter_url: Optional[str] = None,
extra_suggestions: Optional[list[str]] = None)

Initialize the TUX.

Arguments:

  • agent_url - URL of the AG-UI agent endpoint
  • server_url - Base URL of the agent-runtimes server
  • agent_id - Agent ID for API calls
  • eggs - Enable Easter egg commands
  • jupyter_url - Jupyter server URL (only set when sandbox is jupyter)
  • extra_suggestions - Additional suggestions provided via --suggestions flag

show_welcome

def show_welcome() -> None

Display the welcome banner.

show_prompt

async def show_prompt() -> str

Display the prompt and get user input with slash command completion.

handle_command

async def handle_command(user_input: str) -> Optional[str]

Handle a slash command.

Returns:

None if no command matched or the command produced no follow-up. A non-empty string when a command returns a prompt to send to the agent (e.g. /suggestions returns the chosen suggestion text). The empty string "" signals the command was handled but has no follow-up.

send_message

async def send_message(message: str) -> None

Send a message to the agent and stream the response.

run

async def run() -> None

Run the main TUX loop.

run_tux

async def run_tux(agent_url: str,
server_url: str = "http://127.0.0.1:8000",
agent_id: str = "chat",
eggs: bool = False,
jupyter_url: Optional[str] = None,
extra_suggestions: Optional[list[str]] = None) -> None

Run the Agent Runtimes Chat assistant TUX.

Arguments:

  • agent_url - URL of the AG-UI agent endpoint
  • server_url - Base URL of the agent-runtimes server
  • agent_id - Agent ID for API calls
  • eggs - Enable Easter egg commands
  • jupyter_url - Jupyter server URL (only set when sandbox is jupyter)
  • extra_suggestions - Additional suggestions provided via --suggestions flag