Skip to main content

A multi AI agent CLI tool using Microsoft Autogen Framework

Project description

VaahAI

License Python Status

VaahAI is a multi-agent AI CLI tool built with Microsoft's Autogen Framework, designed to enhance code quality and development workflows through AI-powered code review, auditing, generation, and scaffolding capabilities.

๐ŸŒŸ Features

  • Multi-Agent Architecture: Specialized AI agents collaborate to perform complex tasks
  • Code Review: Comprehensive code review focusing on quality, style, and best practices
  • Code Audit: Security vulnerability detection, compliance checking, and architectural assessment
  • Code Generation: AI-powered code generation from natural language descriptions
  • Multiple LLM Support: OpenAI, Claude, Junie, and local models via Ollama
  • Intelligent Model Selection: Filter and recommend models based on capabilities (text, code, vision, etc.)
  • Flexible Configuration: Layered configuration system with global defaults and project-specific settings
  • Git Integration: Commit applied changes, generate meaningful commit messages, and prepare pull requests

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.9+
  • Poetry (Python package manager)
  • Git
  • Docker (optional, for code execution)

Installation

# Install from PyPI
pip install vaahai

# Or clone the repository
git clone https://github.com/webreinvent/vaahai.git
cd vaahai

# Create a virtual environment in any of your favorite environment managers:
conda create -n vaahai310 python=3.10
conda activate vaahai310

# Install dependencies with Poetry
poetry install

Quick Start

# Initialize configuration
vaahai config init

# Show current configuration
vaahai config show

# List available models
vaahai model list

# Run a simple test to verify installation
vaahai helloworld run

Development Setup

# Install development dependencies
poetry install --with dev

# Install pre-commit hooks
pre-commit install

# Run tests
poetry run pytest

# Run tests with coverage
poetry run pytest --cov=vaahai

# Format code
poetry run black vaahai
poetry run isort vaahai

# Lint code
poetry run flake8 vaahai
poetry run mypy vaahai

# Run all pre-commit hooks manually
pre-commit run --all-files

For more details on development tools, see Development Tools Documentation.

Configuration

# Run the configuration wizard
poetry run vaahai config init

# Or manually edit the configuration file
nano ~/.vaahai/config.toml

๐Ÿ› ๏ธ Usage

CLI Command Structure

VaahAI provides a modular CLI organized into logical command groups. The command structure follows this hierarchy:

vaahai [command_group] [command] [action] [options]

Where:

  • vaahai is the main CLI application
  • command_group is one of the logical groups (core, project, dev)
  • command is a specific command within that group
  • action is a subcommand or action for that command
  • options are additional flags and parameters

Enhanced Help System

VaahAI features a Rich-formatted custom help system that provides visually appealing and well-organized help information:

  • Styled headers and descriptions with visual separation
  • Organized tables for commands, options, and environment variables
  • Consistent formatting across all commands and subcommands
  • Detailed descriptions and usage examples
  • Color-coded elements for improved readability

To access the enhanced help for any command:

# Main CLI help
vaahai --help

# Command group help
vaahai [command_group] --help

# Specific command help
vaahai [command_group] [command] --help

# Command action help
vaahai [command_group] [command] [action] --help

Global Options

  • --version, -v: Display the current version of VaahAI and exit
  • --verbose, -V: Enable verbose output with detailed logs and information
  • --quiet, -q: Suppress non-essential output
  • --config: Specify an alternative configuration file path
  • --help, -h: Show help message and exit

Core Commands

  • vaahai config: Configuration management
    • vaahai config init: Set up initial configuration
    • vaahai config show: Display current configuration
  • vaahai version: Display version information

Project Commands

  • vaahai review: Code review commands
    • vaahai review run: Run a code review on specified path
  • vaahai audit: Security and compliance audit commands
    • vaahai audit run: Run a security/compliance audit on specified path

Development Commands

  • vaahai dev helloworld: Test command to verify proper functioning
    • vaahai dev helloworld run: Execute the hello world test
    • vaahai dev helloworld --help: Show help for the hello world command
    • Shows detailed debug information including provider, prompt template, and rendered prompt
  • vaahai helloworld: Simplified version of the hello world command
    • Features location-based personalization with culturally relevant greetings
    • Detects user's location/timezone automatically
    • Use --dev flag to see detailed information
  • vaahai dev showcase: Demonstrate Rich formatting capabilities
  • vaahai dev prompts: Demonstrate InquirerPy prompt capabilities

All commands support the --help flag for detailed usage information. For backward compatibility, direct command access (e.g., vaahai helloworld instead of vaahai dev helloworld) is also supported.

Interactive Prompts

VaahAI CLI uses InquirerPy to provide interactive command-line prompts with rich styling. The prompt utilities include:

  • Text input with validation
  • Password input with masking
  • Confirmation prompts (yes/no)
  • Selection from a list of options
  • Multi-selection from a list of options
  • Fuzzy search selection
  • Number input with range validation
  • Path selection with auto-completion

All prompts support non-interactive mode with default values or appropriate error handling.

Basic Commands

# Show help information
vaahai --help

# Show help for a specific command group
vaahai dev --help

# Show help for a specific command
vaahai dev helloworld --help

# Test installation and configuration
vaahai dev helloworld run
# Or using backward compatibility
vaahai helloworld run

# Review code in a file or directory
vaahai review run --path ./my_project --depth standard
# This follows the structure: vaahai [command_group] [command] [action] [options]

# Audit a project for security and compliance
vaahai audit run --path ./my_project --security --compliance owasp

# Show version information
vaahai version

# Apply suggested changes
vaahai apply --file review_suggestions.json

# Commit the changes
vaahai commit --message "Fix code quality issues in app.py"

Example Workflow

# Initialize configuration
vaahai config init

# Review a Python file
vaahai review run --path ./app.py --focus quality

# Apply suggested changes
vaahai apply --file review_suggestions.json

# Commit the changes
vaahai commit --message "Fix code quality issues in app.py"

Terminal Output

VaahAI CLI uses Rich for consistent, styled terminal output. Output behavior can be controlled with:

  • Verbose mode: Set --verbose flag or VAAHAI_VERBOSE=1 environment variable
  • Quiet mode: Set --quiet flag or VAAHAI_QUIET=1 environment variable

For more details on the Rich integration, see the Rich Integration Documentation.

๐Ÿงช Testing

VaahAI includes a comprehensive test suite organized into unit tests and integration tests:

vaahai/test/
โ”œโ”€โ”€ unit/                 # Tests for individual components
โ”‚   โ”œโ”€โ”€ test_cli_utils.py # Tests for console output utilities
โ”‚   โ”œโ”€โ”€ test_help_utils.py # Tests for help formatting utilities
โ”‚   โ””โ”€โ”€ test_version.py   # Tests for version command
โ””โ”€โ”€ integration/          # Tests for component interactions
    โ””โ”€โ”€ test_config_integration.py # Tests for config command

Run the test suite:

# Run all tests
poetry run pytest

# Run tests with coverage report
poetry run pytest --cov=vaahai

# Run specific test file
poetry run pytest vaahai/test/unit/test_cli_utils.py

# Run tests matching a pattern
poetry run pytest -k "config"

For more details on testing, see Testing Guide and Test Implementation.

๐Ÿ—๏ธ Project Structure

vaahai/
โ”œโ”€โ”€ ai_docs/         # AI-specific documentation
โ”œโ”€โ”€ ai_prompts/      # Prompt templates for AI agents
โ”œโ”€โ”€ docs/            # User and developer documentation
โ”‚   โ””โ”€โ”€ cli/         # CLI-specific documentation
โ”œโ”€โ”€ specs/           # Project specifications and requirements
โ”œโ”€โ”€ vaahai/          # Main package
โ”‚   โ”œโ”€โ”€ agents/      # Agent implementations
โ”‚   โ”œโ”€โ”€ cli/         # CLI commands and handlers
โ”‚   โ”‚   โ”œโ”€โ”€ commands/  # Command implementations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ core/      # Core command group
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ config/    # Configuration commands
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ version/   # Version commands
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ project/   # Project command group
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ audit/     # Audit commands
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ review/    # Code review commands
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dev/       # Development command group
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ helloworld/  # Hello world test command
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ showcase/   # Rich formatting showcase
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ helloworld/  # Legacy direct command (for backward compatibility)
โ”‚   โ”‚   โ”œโ”€โ”€ main.py     # CLI entry point
โ”‚   โ”‚   โ””โ”€โ”€ utils/      # CLI utilities
โ”‚   โ”‚       โ”œโ”€โ”€ console.py  # Rich formatting utilities
โ”‚   โ”‚       โ””โ”€โ”€ help.py     # Custom help formatting
โ”‚   โ”œโ”€โ”€ config/      # Configuration management
โ”‚   โ”œโ”€โ”€ llm/         # LLM provider integrations
โ”‚   โ””โ”€โ”€ utils/       # Utility functions and helpers
โ””โ”€โ”€ tests/           # Test suite
    โ””โ”€โ”€ cli/         # CLI tests

๐Ÿ“ Documentation

For more detailed documentation, please refer to:

๐Ÿค Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for more details on how to get involved.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vaahai-0.2.23.tar.gz (55.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vaahai-0.2.23-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

Details for the file vaahai-0.2.23.tar.gz.

File metadata

  • Download URL: vaahai-0.2.23.tar.gz
  • Upload date:
  • Size: 55.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for vaahai-0.2.23.tar.gz
Algorithm Hash digest
SHA256 e9360322df53f0fb869cc99bfe08630a0a3dad3dd9c9017e7aa02fec4f8caad7
MD5 49e43d64e572729ac0c46ea4c24cac32
BLAKE2b-256 fbd803f6dc062d94f90e9c0060b4b925a932d68c02332efceb4e350b6c2071f2

See more details on using hashes here.

File details

Details for the file vaahai-0.2.23-py3-none-any.whl.

File metadata

  • Download URL: vaahai-0.2.23-py3-none-any.whl
  • Upload date:
  • Size: 72.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for vaahai-0.2.23-py3-none-any.whl
Algorithm Hash digest
SHA256 eb77da55218657ab4c827946f5beffcbac687756702d3fb40844e2b2a118b125
MD5 0fa02eaeb990643fb5660f5c07c1c139
BLAKE2b-256 0c6404bffc06d65e8bf5216e683367668ebd33a2eabd809f35be5c2114a684bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page