Hejdar AI governance SDK — policy evaluation for AI agents
Project description
Hejdar Python SDK
Policy evaluation for AI agents. Check actions against Hejdar governance rules before execution.
Install
pip install hejdar
Quickstart
from hejdar import Hejdar, HejdarDeniedError, HejdarNetworkError
client = Hejdar(api_key="hejdar_sk_...")
try:
result = client.check(
agent_id="finance-assistant",
action_type="WRITE_DB",
data_classification="PII",
environment="production",
)
if result.allowed:
# Proceed with action
pass
except HejdarDeniedError as e:
# Blocked in enforce mode
print(f"Denied: {e.reason_code}")
except HejdarNetworkError:
# API unreachable — fail closed (treat as deny)
pass
Modes
- Observe (shadow): Returns
WOULD_DENY/WOULD_REQUIRE_APPROVAL— logs a warning, never raises. Use to trial policies. - Enforce: Returns
DENY/REQUIRE_APPROVAL— raisesHejdarDeniedErrorand blocks execution.
Async
result = await client.check_async(agent_id="...", action_type="READ_DB")
API Reference
check(agent_id, action_type, data_classification="INTERNAL", environment="production", ...) — see docstrings.
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
hejdar-0.1.0.tar.gz
(4.9 kB
view details)
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 hejdar-0.1.0.tar.gz.
File metadata
- Download URL: hejdar-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f97aeda99e4c90c989838617be955d69846e9a276de531f2a75b8c1d6ae138
|
|
| MD5 |
4c31583f234d36749c028b5254efb44e
|
|
| BLAKE2b-256 |
b0a39025f3ec328522efcd7d510bddc98f0dbd15dbede34e5480084b7d64d7a3
|
File details
Details for the file hejdar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hejdar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8a882b6b648103d1f90e7992e1f4ef5d9ebbc6ab60e39dc2c58a050192e73ee
|
|
| MD5 |
91ea04c5c65960add6ac32b102463eb6
|
|
| BLAKE2b-256 |
af76f31ca63098cb15a1d2e924ba4f4eccf94db613acfe824bef3d4ddde42c47
|