 A bash computer use agent powered by NVIDIA Nemotron Nano 9B v2 that can execute shell commands with user confirmation.
A bash computer use agent powered by NVIDIA Nemotron Nano 9B v2 that can execute shell commands with user confirmation.
- Execute bash commands with user confirmation
- Safe command filtering (only allows specific commands)
- Conversation memory and context awareness
- Two implementations: from-scratch and LangGraph
- 
Clone the repository: git clone https://github.com/hashwnath/Computer-Use-Agent cd nvidia-bash-agent
- 
Install dependencies: pip install -r requirements.txt 
- 
Configure API key: - Get your NVIDIA API key from build.nvidia.com
- Update config.pywith your API key:llm_api_key: str = "your-nvidia-api-key-here" 
 
Run the from-scratch implementation (recommended):
python main_from_scratch.pyOr run the LangGraph implementation:
python main_langgraph.py- Type any request like "list files" or "find Python files"
- The agent will suggest bash commands and ask for confirmation
- Type yto execute ornto decline
- Type quitto exit
The agent is restricted to safe commands like: cd, cp, ls, cat, find, touch, echo, grep, pwd, mkdir, wget, sort, head, tail, du
Based on NVIDIA GenerativeAIExamples repository.