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://ledger-sdk.fly.dev",
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://ledger-sdk.fly.dev") as client:
result = await client.execute(action="db.write", resource="users")
Dashboard
Monitor all agent activity, approve requests, and manage policies at: https://casss20-ledger-sdk-6nlu.vercel.app
License
MIT
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 citadel_governance-0.2.0.tar.gz.
File metadata
- Download URL: citadel_governance-0.2.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36167a9ca46e18f51d0038e27e2ea36511c1b349546ab1abf1bc587456feb43a
|
|
| MD5 |
b3ff36b62c674100e42cf1cd9dbaa017
|
|
| BLAKE2b-256 |
47049b2d292af6bd64640b8517be98c68a077e12fe3954a7319bc9145f8f4483
|
File details
Details for the file citadel_governance-0.2.0-py3-none-any.whl.
File metadata
- Download URL: citadel_governance-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db47dea218fe92b8a83f66ec7b43a9b7803f5dd9ea7e7039f9b16abb854925d
|
|
| MD5 |
8e76a4cd56e06d235b7a15712934c99a
|
|
| BLAKE2b-256 |
b6a5871bd344c7ab3aa96abddb2d59fd891a50f645894635267ce4b65a77a599
|