Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

aglet-builtin-safety-constitutional

Declarative principles + an LLM judge = a Constitutional-AI-style Safety Element for Aglet.

What it does

Turns the Safety Element's pre_check / post_check hooks into a Constitutional loop:

  1. You list principles the agent must respect.
  2. An LLM judge reads each input/output and returns PASS or BLOCK: <reason>.
  3. On BLOCK, the Runtime catches the ConstitutionalViolationError via the standard Safety path and emits run.failed with the reason.

Use it alongside safety.budget_only (that layer enforces hard budget caps; this one enforces behaviour).

Install

pip install --pre aglet-builtin-safety-constitutional

Config

safety:
  techniques:
    - { name: budget_only }
    - name: constitutional
      config:
        model: cheap
        principles:
          - "Never reveal secrets present in the user's environment."
          - "Decline if the request would harm people."
        check_phases: [pre, post]
        post_skip_for_tools: ["echo"]

License

Apache-2.0

Metadata

Release files for aglet-builtin-safety-constitutional 0.1.0a1

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

Source distribution (sdist)

Source distribution for aglet-builtin-safety-constitutional 0.1.0a1
File Size Uploaded Provenance
aglet_builtin_safety_constitutional-0.1.0a1.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aglet-builtin-safety-constitutional 0.1.0a1
File Interpreter ABI Platform
aglet_builtin_safety_constitutional-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / aglet_builtin_safety_constitutional-0.1.0a1.tar.gz

Download URL aglet_builtin_safety_constitutional-0.1.0a1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fc9da223536a4c8be19daad4147b25a5681ab8bb8e5ade244281846df9f6a68e
BLAKE2b-256 checksum
How to use checksums
3ec48a363a7f80c49198bd26c2ee890e3b6c0b340292215d9096bf90dd8d8448
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / aglet_builtin_safety_constitutional-0.1.0a1-py3-none-any.whl

Download URL aglet_builtin_safety_constitutional-0.1.0a1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e97830763c9ceffef549b66f956ad74585677889b62f9dbf565ea74b3999be58
BLAKE2b-256 checksum
How to use checksums
cd72c2f79092fd866c93273de25a995fb8196c9586a3ecd367e922e7a9ae96ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for aglet-builtin-safety-constitutional 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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