Skip to content

hashwnath/Computer-Use-Agent

Repository files navigation

NVIDIA Nemotron Bash Computer Use Agent

image A bash computer use agent powered by NVIDIA Nemotron Nano 9B v2 that can execute shell commands with user confirmation.

Features

  • Execute bash commands with user confirmation
  • Safe command filtering (only allows specific commands)
  • Conversation memory and context awareness
  • Two implementations: from-scratch and LangGraph

Setup

  1. Clone the repository:

    git clone https://github.com/hashwnath/Computer-Use-Agent
    cd nvidia-bash-agent
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure API key:

    • Get your NVIDIA API key from build.nvidia.com
    • Update config.py with your API key:
      llm_api_key: str = "your-nvidia-api-key-here"

Usage

Run the from-scratch implementation (recommended):

python main_from_scratch.py

Or run the LangGraph implementation:

python main_langgraph.py

Commands

  • Type any request like "list files" or "find Python files"
  • The agent will suggest bash commands and ask for confirmation
  • Type y to execute or n to decline
  • Type quit to exit

Safety

⚠️ WARNING: This software can execute bash commands on your system. Use at your own risk.

The agent is restricted to safe commands like: cd, cp, ls, cat, find, touch, echo, grep, pwd, mkdir, wget, sort, head, tail, du

License

Based on NVIDIA GenerativeAIExamples repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages