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.2.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.2-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agcms-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5d6e6123a6986a3c927a6593330fc08718713e01b10721c7a96451e04272d391
MD5 bdcd823aadf77a9156c12b94acf84348
BLAKE2b-256 ad18f80f54f2c0d5616f778db65fc6d1ebf729dde1549d68b181361cee52c6cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agcms-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7b2f2bb6bf91e2cfddede9f44e00ac09b65d694d067cd0931b49fc362530e5f
MD5 e87e3a317e71b60a4801ea943591b836
BLAKE2b-256 c8dc7eccb89a3a8ccc0275d857b82afe67704d72e4123d404036ebcb635450ab

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