hylo.codeagents.watch¶
Package: hylo-code-agents · Core contracts
watch ¶
hylo watch: follow a tool-agent episode in the terminal, replay a finished one, or steer a running one.
hylo watch RUN_DIR [--episode ID] print the newest episode (or ID) and keep following it while it runs
hylo watch RUN_DIR --replay [--speed 4] replay a finished episode on its recorded timing
hylo watch RUN_DIR --raw the episode's agent events as JSON lines
hylo watch --say "MESSAGE" --inbox PATH send a message to a running tools.llm agent (its `inbox`)
hylo watch RUN_DIR --inbox PATH --interactive follow, and send every line typed to the agent (Ctrl-D stops typing)
One line per thing that happened: the model's words, each tool call with a condensed result, each action's receipt, operator messages, and the verdict, with a footer of calls, decisions, tokens and cost. Read-only, except --say.
COLOURS
module-attribute
¶
COLOURS = {'dim': '2', 'bold': '1', 'red': '31', 'green': '32', 'yellow': '33', 'blue': '34', 'magenta': '35', 'cyan': '36'}
SHOWN
module-attribute
¶
SHOWN = ('episode.start', 'episode.end', 'agent.tool.start', 'agent.tool.turn', 'agent.tool.result', 'agent.tool.operator', 'agent.tool.finish', 'agent.tool.summary')
condense ¶
A one-line summary of a tool result and whether it succeeded.
events ¶
events(path: Path, follow: bool, poll_s: float = 0.5, idle_s: float = 3600.0) -> Iterator[dict[str, Any]]
Events of an episode file; with follow, keep reading new lines until episode.end (or idle_s of silence).
The agent's last events (the final receipt, its summary) may land after episode.end: they are read too, and
episode.end itself comes last.
watch ¶
watch(run: Path, episode: str | None = None, *, follow: bool = True, replay: bool = False, speed: float = 4.0, raw: bool = False, out: TextIO = sys.stdout, colour: bool | None = None) -> dict[str, Any]
main ¶
follow, replay or steer a tool-agent episode in the terminal