Janus Sentinel Python SDK - Compliance & Policy Checks for AI Agents
Project description
Janus Sentinel SDK
Compliance & policy checks for AI agents. Perform pre-action checks, approvals, and post-action reporting with minimal code.
Installation
pip install janus-sdk
Quickstart (sync)
from janus import JanusClient
client = JanusClient(tenant_id="your_tenant_id", api_key="janus_xyz", fail_open=False)
decision = client.check(
action="payment.process",
params={"amount": 5000, "currency": "USD"},
agent_id="payment-bot-01",
)
if decision.allowed:
process_payment(...)
client.report(decision, status="success", result={"transaction_id": "tx_123"}, action="payment.process", agent_id="payment-bot-01")
elif decision.requires_approval:
print(f"Approval required: {decision.reason}")
else:
print(f"Action denied: {decision.reason}")
Decorators
from janus import JanusClient, janus_guard
client = JanusClient(tenant_id="acme", api_key="janus_xxx")
@janus_guard(client, action="email.send", agent_id="email-bot")
def send_email(to, subject, body):
return mailer.send(to, subject, body)
Async
from janus import AsyncJanusClient
async def main():
async with AsyncJanusClient(tenant_id="acme", api_key="janus_xxx") as client:
res = await client.check("database.drop", params={"table": "users"})
if res.allowed:
await client.report(res, status="success", action="database.drop", agent_id="ops-bot")
Docs
- Quickstart & SDK reference live in
docs/janus/(quickstart, sdk/, policies/, compliance/, operations/, api/*).\n- Start withdocs/janus/quickstart.mdfor a 5-minute setup.\n
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
janus_sdk-0.4.0.tar.gz
(12.4 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
janus_sdk-0.4.0-py3-none-any.whl
(14.1 kB
view details)
File details
Details for the file janus_sdk-0.4.0.tar.gz.
File metadata
- Download URL: janus_sdk-0.4.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d66a08ff26a5478486bad1d0064c4e136a1cb4ad38bd74646f313a5ce8b15f9
|
|
| MD5 |
db7c653b4fa1133afa87131821ad0082
|
|
| BLAKE2b-256 |
840698e4ca074fa8fe8bfa6c0f6c05254d2613589c03a46f205335edef455a09
|
File details
Details for the file janus_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: janus_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5046e5ed94d321afa53210c8fa85432aab46e22ed4df02eaf176a25657b811
|
|
| MD5 |
93590e65b5a4bccb8fcfbaeb651ae09b
|
|
| BLAKE2b-256 |
885cc3fa977bf394d7a615d4e79d134596f14e2a459f169874cf626882c4f827
|