Skip to content

Latest commit

Β 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Kiro β€” Intelligent OS Automation Agent

Control your entire desktop intelligently, safely, and naturally.

Kiro is an advanced AI-powered operating system automation framework designed to understand natural language commands and execute complex system tasks with intelligent planning, safety validation, and automatic recovery mechanisms.

Built as a modular, extensible agent system, Kiro combines the power of large language models with local system integration to provide truly autonomous desktop assistance.


✨ Key Features

🎯 Intelligent Task Planning

  • Breaks down complex user requests into executable subtasks
  • Learns from execution history and past patterns
  • Adaptive planning based on system context

πŸ›‘οΈ Safety-First Architecture

  • Command validation before execution
  • Risk assessment and confirmation for critical actions
  • Automatic rollback on failures
  • Comprehensive action logging

πŸ’Ύ Smart File Management

  • Intelligent file organization by type and category
  • Duplicate file detection and removal
  • Large file identification and analysis
  • Folder structure optimization

πŸ” System Diagnostics & Maintenance

  • Real-time CPU, RAM, and disk monitoring
  • System health checks and alerts
  • Cleanup scanning for old and temporary files
  • Performance analysis and recommendations

πŸ‘οΈ Vision & OCR Integration

  • Screenshot analysis using Google Gemini
  • Optical Character Recognition (OCR)
  • Visual problem detection and troubleshooting
  • Screenshot-based task automation

🎀 Natural Language Interface

  • Conversational command understanding
  • Multi-turn conversation support
  • Context-aware request interpretation
  • User preference learning

πŸ“š Memory & Learning

  • Persistent execution history
  • Context storage and retrieval
  • Preference management
  • Task outcome tracking

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         User Input (Natural Language) text/voice        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Master Agent - Central Orchestrator                  β”‚
β”‚    - Intent Extraction & Goal Definition                β”‚
β”‚    - Multi-agent coordination                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Intent Router  β”‚      β”‚ Task Planner       β”‚
β”‚ - Intent       β”‚      β”‚ - Breakdown tasks  β”‚
β”‚   detection    β”‚      β”‚ - Prioritization   β”‚
β”‚ - Action       β”‚      β”‚ - Optimization     β”‚
β”‚   mapping      β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
        β”‚                        β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  Execution Engine       β”‚
        β”‚  - Safe execution       β”‚
        β”‚  - Error handling       β”‚
        β”‚  - Logging              β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚                             β”‚
β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚ Tool Modules β”‚          β”‚ LLM Services  β”‚
β”‚ - File Mgmt  β”‚          β”‚ - Gemini      β”‚
β”‚ - System     β”‚          β”‚ - Groq        β”‚
β”‚ - Diagnosis  β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ - Web        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– Core Agents

Master Agent

Central orchestrator that coordinates all system operations:

  • Receives and interprets user requests
  • Manages task planning and execution flow
  • Maintains memory and context
  • Provides feedback and reporting
  • Location: agent/master_agent.py

Task Planner

Intelligent task decomposition and planning:

  • Converts goals into executable task sequences
  • Handles dependencies between tasks
  • Estimates execution time and resource requirements
  • Adapts plans based on execution feedback
  • Location: agent/task_planner.py

Execution Engine

Manages safe task execution:

  • Pre-execution validation and safety checks
  • Handles task execution with error recovery
  • Logs all operations for audit trails
  • Implements automatic rollback on failures
  • Location: agent/execution_engine.py

Memory Manager

Maintains system state and learning:

  • Execution history tracking
  • Context and preference storage
  • Performance metrics recording
  • Learning from past executions
  • Location: agent/memory_manager.py

πŸ“¦ Module Overview

LLM Services (llm/)

Multi-LLM support for flexible AI backend:

  • Gemini Client: Google's advanced language model for vision and text
  • Groq Client: High-speed inference for real-time responses

File Manager (file_manager/)

Comprehensive file and folder management:

  • manager.py - Main orchestrator
  • file_organizer.py - Auto-organize files by type
  • duplicate_detector.py - Find and remove duplicates
  • large_file_scanner.py - Identify large files
  • folder_finder.py - Smart folder discovery
  • llm_organizer.py - AI-powered categorization

Tools (tools/)

System integration and action execution:

  • file_tools.py - File operations
  • system_tools.py - System control (shutdown, restart, etc.)
  • system_config.py - System configuration management
  • diagnostics_tools.py - Health checks and monitoring
  • app_tools.py - Application launching
  • web_tools.py - Web searching and browsing
  • help_commands.py - User guidance

Troubleshooting (troubleshooter/)

Advanced problem diagnosis and resolution:

  • vision_analyzer.py - Visual problem analysis
  • screenshot_tool.py - Screenshot capture and analysis
  • solution_parser.py - Parse and format solutions
  • auto_fix_engine.py - Automated fixing mechanisms

Vision (vision/)

Computer vision capabilities:

  • vision_engine.py - Image analysis and OCR
  • Screenshot-based automation support

Personalization (personalisation/)

User preference and behavior learning:

  • personalisation_tools.py - Customization features
  • User profile management

Router (router/)

Intent-based command routing:

  • intent_router.py - Maps intents to actions
  • Multi-intent support for complex requests

πŸš€ Getting Started

Prerequisites

  • Python 3.8+
  • Windows 10/11 (or Linux/macOS with adaptation)
  • API Keys: Google Gemini, Groq (optional but recommended)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/Kiro.git
    cd Kiro
  2. Create a Python virtual environment

    python -m venv venv
    venv\Scripts\activate  # Windows
    source venv/bin/activate  # Linux/macOS
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up environment variables

    # Create .env file in root directory
    GOOGLE_API_KEY=your_gemini_api_key
    GROQ_API_KEY=your_groq_api_key
  5. Run Kiro

    python main.py

πŸ’» Usage Examples

Basic Commands

> organize my downloads
βœ… Analyzed 245 files
βœ… Created 8 category folders
βœ… Moved 187 files successfully

> find large files on my desktop
πŸ“Š Scanning: C:\Users\YourName\Desktop
βœ… Found 12 files over 100MB
  β€’ video_backup.mp4 (2.3GB)
  β€’ old_project.zip (890MB)

> what's my system health
πŸ₯ System Health Check
  CPU Usage: 34%
  RAM Usage: 62% (8.9GB/16GB)
  Disk Usage: 71% (425GB/600GB)
  Status: βœ… HEALTHY

> scan for old files
πŸ—‘οΈ  OLD FILES SCAN
Files older than 7 days: 23
Total recoverable space: 2.4GB
Use 'confirm cleanup' to delete

> take a screenshot and analyze it
πŸ“Έ Captured screenshot
πŸ€– Analysis:
  - Browser window detected
  - Showing error message
  - Recommended: Check browser console logs

Special Commands

help              - Show available commands
history           - View recent executions
stats             - Display execution statistics
status            - Agent system status
clear history     - Reset execution memory
exit              - Shutdown Kiro

βš™οΈ Configuration

System Configuration (tools/system_config.py)

Manage system-wide settings:

  • LLM model selection
  • Execution timeouts
  • Safety levels
  • Logging verbosity

Memory Configuration (agent_memory/)

  • execution_history.json - Past execution logs
  • context.json - Current system context
  • preferences.json - User preferences
  • plans.json - Saved task plans

πŸ›‘οΈ Safety & Security

Kiro implements multiple layers of protection:

Pre-Execution Validation

  • Intent risk assessment
  • Command whitelisting/blacklisting
  • User confirmation for critical actions

Protected Zones

  • System32 directory
  • Registry operations
  • Forced process termination
  • Mass file deletion

Execution Monitoring

  • Real-time operation logging
  • Resource usage tracking
  • Error detection and handling

Rollback Capabilities

  • Pre-execution snapshots
  • File restoration on failures
  • Process restart mechanisms
  • State rollback on user request

πŸ“Š Project Structure

Kiro/
β”œβ”€β”€ main.py                      # Entry point
β”œβ”€β”€ requirements.txt             # Dependencies
β”œβ”€β”€ README.md                    # This file
β”‚
β”œβ”€β”€ agent/                       # Core agent system
β”‚   β”œβ”€β”€ master_agent.py         # Central orchestrator
β”‚   β”œβ”€β”€ task_planner.py         # Task decomposition
β”‚   β”œβ”€β”€ execution_engine.py     # Safe execution
β”‚   β”œβ”€β”€ memory_manager.py       # State management
β”‚   └── task.py                 # Task definition
β”‚
β”œβ”€β”€ llm/                         # LLM integrations
β”‚   β”œβ”€β”€ gemini_client.py        # Google Gemini
β”‚   └── groq_client.py          # Groq API
β”‚
β”œβ”€β”€ file_manager/               # File management suite
β”‚   β”œβ”€β”€ manager.py              # Main orchestrator
β”‚   β”œβ”€β”€ file_organizer.py       # Auto-organization
β”‚   β”œβ”€β”€ duplicate_detector.py   # Deduplication
β”‚   β”œβ”€β”€ large_file_scanner.py   # Size analysis
β”‚   └── folder_finder.py        # Folder discovery
β”‚
β”œβ”€β”€ tools/                       # System tools
β”‚   β”œβ”€β”€ file_tools.py           # File operations
β”‚   β”œβ”€β”€ system_tools.py         # System control
β”‚   β”œβ”€β”€ diagnostics_tools.py    # Health & monitoring
β”‚   β”œβ”€β”€ app_tools.py            # App launching
β”‚   β”œβ”€β”€ web_tools.py            # Web integration
β”‚   └── help_commands.py        # User guidance
β”‚
β”œβ”€β”€ troubleshooter/             # Problem diagnosis
β”‚   β”œβ”€β”€ vision_analyzer.py      # Image analysis
β”‚   β”œβ”€β”€ screenshot_tool.py      # Screenshot capture
β”‚   β”œβ”€β”€ solution_parser.py      # Solution parsing
β”‚   └── auto_fix_engine.py      # Auto-fixing
β”‚
β”œβ”€β”€ vision/                      # Computer vision
β”‚   └── vision_engine.py        # Vision processing
β”‚
β”œβ”€β”€ router/                      # Intent routing
β”‚   └── intent_router.py        # Command routing
β”‚
β”œβ”€β”€ personalisation/             # User customization
β”‚   └── personalisation_tools.py
β”‚
β”œβ”€β”€ agent_memory/               # Persistent storage
β”‚   β”œβ”€β”€ execution_history.json
β”‚   β”œβ”€β”€ context.json
β”‚   β”œβ”€β”€ preferences.json
β”‚   └── plans.json
β”‚
└── utils/                       # Utility functions
    β”œβ”€β”€ prompt_loader.py        # Prompt management
    β”œβ”€β”€ json_parser.py          # JSON utilities
    β”œβ”€β”€ system_monitor.py       # Monitoring
    └── prompt_loader.py        # Prompt loading

πŸ”§ Technology Stack

Component Technology Purpose
LLM Google Gemini, Groq Natural language understanding & generation
Vision EasyOCR, Pillow Image analysis and OCR
System Monitoring psutil CPU, RAM, Disk metrics
Screenshots mss Screen capture
GUI CustomTkinter Desktop interface (optional)
HTTP requests Web operations
Config python-dotenv Environment management

πŸ“ˆ Performance Metrics

Monitor Kiro performance:

# Execution statistics
stats = agent.get_execution_stats()
print(f"Success Rate: {stats['success_rate']:.1f}%")
print(f"Avg Task Time: {stats['avg_execution_time']}s")
print(f"Total Executions: {stats['total_executions']}")

# Agent status
status = agent.get_agent_status()
print(f"Memory Entries: {status['memory_entries']}")
print(f"History Count: {status['execution_history_count']}")

🎨 Enhancement Areas

Potential improvements and future phases:

  • Multi-language support
  • Real-time collaboration features
  • Custom automation workflow builder
  • Advanced scheduling capabilities
  • Database integration for complex queries
  • Mobile app companion
  • Cloud sync for cross-device support
  • Advanced ML-based pattern recognition
  • Plugin system for third-party integrations

πŸ“ License

This project is provided as-is for educational and personal use. Ensure compliance with your operating system's terms of service when using automation features.


🀝 Contributing

We welcome contributions! Please feel free to submit issues, feature requests, and pull requests.


πŸ“ž Support

For issues, questions, or feature requests, please open an issue on the project repository.


Built with ❀️ as an advanced AI desktop automation framework.

Last Updated: February 2026

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages