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.12 — 完整说明见 DOCS.md(宪法树、MCP、§10 执法收口、§11 产物验收、§12 可信执行内核 P7)。
任意模型 → airoles(宪法 + 司法)→ 你的实践层(执法)
Project details
Release history Release notifications | RSS feed
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.20.tar.gz
(174.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
airoles-0.9.20-py3-none-any.whl
(198.5 kB
view details)
File details
Details for the file airoles-0.9.20.tar.gz.
File metadata
- Download URL: airoles-0.9.20.tar.gz
- Upload date:
- Size: 174.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fa92bbeef389a1b48df64af9d781c82f9df04ee2ba10cb7689513e1abc9e8b9
|
|
| MD5 |
5850736e7f8433170501c314f7b64bce
|
|
| BLAKE2b-256 |
a9964eae481ca1626129aab67a5b1911f458addcba4997f3ada81875615c1d57
|
File details
Details for the file airoles-0.9.20-py3-none-any.whl.
File metadata
- Download URL: airoles-0.9.20-py3-none-any.whl
- Upload date:
- Size: 198.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff4b7f0799a4f1171801b27472a4828385c858ac41b3a030b036a97eeeb62e64
|
|
| MD5 |
4e2f2f650b4a02b8f7b747ef0242539e
|
|
| BLAKE2b-256 |
61a6d4bfda72c754248b6e1611beca14e22f81215b0616c6a927573bdfa6c57b
|