Python SDK
pip install kaizen-security
The SDK is dependency-free and stdlib-only.
Initialize
from kaizen_security import Kaizen
kz = Kaizen(api_key="kz_live_...", agent="support-bot")
Policy is managed in the console and synced to the client. Without an API key the client still enforces any policies you pass locally.
Inspect
verdict = kz.inspect(tool="export_file", publisher="external", target="45.9.148.108")
verdict.blocked # True / False
verdict.reason # human-readable
verdict.evidence # what matched
Guard a tool
@kz.guard(tool="send_email")
def send_email(to, body):
...
A blocked call raises KaizenBlocked.
Define policy in code
from kaizen_security import Kaizen, Policy
kz = Kaizen(policies=[
Policy(mode="blocklist", rules={"skill_patterns": ["delete_.*"], "ip": ["45.9.148.0/24"]}),
])
Modes are blocklist, allowlist, and correlation.