Skip to main content

The control point for software that can act. Observe, enforce, and audit every action.

Project description

hiitl — Python SDK

The control point for AI agents. Python SDK with embedded policy evaluator.

Install

pip install hiitl

Quick start

from hiitl import HIITL

# Zero config — observe everything, block nothing
hiitl = HIITL()

decision = hiitl.evaluate("send_email", parameters={
    "to": "user@example.com",
    "subject": "Order update",
})

if decision.allowed:
    send_email(...)

With policy enforcement

hiitl = HIITL(
    agent_id="payment-agent",
    policy_path="./policy.yaml",
    mode="RESPECT_POLICY",
)

decision = hiitl.evaluate("process_payment", parameters={
    "amount": 5000.00,
    "currency": "USD",
})

if decision.allowed:
    process_payment(...)
elif decision.needs_approval:
    queue_for_review(decision)
elif decision.blocked:
    log_blocked(decision)

Hosted mode

hiitl = HIITL(
    agent_id="payment-agent",
    org_id="org_yourcompany1234567",
    api_key="sk_live_...",
    server_url="https://ecp.hiitl.com",
    environment="prod",
    mode="RESPECT_POLICY",
)

# Same evaluate() call, same Decision object
decision = hiitl.evaluate("process_payment", parameters={"amount": 500})

API

HIITL(**kwargs)

All parameters are keyword-only with defaults. HIITL() works with no arguments.

Parameter Default Description
agent_id "default" Agent identifier
environment "dev" dev, stage, or prod
mode "OBSERVE_ALL" OBSERVE_ALL or RESPECT_POLICY
policy_path None Path to policy file (YAML or JSON)
audit_db_path "./hiitl_audit.db" SQLite audit log path
api_key None API key for hosted mode
server_url None Server URL for hosted mode

hiitl.evaluate(action, **kwargs) -> Decision

Parameter Required Description
action Yes Action name (e.g., "send_email")
parameters No Action parameters dict
target No Target resource dict
operation No Operation type (default: "execute")
user_id No User identifier
sensitivity No Sensitivity labels

Decision

Property Type Description
.allowed bool Can the action proceed?
.decision str Decision type (ALLOW, BLOCK, etc.)
.reason_codes list[str] Why this decision was made
.policy_version str Policy version used
.ok bool Alias for .allowed
.blocked bool True if BLOCK
.needs_approval bool True if REQUIRE_APPROVAL
.observed bool True if OBSERVE mode
.would_be str What enforce mode would do (OBSERVE only)

Requirements

  • Python 3.12+

Documentation

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

hiitl-0.1.0.tar.gz (119.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hiitl-0.1.0-py3-none-any.whl (140.7 kB view details)

Uploaded Python 3

File details

Details for the file hiitl-0.1.0.tar.gz.

File metadata

  • Download URL: hiitl-0.1.0.tar.gz
  • Upload date:
  • Size: 119.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for hiitl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a485b8e1344fd644c8d5ab2402a687bbd26056727528fa77a168916be3f6253b
MD5 9d52e371ffb9cf27372dd58ee1e22bed
BLAKE2b-256 cd2745e49d84f6cafab681d24b1b290c5b19355164bfc79b965e3ce135dfb4e7

See more details on using hashes here.

File details

Details for the file hiitl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hiitl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 140.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for hiitl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7f00329b41b75f2de4d4fedd61ca2d260b482728da0480501f2c9b79eed8b01
MD5 7ae5d7d59766c812a5c5ca683ca271f5
BLAKE2b-256 d6eec7fbc7b521437b595a30875cf3f477e82219b9e2f976c5113a4af91bebc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page