Skip to main content

AI Constitution layer — model-agnostic Role/Policy, audit, and CRUD disclosure for any executor

Project description

airoles

AI 宪法树 · 按需走枝 — 每步只加载该环节的 Policy 枝条;司法在本包,执法在集成方。

pip install airoles
export AIROLES_API_KEY=sk-...
export AIROLES_BASE_URL=https://api.deepseek.com/v1
export AIROLES_MODEL=deepseek-chat
from airoles import ConstitutionClient

client = ConstitutionClient.from_env()
result = client.plan("分析销售数据并给出可执行方案")
print(result.client_crud_notice)
if not result.audit.ok:
    print(result.audit.violations)

record = client.issue_confirm(result.plan, confirmed_by="user-id")
contract = client.build_contract(result.plan, confirm=record)
client.execute(contract, step_runner=your_handler)  # 见 DOCS §5

无 API Key 仅审计划:airoles-audit path/to/plan.json

当前版本 0.9.1 — 完整说明见 DOCS.md(宪法树、MCP、§10 执法收口、§11 产物验收、§12 可信执行内核 P7)。

任意模型 → airoles(宪法 + 司法)→ 你的实践层(执法)

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

airoles-0.9.1.tar.gz (129.4 kB view details)

Uploaded Source

Built Distribution

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

airoles-0.9.1-py3-none-any.whl (167.5 kB view details)

Uploaded Python 3

File details

Details for the file airoles-0.9.1.tar.gz.

File metadata

  • Download URL: airoles-0.9.1.tar.gz
  • Upload date:
  • Size: 129.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for airoles-0.9.1.tar.gz
Algorithm Hash digest
SHA256 ff742bbf9ae34bd66c16b6d8e2b4e7ea99f32a2b8802b6db89b80654d1ebe7bd
MD5 2d3a5dc4e778d45067663aeeea2d2dbf
BLAKE2b-256 eb11d83a56c8f27bf4bc3cf3939eaa5b9274eed7e885243f655eed0bff4c85b4

See more details on using hashes here.

File details

Details for the file airoles-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: airoles-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 167.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for airoles-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56c0af338d1e8950c567c2f9e624f2b293529c977c2e01d081e43ffed68d0cd9
MD5 3a811c81265c4aba4baa127d2f430d2e
BLAKE2b-256 75d99fea410a84f91c11a214577f67827a9c9ba84d3ff9f9695574d45fe1b910

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