Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covenant_ai_sdk-0.1.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

covenant_ai_sdk-0.1.0-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

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

Hashes for covenant_ai_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b3efb4891a36837bb4c2b4527c17d5e26444040b4429cc4ef88747c1014dc07
MD5 fd888951f64bfef406cf940338dd78e0
BLAKE2b-256 99fb91612ca6791bc419a858bfa0a2d3b173f716904e8067d621beb8c410a1bb

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file covenant_ai_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for covenant_ai_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85cfb88e525f7857a99ca6770021c9c5aa832b3a30471d827989c6ccb201090a
MD5 44389bf228da89e96c40f6f76ff178ff
BLAKE2b-256 591508a54253b1b74caf87fd864561f067e59bb4e5e5acf40cbed68e4bee6d8b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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