Skip to main content

Model-based GUI automation with AI-enhanced perception

Project description

Qontinui

PyPI version Python 3.12+ License: MIT Code style: black

A Python library for model-based GUI automation with intelligent state management and visual recognition.

Research Foundation

Based on Model-based GUI Automation published in Springer's Software and Systems Modeling journal (October 2025).

The research provides:

  • Mathematical proof of complexity reduction (exponential → polynomial)
  • First testable approach to GUI automation (unit tests, integration tests)
  • Formal framework for robust visual APIs for RL agents
  • Enables reliable dataset generation for AI training

Overview

Qontinui enables building robust GUI automation through:

  • Model-based state management using MultiState | Docs
  • Visual recognition with OpenCV template matching
  • JSON configuration for defining automation workflows
  • Cross-platform support (Windows, macOS, Linux)

Qontinui is a Python port of Brobot, a Java library for GUI automation (2018-2024).

Installation

From PyPI (Recommended)

pip install qontinui

From Source (Development)

# Clone the repository
git clone https://github.com/jspinak/qontinui.git
cd qontinui

# Install with Poetry
poetry install

# Or with pip
pip install -e .

Dependencies

Qontinui requires:

  • MultiState - Multi-state state management
  • OpenCV - Image template matching
  • PyAutoGUI/pynput - Input control

Quick Start

JSON Configuration

Create an automation configuration in JSON:

{
  "version": "1.0",
  "states": [
    {
      "name": "LoginScreen",
      "stateImages": [
        {
          "imageId": "login_button",
          "threshold": 0.9
        }
      ]
    }
  ],
  "processes": [
    {
      "name": "Login",
      "actions": [
        {
          "type": "CLICK",
          "target": {"type": "image", "imageId": "login_button"}
        },
        {
          "type": "TYPE",
          "text": "username@example.com"
        }
      ]
    }
  ]
}

Python API

from qontinui.json_executor import JSONRunner

# Initialize runner
runner = JSONRunner()

# Load configuration
runner.load_configuration("automation_config.json")

# Execute automation
success = runner.run(monitor_index=0)

Desktop Application

Use Qontinui Runner for a GUI interface to create and run automations.

Architecture

qontinui/
├── src/qontinui/
│   ├── json_executor/       # JSON configuration execution
│   ├── model/               # State, Transition, Image models
│   ├── hal/                 # Hardware Abstraction Layer
│   └── multistate_adapter/  # MultiState integration

Features

Current

  • ✅ JSON-based automation configuration
  • ✅ Template-based image matching
  • ✅ Multi-state state management
  • ✅ Process and state machine execution modes
  • ✅ Cross-platform input control (PyAutoGUI, pynput)
  • ✅ Hardware abstraction layer for multiple backends

Planned

  • 🔄 AI-enhanced visual recognition (SAM, CLIP)
  • 🔄 Domain-specific language (DSL)
  • 🔄 Advanced Brobot migration tools
  • 🔄 Cloud execution via qontinui-web

Testing

Run the test suite:

# Run all tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=src/qontinui

# Run specific test file
poetry run pytest tests/json_executor/test_json_runner.py

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.

Qontinui is a faithful port of Brobot. When contributing, please preserve Brobot's architecture and behavior.

Documentation

License

MIT License - See LICENSE file for details.

Acknowledgments

Related Projects

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

qontinui-0.1.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

qontinui-0.1.1-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file qontinui-0.1.1.tar.gz.

File metadata

  • Download URL: qontinui-0.1.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/10

File hashes

Hashes for qontinui-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ad5918f1e9fed56c5fb4e8bf779962a2d1d3f26641e20d83a78c905439e8265d
MD5 3f475a92805c1b3fdecf90e9b26968db
BLAKE2b-256 b517a2c479aa447a71e4edb5fec9f5246e760402c71893d6fbb419b32052bab9

See more details on using hashes here.

File details

Details for the file qontinui-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: qontinui-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/10

File hashes

Hashes for qontinui-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e22b9a91ae4a683806c5898185dbd74553cde2b6b71d31aa79f49beb4993649
MD5 b0d28d4011fbbaea1960d821cb62feaf
BLAKE2b-256 2bb421c045929f05df6a1dd3c8ce34cb7cd8fa77d262878efa2f1cae99b039e8

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