ATOM AI Governance SDK — pre-execution governance for every AI call
Project description
atomlabs
Pre-execution AI governance for every model you use.
Install
# From a local checkout (editable)
pip install -e /path/to/lcac/sdk
# Or directly from git
pip install git+https://github.com/atomlabs/atom-sdk-python.git
Requires Python 3.8+ and requests>=2.28.0.
Quick Start
from atomlabs import ATOMClient, GovernanceBlockError
client = ATOMClient(
api_key="lcac_your_key_here",
tenant_id="your-tenant-id"
)
# Make a governed call
result = client.governed_call(
"Analyze this customer complaint...",
provider="groq"
)
if client.is_allowed(result):
print(client.get_output(result))
print(f"RIS Level: {client.get_ris_level(result)}")
print(f"CII Score: {client.get_cii_score(result)}")
# Raise exception if blocked
try:
output = client.governed_call_or_raise(
"Your prompt here",
provider="anthropic"
)
except GovernanceBlockError as e:
print(f"Blocked: {e.reason}")
print(f"RIS: {e.ris_level}, CII: {e.cii}")
Methods
| Method | Description |
|---|---|
governed_call() |
Make a governed AI call, returns full envelope |
governed_call_or_raise() |
Call or raise GovernanceBlockError on block |
is_allowed(result) |
Check if decision is allow |
is_blocked(result) |
Check if decision is block |
get_ris_level(result) |
Get RIS-0 through RIS-4 |
get_cii_score(result) |
Get CII float 0.0–1.0 |
get_output(result) |
Get model response text |
get_drift_score(result) |
Get semantic drift score |
get_traces() |
Get recent governance traces |
get_usage() |
Get tenant usage stats |
health() |
Check platform health |
create_agent() |
Create a governed agent |
list_agents() |
List tenant agents |
run_agent() |
Execute a governed agent run |
get_agent_policy() |
Read agent governance policy |
set_agent_policy() |
Update agent governance policy |
Team Management
User management (invites, roles, listing) is handled via the console UI at
https://console.atomlabs.app or the HTTP API under /api/tenants/{tenant_id}/users.
Native SDK methods for team management will ship in a future release.
Roles available via the API: admin · developer · viewer · security_officer
Webhooks
Webhook management (create, list, delete) is available via the HTTP API at
/api/tenants/{tenant_id}/webhooks and the console UI. Native Python SDK
methods will ship in a future release.
Payloads are signed with HMAC-SHA256. Verify the X-ATOM-Signature header.
Local Models
# Use a local GGUF model (zero data egress)
result = client.governed_call(
"Your prompt",
provider="local",
model="llama-3.2-3b-instruct.Q4_K_M.gguf"
)
Local models run on your infrastructure. No data leaves your environment.
Providers
groq · anthropic · gemini · mistral · openai · local
CLI
# Health check
python -m atomlabs health --api-key lcac_... --tenant-id your-tenant
# Make a governed call
python -m atomlabs call --input "Your prompt" --provider groq \
--api-key lcac_... --tenant-id your-tenant
# Or via environment variables
export ATOM_API_KEY=lcac_...
export ATOM_TENANT_ID=your-tenant
python -m atomlabs health
python -m atomlabs call --input "Your prompt"
python -m atomlabs traces --limit 10
python -m atomlabs agents
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomlabs-1.0.1.tar.gz.
File metadata
- Download URL: atomlabs-1.0.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec36810a91f3204f395e3e855b844b4c891d1974de4fdb9b929ea458510db767
|
|
| MD5 |
dd714b6cade91428244a66eb84895d19
|
|
| BLAKE2b-256 |
387f9f73cd5abae65ca8b7bd2a5b34735d7ae54ef687dbb59045ae86054aa518
|
File details
Details for the file atomlabs-1.0.1-py3-none-any.whl.
File metadata
- Download URL: atomlabs-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669ebd587d09de5d9a965bff8fb5faaddb56a6e91f60e7cf968728b398245e01
|
|
| MD5 |
4c129e24af4100cd52fea2eec3f0326c
|
|
| BLAKE2b-256 |
12b781b710b0199c0ec904c24ba5df9a41b44d6df276c15a26216617fd6c0763
|