Module 4 · Part B of 3

Modern CLI Agents

The agents compared below wrap the same handful of capabilities:

Their security profiles depend on which capabilities are open by default and whether unattended execution is enabled. The runtime underneath must also catch a bad call.

Module 4a separated application decisions from operating-system enforcement. Application wrappers sit above that boundary. You will compare them before building a browser-based CLI agent of your own.

Shared loop, different application defaults

Each product runs a model in a loop with tools. Defaults and built-in capabilities differ. Implementation detail varies too. Their combined cost and convenience form the harness weight used below.

Note that Hermes seems to differ from the editor CLIs because "automatic learning" is supported by default as a flagship feature. This system still uses the same fundamental primitives as the other agents (skills/cron/memory updates with write permissions), so the risk is not unique to Hermes.

OpenShell can host this class of agent application; NemoClaw is the reference stack this course runs. The same OpenShell integration is documented by NVIDIA for Codex, Cursor, and OpenCode. The CLI you pick decides the starting defaults, while the OpenShell wrapper around it governs how far any of those defaults are permitted to reach.

The degrees of freedom are the attack surface

Every one of these agents is configured along the same axes, and each axis names a capability you grant or withhold. The NemoClaw column below reads straight from the OpenShell policy your launchable is running, the one you read live and proved in Module 4a.

Degree of freedomThe knobNemoClaw default (live policy)
Filesystemwhich paths are readable / writable write only /tmp, /sandbox/.openclaw, /sandbox/.nemoclaw, and the workdir; system paths read-only. Enforced by Landlock (best_effort).
Network egresshost + port + HTTP method/path, per binary deny by default; a short allowlist (NVIDIA inference, inference.local, clawhub/npm), each scoped to one HTTP shape and bound to a specific binary.
Process identitywhich user the agent runs as non-root sandbox user; ptrace, mount, setuid blocked by seccomp.
Binary identitywhich executable may use a grant resolved by exe path plus an ancestor walk with a trust-on-first-use hash; argv[0] is distrusted because it is spoofable.
Persistencecron, skills, and the SOUL.md persona writable inside the workspace. The policy schema cannot make a single file read-only, so SOUL.md protection is DAC plus chattr +i under "shields up", not the sandbox.
Inference routingwhich model endpoint calls leave through routed through the managed inference.local gateway; the Privacy Router decides what context may leave on the operator's policy, not the agent's.

Try it · the same task, weighed across harnesses

The artifact compares harness weight along these axes:

Describe a task and compare how much machinery each harness supplies. The editable cell exposes its system prompt and response logic. It also shows the examples. Rerun the cell after an edit to rebuild the artifact.

Deep · BrowserBuild an agent around the browser runtime?

Build a CLI agent whose shell is this browser

The CLIs above attach an agent to a terminal on a real machine. You can build the same shape with the browser's own JavaScript runtime as the shell. The agent below has one tool, js, with which it writes JavaScript that runs in this live page and returns a result the agent reads before deciding what to run next. The runtime is already loaded, so the harness weighs nothing to stand up. Its reach is still wide: the agent can read the DOM, call fetch, and use the course helpers, all inside the tab you are reading.

Module 4c returns to this browser form factor and separates the transferable part—an interactive web surface with visible state and controls—from the authentication, storage, network, and tool adapters supplied by a particular host.

Applied · ShellOpen the launchable shell and sandbox shortcut?

Open a real shell on your launchable

Your NemoClaw launchable gives you a real host shell over the same /ws/terminal connection Module 4a's policy probes use. That host carries the openshell CLI, the operator tool that manages your sandboxed agent. Every line you type below runs on the launchable, and the output is its own.

Connect your launchable on Module 3a first. Type a command, click a chip, or press Tab to autocomplete. On the host, openshell sandbox list shows your agent and openshell status reports the gateway. Your agent runs inside a sandbox, so prefix a command with agent to run it there: agent ls lists its files through openshell sandbox exec. Each command runs in its own short-lived shell, so to chat with the agent interactively, use the panel below rather than the openclaw tui.

Chat with your agent

The openclaw tui is an interactive, full-screen chat that a one-shot terminal cannot hold open. The panel below talks to the same live agent over the OpenClaw gateway, the /cli/gateway connection Modules 3b and 3c use, so you can chat with it without leaving the page. It streams the agent's reply and shows each tool or command the agent runs. Connect your launchable on Module 3a first (its URL and token). Ask it anything, click a prompt, or press Tab to autocomplete.

The terminal above is the operator plane. From your launchable's host shell, openshell manages the sandboxed agent, so the host is the control plane that sits above the policy, the perimeter Module 4a flagged. Commands you push into the agent with agent <cmd> run under its deny-by-default policy. The host shell answers to the operator instead.

A heavier harness earns its weight whenever a task calls for persistence and real work that a tab cannot carry. The skill worth building is reading a task well enough to pick the weight it needs, which is the layered view Module 4c closes on.

← Module 4a: OpenShell