Skip to content

Latest commit

 

History

History
215 lines (160 loc) · 5.12 KB

README.md

File metadata and controls

215 lines (160 loc) · 5.12 KB

Open Process Intelligence (OPI)

CI Python License PyPI Platform Status

Open-source, local-first process intelligence for everyone.

Mission

Make process intelligence accessible to small businesses, developers, researchers, and analysts without expensive enterprise software or mandatory cloud subscriptions.

Features

  • Event log validation and normalization
  • Automatic process discovery
  • Directly Follows Graphs (DFG)
  • Process variant analysis
  • Throughput time analysis
  • Potential bottleneck detection
  • Process visualization
  • Structured JSON reporting

Technology Stack

  • Python
  • Pandas
  • DuckDB
  • PM4Py
  • Graphviz
  • Apache Parquet
  • Pytest

Installation

OPI requires Python 3.12.

Install directly from PyPI:

pip install open-process-intelligence

Installation from source

git clone https://github.com/S4Good/open-process-intelligence.git
cd open-process-intelligence
python -m pip install .

Development installation

python -m pip install -e ".[dev,demo]"

Quick Start

Analyze a business process using a Pandas DataFrame.

import pandas as pd

from opi.analytics import analyze_performance, discover_variants
from opi.discovery import discover_process

events = pd.DataFrame(
    {
        "case_id": ["1", "1", "1", "2", "2", "2"],
        "activity": [
            "Order Received",
            "Order Processed",
            "Order Delivered",
            "Order Received",
            "Order Processed",
            "Order Delivered",
        ],
        "event_timestamp": pd.to_datetime(
            [
                "2026-01-01 08:00",
                "2026-01-01 10:00",
                "2026-01-01 14:00",
                "2026-01-02 09:00",
                "2026-01-02 12:00",
                "2026-01-02 18:00",
            ],
            utc=True,
        ),
    }
)

print("=== Process Discovery ===")
print(discover_process(events))

print("\n=== Process Variants ===")
print(discover_variants(events))

print("\n=== Process Performance ===")
print(analyze_performance(events))

Expected Results

Metric Result
Cases 2
Events 6
Activities 3
Process variants 1
Average duration 7.5 hours
Minimum duration 6 hours
Maximum duration 9 hours

The example runs locally without external datasets, database servers or cloud services.

Input Data Format

OPI expects an event log containing three essential columns:

Column Description
case_id Unique process instance identifier
activity Name of the executed activity
event_timestamp Timestamp of the event

Examples of process instances include customer orders, support tickets, invoices and delivery requests.

Testing

python -m pytest -q
python -m ruff check .

Architecture

OPI separates its reusable analytical engine from industry-specific demonstration projects.

  • src/opi: Core process intelligence library
  • src/itsm: IT service management demonstration
  • examples: Library usage examples
  • tests: Automated functional tests
  • reports: Analytical outputs

Verified Demonstration

  • 10,000 synthetic IT incidents
  • 70,000 source audit records
  • 50,000 process events
  • 28 passing automated tests

Real-World Benchmark

OPI v0.1.0 was evaluated against the publicly available Sepsis Cases hospital event log.

Metric Result
Real-world cases 1,050
Process events 15,214
Activities 16
Process variants 846
Distinct transitions 115
Independent verification checks 21/21 passed

All compared analytical results agreed with an independently implemented reference calculation under the selected event-ordering and numerical conventions.

Read the full benchmark case study

Real-world process discovery

Roadmap

  • Generic CSV and Excel import
  • Interactive Process Explorer
  • Advanced process analytics
  • Conformance checking
  • Object-centric process mining
  • Business object modeling
  • Process automation
  • Automated release publishing
  • Standalone desktop application

Principles

  • Local-first processing
  • Data privacy
  • Transparent analytics
  • Vendor independence
  • Open-source development

Project Status

Early development (v0.1.0). Published on PyPI and GitHub Releases. Alpha software; not yet recommended for production use.

Author

Shahrukh Khan

License

Open Process Intelligence is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See LICENSE and THIRD_PARTY_NOTICES.md for details.