Skip to main content

Official Python SDK for AGCMS — AI Governance & Compliance Monitoring.

Project description

AGCMS Python SDK

Official Python client for AGCMS — AI Governance & Compliance Monitoring. Drop-in replacement for the OpenAI client that routes every call through your AGCMS gateway, so you get PII redaction, prompt-injection detection, policy enforcement, and cryptographically signed audit trails for free.

Install

pip install agcms

Quickstart

from agcms import AGCMSClient

client = AGCMSClient(
    base_url="http://localhost:8000",          # your AGCMS gateway
    api_key="agcms_test_key_for_development",  # or a real per-tenant key
)

resp = client.chat.completions.create(
    model="groq:llama-3.3-70b-versatile",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(resp["choices"][0]["message"]["content"])
print("audit interaction_id:", client.last_interaction_id)

Wrap an existing OpenAI client (3-line integration)

from openai import OpenAI
from agcms import openai_wrap

client = openai_wrap(
    OpenAI(api_key="sk-..."),
    agcms_base_url="http://localhost:8000",
    agcms_api_key="agcms_test_key_for_development",
)

# Use it exactly like a regular OpenAI client; AGCMS sits in the middle.
client.chat.completions.create(model="gpt-4o", messages=[...])

Verify an audit bundle (CLI)

python -m agcms.cli verify path/to/bundle.zip

Validates the hash chain, Merkle root, and signing-key chain offline — no network calls, no AGCMS credentials needed.

Run AGCMS yourself

The repo ships a 11-service docker-compose.yml:

git clone https://github.com/Dheeran-git/AGCMS.git
cd AGCMS && cp .env.example .env
docker compose up --build --wait
# → gateway on :8000, dashboard on :3000

License

Apache-2.0

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

agcms-0.1.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

agcms-0.1.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agcms-0.1.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for agcms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8ecc3aa8b89c580100cd346d45b3703639913c5d75a08865e63848f218e26801
MD5 ae9accced9f429f70144916bc6094c2b
BLAKE2b-256 baafa0044ad5489e5fc12e65edce4891a1fa2815011626f82e42618b60f9152b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agcms-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for agcms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbde446494de26b6c2ebe15b8d6817216ae69c3452f762239a0553a7ef5ac432
MD5 d9ec3fc7e6ba64b70cc1314023ea869d
BLAKE2b-256 3c66ae720ff2f25d192745638d1e798ecc7d8ac0c44e51b8a2014c4877594f3f

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