Create Your Own Bash Computer Use Agent with NVIDIA Nemotron in One Hour

AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.

Why it matters

Developers can build a working natural-language shell agent in under an hour using a small open model, with allowlist and human-confirmation guardrails baked in from the start.

Read this as

NVIDIA shows how to build a small AI agent that turns plain-English requests into Bash terminal commands, using its Nemotron Nano 9B v2 model. The whole thing is about 200 lines of Python and can be built in under an hour. Before any command runs, the software checks it against a list of safe commands and asks the human to approve it. This matters for hobbyists and developers who want a computer assistant without handing over unrestricted control.

NVIDIA published a tutorial and GitHub code for a Bash agent built on Nemotron Nano 9B v2, roughly 200 lines of Python deployable locally or via build.nvidia.com or OpenRouter. The timing pitch is that capable 9B models now make lightweight agents cheap enough to run locally, reducing dependence on large frontier-model APIs. Safety is handled by a command allowlist plus human confirmation, but no benchmark, pricing, or production-hardening figures are provided.

The architecture has two parts: a Bash class wrapping subprocess.run() that tracks the working directory via a marker-plus-pwd trick appended to each command, enforces an allowlist (blocking rm, mv, sudo, etc.), and returns stdout, stderr, and cwd; and an agent loop over Nemotron Nano 9B v2 using OpenAI-style tool calling with the /think flag enabled. A nested while loop handles chained tool calls. A LangGraph variant using create_react_agent() removes the manual loop. Limitations: allowlist enforcement is string-matching only, and no evaluation metrics are given.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Nemotron Nano 9B v2 LangGraph Bash subprocess create_react_agent GitHub

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading