INNER CODE UNIT · Python
ui
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/cli.py:128
def ui(openrouter_key, model, host, port, proxy, seed, headed, binary, profile_dir):
"""Serve the two-pane interface: conversation left, live browser right.
Requires an OpenRouter key: an agent is a model with a browser, and
without the model there is nothing honest to serve. Driving the browser
by hand, no model and nothing spent, is the invisible_playwright
library's job - same engine, Playwright's whole API.
"""
from .brain import OpenRouterBrain
from .link import Link
from .llm import make_client
from .web import ChatService, build_app
key = openrouter_key or os.environ.get("OPENROUTER_API_KEY")
if not key:
raise click.ClickException(
"no OpenRouter key. Pass --openrouter-key or set "
"OPENROUTER_API_KEY. To drive the browser without a model, use "