Skip to main content

AI Governance: Constitution + Audit for Agent Builders

Project description

Citadel Governance SDK for Python

AI governance for agent builders — one primitive to control, audit, and approve every action your agents take.

Installation

pip install citadel-governance

Quickstart (recommended import)

import citadel_governance as cg

cg.configure(
    base_url="https://api.citadelsdk.com",
    api_key="your-api-key",
    actor_id="my-agent",
)

result = await cg.execute(
    action="email.send",
    resource="user:123",
    payload={"to": "user@example.com", "subject": "Hello"},
)

if result.status == "executed":
    print("Sent!")
elif result.status == "pending_approval":
    print("Waiting for human review")
else:
    print(f"Blocked: {result.reason}")

Legacy import (deprecated)

import citadel  # deprecated — will be removed in v1.0

The citadel import path is kept for backward compatibility but emits a DeprecationWarning. Please migrate to citadel_governance.

Decorator

import citadel_governance as cg

cg.configure(...)

@cg.guard(action="stripe.refund", resource="charge:{charge_id}")
async def refund(charge_id: str, amount: int):
    return stripe.refund.create(charge=charge_id, amount=amount)

Context manager

async with cg.CitadelClient(base_url="https://api.citadelsdk.com") as client:
    result = await client.execute(action="db.write", resource="users")

Dashboard

Monitor all agent activity, approve requests, and manage policies at: https://dashboard.citadelsdk.com

Links

Testing & Certification

This package is validated before every release. See the QA Gate Evidence document for:

  • Build artifact verification (wheel + sdist)
  • Packaging compliance (twine check)
  • Fresh-environment installation tests
  • Import-path and backward-compatibility checks
  • Smoke tests (happy path + failure path)
  • Integration tests against realistic HTTP endpoints
  • PyPI live-install verification
  • Full unit test suite results

License

MIT

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

citadel_governance-0.2.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

citadel_governance-0.2.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file citadel_governance-0.2.1.tar.gz.

File metadata

  • Download URL: citadel_governance-0.2.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for citadel_governance-0.2.1.tar.gz
Algorithm Hash digest
SHA256 22c8bc8054a5d89b10352644b9915683509d0309a881d5e299b68e376c360364
MD5 552644d36230f96b201f733a5b15e076
BLAKE2b-256 1ec49188576f833713b1a396591591829717255c22a7955f4339f4ef8ef62baa

See more details on using hashes here.

File details

Details for the file citadel_governance-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for citadel_governance-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28379e9bf45b86fec23ea09c508bcb60235ae8e08e7bbdaa6349d6617547ccd6
MD5 d5f1329a7a7c149024ae93ec5e17802f
BLAKE2b-256 eb02ffc807cf0bbc3051f27e6046eccc73a135e2fcfb88740d4d0b77deec5fe9

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