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.3.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.3.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomplai_ai-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 a8aee5b83623115a2ae7da86fb4f0c0e5a27043437c1ec2f9ce484f8735678f6
MD5 9e16c2621948dc25e61be511ea14d699
BLAKE2b-256 c6a3b28543aa2884f60914ea315ec6ca75c4e22433df397417b1c9bf4cbed16f

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomplai_ai-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: opencomplai_ai-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f34508a06f3dd634f39df86559d41a0e9976121e853f4b6b059aca29a90f36
MD5 8000a3efe17fceafe60cf493d415242f
BLAKE2b-256 5490f7984b346e543b2e0f741d88d36f62096690719ef424bcb1fe058130ea0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomplai_ai-0.3.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

0.4.0

2 files

This release

0.3.0 This release

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