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.5.0.tar.gz
(15.5 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.5.0-py3-none-any.whl
(17.1 kB
view details)
File details
Details for the file janus_sdk-0.5.0.tar.gz.
File metadata
- Download URL: janus_sdk-0.5.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
142538a56762594b0b2fccd56be6e1125a3ef3f767ae1b1dde461e96e49317b8
|
|
| MD5 |
a0a72f395435b904d1b24e9200bfded7
|
|
| BLAKE2b-256 |
9e9d6060dad36c63bf8cf34b74d3a2f7549ed3981f09533726d727a03d1fb3b4
|
File details
Details for the file janus_sdk-0.5.0-py3-none-any.whl.
File metadata
- Download URL: janus_sdk-0.5.0-py3-none-any.whl
- Upload date:
- Size: 17.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 |
db6c2fc4371cc4d6de71a516f1f7be56e41de3ae65d44c32d6554ebf245fc62e
|
|
| MD5 |
3388b694c3bc7740edfd1e87a08015ea
|
|
| BLAKE2b-256 |
3f5fc4ceac213fda15912a63b563334273b8c027a989d435442d8d0eaa2f4fea
|