Skip to main content

Genux - A Multi-Agent Linux Command System

A AI-powered system that converts natural language requests into safe and executable Linux commands and execuutes them using a multi-agent architecture.

Features

  • Natural Language Processing: Convert plain English requests into Linux commands
  • Multi-Agent Architecture: Four specialized agents working together for optimal results
  • Safety First: Built-in security analysis and risk assessment
  • Knowledge Base: Learns from successful executions to improve future performance
  • Web Search Integration: Searches for current information when needed
  • Error Recovery: Automatic replanning when commands fail

Architecture

Here’s an overview of the system architecture showing how different components and agents interact with each other:

System Model

The system consists of four specialized agents:

1. Comprehend Agent

  • Analyzes natural language input
  • Determines task complexity and requirements
  • Searches for additional context when needed

2. Planner Agent

  • Creates step-by-step execution plans
  • Leverages knowledge base for similar requests
  • Generates Linux commands optimized for the task

3. Examiner Agent

  • Performs security risk assessment
  • Categorizes commands by danger level
  • Requests user permission for risky operations

4. Execution Agent

  • Safely executes approved commands
  • Provides real-time feedback
  • Handles errors and timeouts gracefully

📦 Installation

Prerequisites

  • Python 3.8 or higher
  • Linux operating system
  • Internet connection for web search functionality

Required API Keys

  1. Groq API Key – For AI language model access

  2. Tavily API Key – For web search functionality

    • Sign up at Tavily
    • Get your API key

Setup Instructions

Install PyPi package

pip install genux

Or run manually

  1. Clone the repository
    git clone https://github.com/Collgamer0008/Genux.git
    cd Genux
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run main:
    cd genux
    python3 main.py 
    

Usage

Run the system and choose your input method:

genux

if you have not saved API keys as Env Variables , You will be prompted to enter API keys manually

Enter your GROQ API Key: 
Enter your TAVILY API Key: 

Then, you'll be prompted to choose:

  • Single line input: For simple requests
  • Multi-line input: For complex, detailed requests (end with END)

Example Requests

Simple Commands

  • Create a new folder called projects
  • Install Docker on Ubuntu
  • Set up a Python virtual environment
  •  create folder structure like this :
      project-name/
    │
    ├── src/              
    │   ├── main/       
    │   ├── utils/       
    │   └── __init__.py   
    │
    ├── tests/            
    │
    ├── docs/             
    │
    ├── config/          
    │
    ├── scripts/         
    │
    ├── .gitignore       
    ├── README.md         
    ├── requirements.txt  
    └── LICENSE ```
    

Dynamic Content

  • Create a file with today's weather information
  • Generate a report with current cryptocurrency prices
  • Make a list of trending GitHub repositories

Security

The Examiner Agent checks the command plan generated for possible damageable commands or commands that install modules, etc, if present, asks for user permission to execute the plan, which adds a layer of human in the loop security, and categorizes the command into risk levels

Risk Assessment Levels

  • Low Risk: Simple file operations, directory navigation
  • Medium Risk: Package installations, non-system modifications
  • High Risk: System file changes, service modifications, network configuration

Safety Mechanisms

  • Command analysis before execution
  • User permission requests for dangerous operations
  • Timeout protection (5 minutes per command)
  • Error handling and recovery
  • No automatic system-level changes without approval

Knowledge Base

The system maintains a local knowledge base (command_action-kb.json) that:

  • Stores successfully executed plans
  • Enables faster responses for similar requests
  • Improves accuracy over time
  • Uses fuzzy matching to find relevant past solutions

Configuration

You can modify these parameters only if you install genux manually

Customizing the LLM Model

Edit the model configuration in the code:

llm = ChatGroq(
    api_key=os.environ.get("GROQ_API_KEY"),
    model="deepseek-r1-distill-llama-70b",  # Change this
    temperature=0.3
)

Adjusting Risk Thresholds

Modify the security classification in ExaminerAgent.examine_plan() to adjust what commands require permission.

Requirements

langchain>=0.1.0
langchain-groq>=0.1.0
langchain-community>=0.0.20
tavily-python>=0.3.0
langchain-tavily>=0.2.11
pyfiglet>=1.0.4

Contributing

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
    

3.Commit your changes

git commit -m "Add amazing feature"

4.Push to the branch

git push origin feature/amazing-feature

5.Open a Pull Request

Metadata

Release files for genux 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genux 0.1.9
File Size Uploaded Provenance
genux-0.1.9.tar.gz 13.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for genux 0.1.9
File Interpreter ABI Platform
genux-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 26.1 kB

Release files / genux-0.1.9.tar.gz

Download URL genux-0.1.9.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cd7e6aeb9427bb07d4f691f38fe4bc7388a8e447ece98c2fc2049a87b9ea8aff
BLAKE2b-256 checksum
How to use checksums
70fe28277343fec62a4f0e4c5c4466aeafc76fcb7e59962a94e63198a6283585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / genux-0.1.9-py3-none-any.whl

Download URL genux-0.1.9-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68c794b1ba3c212045affe8b6f199ffe13da66a1b265b1ee7097ef9f907ce952
BLAKE2b-256 checksum
How to use checksums
a502639e5d2fcd82d3646e1b56747688d3b2f5e469aff64f229856da96e9ff75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for genux 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page