Skip to main content

chat.cli

Agent Runtimes interactive CLI assistant using AG-UI and ACP.

Transport Objects

class Transport(str, Enum)

Transport protocol options for connecting to agent-runtimes.

Spinner Objects

class Spinner()

Animated loading spinner for terminal output.

start

def start() -> None

Start the spinner animation.

stop

def stop() -> None

Stop the spinner animation.

__enter__

def __enter__() -> "Spinner"

Context manager entry.

__exit__

def __exit__(exc_type: Any, exc_val: Any, exc_tb: Any) -> None

Context manager exit.

run_query_with_spinner

async def run_query_with_spinner(query: str) -> str

Run a query with a loading spinner animation.

main_callback

@app.callback(invoke_without_command=True)
def main_callback(
ctx: typer.Context,
query: Optional[List[str]] = typer.Argument(
None,
help=
"Query to send to the AI agent. If not provided, starts interactive mode.",
),
agentspec_id: Optional[str] = typer.Option(
None,
"--agentspec-id",
"-a",
help="Agent spec ID to start from the agent-runtimes library",
),
port: int = typer.Option(
0,
"--port",
"-p",
help=
"Port for the agent-runtimes server (0 = auto-select random free port)",
),
banner: bool = typer.Option(
False,
"--banner",
"-b",
help="Show animated banner with Matrix rain animation"),
banner_all: bool = typer.Option(
False,
"--banner-all",
"-B",
help="Show animated banner with Matrix rain and black hole animations",
),
debug: bool = typer.Option(
False,
"--debug",
"-d",
help=
"Enable debug mode with verbose logging (shows tool execution details)",
),
codemode_disabled: bool = typer.Option(
False,
"--codemode-disabled",
"--no-codemode",
help="Disable codemode (MCP tools as programmatic tools)",
),
suggestions: Optional[str] = typer.Option(
None,
"--suggestions",
"-s",
help=
"Extra suggestions to add (comma-separated), e.g. 'Search for X,Summarize Y'",
),
eggs: bool = typer.Option(False,
"--eggs",
help="Enable Easter egg commands"),
show_version: bool = typer.Option(False,
"--version",
"-v",
help="Show version information")
) -> None

Agent Runtimes Chat assistant.

Run without arguments to start interactive chat mode with slash commands. Provide a query as arguments for single-shot mode.

If no --agentspec-id is given, lists available agent specs and prompts you to choose one interactively.

Examples:

agent-runtimes chat # Pick agent spec interactively

agent-runtimes chat --agentspec-id crawler # Use specific agent spec

agent-runtimes chat "What is Python?" # Single query mode

agent-runtimes chat -a crawler "Search for AI trends" # Single query with specific agent

version

@app.command()
def version() -> None

Show Agent Runtimes Chat assistant version information.

connect

@app.command()
def connect(url: str = typer.Argument(
..., help="URL of the agent server (WebSocket for ACP, HTTP for AG-UI)"),
transport: Transport = typer.Option(
Transport.ag_ui,
"--transport",
"-t",
help="Transport protocol (ag-ui: HTTP/SSE, acp: WebSocket)",
),
splash: bool = typer.Option(
False, "--splash", "-s",
help="Show animated splash screen")) -> None

Connect to a remote agent server.

Examples:

agent-runtimes chat connect http://localhost:8000/api/v1/ag-ui/my-agent/

agent-runtimes chat connect ws://localhost:8000/api/v1/acp/ws/my-agent -t acp

agent-runtimes chat connect https://agent.datalayer.ai/api/v1/ag-ui/chat/

agents

@app.command()
def agents(server: str = typer.Option("http://localhost:8000",
"--server",
"-s",
help="Agent server base URL")) -> None

List available agents on an agent-runtimes server.

Examples:

agent-runtimes chat agents

agent-runtimes chat agents --server https://agents.datalayer.ai

main

def main() -> None

Main entry point for the Agent Runtimes interactive CLI assistant.