Python SDK for Covenant AI — AI Agent Governance Gateway
Project description
Covenant AI Python SDK
Govern your AI agents in 3 lines of code.
Install
pip install covenant-ai
Quick Start
from covenant_ai import CovenantClient
covenant = CovenantClient(agent_name="MyBot")
# Check if an action is allowed
result = covenant.check("wire_transfer", {"amount": 50000})
if result.allowed:
execute_transfer()
else:
print(f"Blocked: {result.reason} (risk: {result.risk_score})")
Decorator Pattern
@covenant.govern("wire_transfer", extract={"amount": "amount"})
def send_wire(amount, recipient):
bank.transfer(amount, recipient)
send_wire(50000, "Acme Corp") # Checks Covenant first
Context Manager
with covenant.governance("deploy", {"service": "api", "env": "prod"}) as g:
if g.allowed:
deploy_service()
elif g.pending:
print("Awaiting approval...")
Configuration
covenant = CovenantClient(
base_url="http://localhost:8000", # API URL
agent_name="MyBot", # Auto-registers if needed
demo_mode=True, # Use demo endpoints (default)
raise_on_block=False, # Raise on block
timeout=10, # Request timeout (seconds)
)
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 covenant_ai_sdk-0.1.0.tar.gz.
File metadata
- Download URL: covenant_ai_sdk-0.1.0.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b3efb4891a36837bb4c2b4527c17d5e26444040b4429cc4ef88747c1014dc07
|
|
| MD5 |
fd888951f64bfef406cf940338dd78e0
|
|
| BLAKE2b-256 |
99fb91612ca6791bc419a858bfa0a2d3b173f716904e8067d621beb8c410a1bb
|
Provenance
The following attestation bundles were made for covenant_ai_sdk-0.1.0.tar.gz:
Publisher:
publish-python-sdk.yml on paulCOVski/covenant-platform-21626
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
covenant_ai_sdk-0.1.0.tar.gz -
Subject digest:
9b3efb4891a36837bb4c2b4527c17d5e26444040b4429cc4ef88747c1014dc07 - Sigstore transparency entry: 1207573765
- Sigstore integration time:
-
Permalink:
paulCOVski/covenant-platform-21626@487edbac2464edcaeebfc01a9d2a094adff9822c -
Branch / Tag:
refs/tags/python-sdk-v0.1.0 - Owner: https://github.com/paulCOVski
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@487edbac2464edcaeebfc01a9d2a094adff9822c -
Trigger Event:
push
-
Statement type:
File details
Details for the file covenant_ai_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: covenant_ai_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85cfb88e525f7857a99ca6770021c9c5aa832b3a30471d827989c6ccb201090a
|
|
| MD5 |
44389bf228da89e96c40f6f76ff178ff
|
|
| BLAKE2b-256 |
591508a54253b1b74caf87fd864561f067e59bb4e5e5acf40cbed68e4bee6d8b
|
Provenance
The following attestation bundles were made for covenant_ai_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on paulCOVski/covenant-platform-21626
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
covenant_ai_sdk-0.1.0-py3-none-any.whl -
Subject digest:
85cfb88e525f7857a99ca6770021c9c5aa832b3a30471d827989c6ccb201090a - Sigstore transparency entry: 1207573843
- Sigstore integration time:
-
Permalink:
paulCOVski/covenant-platform-21626@487edbac2464edcaeebfc01a9d2a094adff9822c -
Branch / Tag:
refs/tags/python-sdk-v0.1.0 - Owner: https://github.com/paulCOVski
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@487edbac2464edcaeebfc01a9d2a094adff9822c -
Trigger Event:
push
-
Statement type: