Home / Plugins / AI Compliance
AI Compliance
EU AI Act Article 12 record-keeping: a tamper-evident receipt chain over every AI inference call (SHA-256 chain, RFC 8785 JCS canonical JSON, Ed25519 signatures).
| Category | Compliance |
|---|---|
| Package | ahgAiCompliancePlugin |
| Version | 0.1.0 |
| Status | Installs from source. Clean-database install not yet verified. |
| Requires | Core |
| Licence | AGPL-3.0-or-later |
| Install | From the source repository: see Installation below. No packaged download yet. |
EU AI Act Article 12 record-keeping for the AtoM-AHG fork (PSIS twin of the Heratio ahg-ai-compliance package). Every AI inference call (LLM, HTR, NER, OCR, Translate, Guardrail, ...) writes one immutable row to ai_inference_log. Each row links to the previous via a SHA-256 chain; each row's hash is over the RFC 8785 JCS canonical form of the row's signing view; each hash is Ed25519-signed under a publisher key. The protocol primitives live in the framework-agnostic ahg/inference-receipts Composer library. This plugin is the AtoM integration layer.
Installation
Add the Composer dependency to the AtoM root
composer.json:"require": { "ahg/inference-receipts": "^0.1" }Then
composer install --no-scriptsfrom/usr/share/nginx/archive.Drop the plugin directory into
plugins/(or wherever your AtoM instance loads AHG plugins from; on this host the canonical path is/usr/share/nginx/archive/atom-ahg-plugins/ahgAiCompliancePlugin/).Run the install SQL against the AtoM database:
mysqldump archive > /var/backups/archive-before-ai-compliance.sql php atom-framework/bin/install-plugin-schema.php --database=<database> --user=<user> --password=<password> --plugin=ahgAiCompliancePlugin # from the AtoM root; never a plain mysql < install.sqlTwo new tables are created:
ai_inference_log(the chain) andai_inference_key(the per-kid public-key registry). Both are InnoDB / utf8mb4_unicode_ci and live alongside the existingahg_*sidecar tables - no AtoM/Qubit base tables are touched.Generate the signing key:
sudo -u www-data php symfony ai-compliance:install-keyWrites the secret key (raw libsodium 64-byte) to
data/ai-keys/inference-signing.sk(mode 0600) and registers the kid inai_inference_key. Run as the same uid that AtoM serves under so the web action can read it back if needed.Clear cache so Symfony picks up the new module + routes:
php symfony ccVerify the endpoint:
curl -i https://psis.theahg.co.za/.well-known/ai-inference-pubkeyShould return
200 OKwithapplication/jsoncontaining the issuer, purpose, spec URL, and akeysarray with one active Ed25519 key.
Try it
This feature is for signed-in staff, so it is not open on the public demo.
Source and README on GitHub · Questions: support@theahg.co.za or WhatsApp