Skip to main content

opencomplai-ai

License: AGPL-3.0 PyPI Python

The optional AI intent classification plugin for Opencomplai. It adds the --ai-intent flag to opencomplai scan, classifying how each AI callsite in your code is actually used — its decision autonomy, the subjects it acts on, and which EU AI Act risk tier and Annex III area it maps to.

All inference runs locally — models execute on your machine via ONNX Runtime or llama.cpp. No code or prompts leave your environment.

Prerequisites

opencomplai-ai is a plugin. Install the core engine first:

pip install opencomplai-core   # or the opencomplai / opencomplai-cli suite

Install

# Base install — CodeBERT (ONNX) classification, no extra build deps
pip install opencomplai-ai

# Deep install — adds llama.cpp for generative GGUF models
pip install "opencomplai-ai[deep]"

Usage

Once installed alongside the CLI, the --ai-intent flag becomes available on the scan command:

opencomplai scan --ai-intent

By default only callsites in files with lexical findings are annotated (fast). To analyze every callsite in the repository:

opencomplai scan --ai-intent --ai-deep

Useful flags:

Flag Effect
--ai-intent Enable AI intent classification
--ai-model <id> Choose a model (see catalog below)
--ai-deep Annotate every callsite, not just those near lexical findings
--ai-verbose Show all callsite annotations (default: top 10 by risk tier)

Supported models

The default model (codebert-onnx) runs on the base install. The generative GGUF models require the [deep] extra. Models are downloaded from the Hugging Face Hub on first use and cached locally under ~/.opencomplai/.

Model ID Runtime Size Needs [deep]
codebert-onnx (default) ONNX Runtime ~440 MB no
qwen2.5-coder-0.5b llama.cpp ~400 MB yes
qwen2.5-coder-1.5b (recommended) llama.cpp ~1.0 GB yes
smollm2-1.7b llama.cpp ~1.1 GB yes
phi-3.5-mini llama.cpp ~2.2 GB yes
mistral-7b llama.cpp ~4.1 GB yes
opencomplai scan --ai-intent --ai-model qwen2.5-coder-1.5b

Model download flow

On first use of a model, the plugin prompts before downloading and shows a progress bar. The CodeBERT model has no prebuilt ONNX artifact on the Hub, so it is exported from the official PyTorch checkpoint on first run and then cached. Subsequent scans reuse the cached model with no network access.

Documentation

Full AI-intent guide and the model reference at docs.opencomplai.com.

License

AGPL-3.0-only. See LICENSE.

Download files

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

Source Distribution

opencomplai_ai-0.4.0.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

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

opencomplai_ai-0.4.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file opencomplai_ai-0.4.0.tar.gz.

File metadata

  • Download URL: opencomplai_ai-0.4.0.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for opencomplai_ai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2fe7c7283537e2fe07702d6d37746edd774c7376a9e4d6fdcd03100118c1cd88
MD5 24ddab4d9692061f4b3a1cc2fdc8d621
BLAKE2b-256 eaf4375b1fd6ea3fd319ce6028f0094efccc0118dd9c95a4c384898fb2a44209

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomplai_ai-0.4.0.tar.gz:

Publisher: publish-pypi.yml on Opencomplai/opencomplai-enterprise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opencomplai_ai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: opencomplai_ai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for opencomplai_ai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bcb3cbe982f349b88bde90d8ab44baf2f812a677973b856c354642fe3f4a0e9
MD5 b3dd72fdb3fcd7434b3890c70ca15f91
BLAKE2b-256 0c55643e877fac38aa92f61971af08e530a4a0456c3fb51186f2973f04553cac

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomplai_ai-0.4.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Opencomplai/opencomplai-enterprise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.1.2

2 files

0.1.0

2 files

Supported by

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