Skip to main content

Janus Sentinel SDK

PyPI

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 with docs/janus/quickstart.md for a 5-minute setup.\n

License

MIT

Release files for janus-sdk 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for janus-sdk 0.5.0
File Size Uploaded
janus_sdk-0.5.0.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for janus-sdk 0.5.0
File Interpreter ABI Platform
janus_sdk-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / janus_sdk-0.5.0.tar.gz

Download URL janus_sdk-0.5.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
142538a56762594b0b2fccd56be6e1125a3ef3f767ae1b1dde461e96e49317b8
BLAKE2b-256 checksum
How to use checksums
9e9d6060dad36c63bf8cf34b74d3a2f7549ed3981f09533726d727a03d1fb3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / janus_sdk-0.5.0-py3-none-any.whl

Download URL janus_sdk-0.5.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db6c2fc4371cc4d6de71a516f1f7be56e41de3ae65d44c32d6554ebf245fc62e
BLAKE2b-256 checksum
How to use checksums
3f5fc4ceac213fda15912a63b563334273b8c027a989d435442d8d0eaa2f4fea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page