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.3.0.tar.gz
(11.7 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.3.0-py3-none-any.whl
(12.9 kB
view details)
File details
Details for the file janus_sdk-0.3.0.tar.gz.
File metadata
- Download URL: janus_sdk-0.3.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f81d7590940b988058f291171df4685bf5dc4f56aa034b4506d6e75333dc1b5
|
|
| MD5 |
00f5341da10384d8b0c9b64d878e4b37
|
|
| BLAKE2b-256 |
b8a40e72709d8278f9d86461a774d5ad5fda2fbe88b36854f6d90782aaebdcfb
|
File details
Details for the file janus_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: janus_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 12.9 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 |
74ecf07fd9a7ab331aefef70960615931afc748428cd7a4bbeb54336c48cfd08
|
|
| MD5 |
8657fbf34c8d6f56800bd34995a9f332
|
|
| BLAKE2b-256 |
653f048ad2159bf23add17f75ad362b51c6ddf92dc1045b7eaa7e8db6d376919
|