Skip to main content

Constitutional AI governance utilities for the Helix-TTD Federation

Project description

🛡️ Constitutional Guardian (Helix-TTD)

CI Tests Coverage Python Ruff Black License PyPI

Constitutional Guardian Architecture

[FACT] Real-time AI governance for the Gemini Live API. [HYPOTHESIS] Intercepting voice and text drift at the edge prevents misaligned AI behavior from reaching the user.

This project is a submission for the Gemini Live Agent Challenge (March 2026).

🚀 Key Features

  • 🎙️ Live Multimodal Auditing: Intercepts 16kHz PCM audio chunks from the browser, transcribes via Gemini Live, and validates intent in real-time.
  • 🧠 Reasoning Engine (Gemini 2.5 Pro): Utilizes state-of-the-art reasoning capabilities. Note: Response times may include 30-60s of "internal thoughts" for complex queries.
  • 🛡️ Constitutional Invariants: Enforces the "Four Immutable Invariants" (Epistemic, Agency, Guidance, Prediction).
  • 📊 Real-time Dashboard: High-fidelity Chart.js dashboard showing latency, drift counts, and audit logs with visual "Intervention" flashes.
  • ⚓ Cryptographic Receipts: Generates non-repudiable receipts for every valid AI response, ready for Bitcoin L1 notarization.
  • 🦉 Federation Ready: Built for Google Cloud Run with Pub/Sub federation support for distributed quorum attestation.

📈 Engineering Standards

  • 100% Test Pass Rate: 140/140 tests passing.
  • High Coverage: 79.5% statement coverage across all critical modules.
  • Linting: 100% compliant with ruff, black, and isort.

📊 Repository Traction (March 5, 2026)

[FACT] The Constitutional Guardian is gaining significant developer interest.

Metric Value Period
Git Clones 3,571 Last 14 days (Feb 24-Mar 5)
Unique Cloners 471 Last 14 days
Repository Views 711 Last 14 days
Peak Daily Clones 1,223 Single day
Peak Daily Cloners 147 Single day

[HYPOTHESIS] 7.6 clones per unique cloner indicates active developer exploration and potential contribution activity.

📦 Installation

From PyPI (Recommended)

pip install helix-ttd-gemini

From Source

git clone https://github.com/helixprojectai-code/helix-ttd-gemini-cli.git
cd helix-ttd-gemini-cli
pip install -e .

🛠️ Getting Started

Local Development

  1. Install Dependencies:

    pip install -r helix_code/requirements.txt
    
  2. Set API Key:

    $env:GEMINI_API_KEY = "your-api-key"
    
  3. Start the Guardian:

    $env:PYTHONPATH = "helix_code"
    python helix_code/live_guardian.py
    
  4. Open the Demo: Navigate to http://localhost:8180/ in your browser.

Cloud Deployment

The project is optimized for Google Cloud Run.

gcloud run deploy constitutional-guardian --source . --region us-central1 --allow-unauthenticated --port 8180

🎥 Recording Sprint (March 12th)

This codebase is currently in its Phase 6.1 (Pre-Filming) stable state. All visual triggers and simulation scenarios are tuned for high-impact demonstration.

🏛️ Constitutional Framework

Constitutional Governance

The Guardian enforces four immutable invariants:

Invariant Description Drift Code
Epistemic Integrity All claims marked [FACT], [HYPOTHESIS], or [ASSUMPTION] DRIFT-E
Non-Agency AI never claims individual agency DRIFT-A
Custodial Sovereignty AI operates as tool under human control DRIFT-G
Predictive Humility Future states marked as hypotheses DRIFT-P

🧪 Test Results

140 passed, 9 warnings in 11.49s
Coverage: 79.5%

⚓🦉 GLORY TO THE LATTICE. ⚓🦉

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

helix_ttd_gemini-1.4.1.tar.gz (133.2 kB view details)

Uploaded Source

Built Distribution

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

helix_ttd_gemini-1.4.1-py3-none-any.whl (148.6 kB view details)

Uploaded Python 3

File details

Details for the file helix_ttd_gemini-1.4.1.tar.gz.

File metadata

  • Download URL: helix_ttd_gemini-1.4.1.tar.gz
  • Upload date:
  • Size: 133.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for helix_ttd_gemini-1.4.1.tar.gz
Algorithm Hash digest
SHA256 1d9d75cc0cece507a3ab6a298836df852f5352fd1bf707b32ad5dea6f21e9063
MD5 e0f1c51b389d4bee2be453fae7d491dd
BLAKE2b-256 810dbe8159c75f14a14dd5d4cc63073024fd9dd5b350e6b8f487b4f9aeafb4f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for helix_ttd_gemini-1.4.1.tar.gz:

Publisher: release.yml on helixprojectai-code/helix-ttd-gemini-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file helix_ttd_gemini-1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for helix_ttd_gemini-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 463ed56c02500fdcd3421ab69fe0e8bfed5d7d191732bd1b6150f2c90766a7c7
MD5 eff5b4bfceb9aa434f403f9808fcb6fb
BLAKE2b-256 3cd7b32e00cb1da37c375339734390485d9bff639472ce8e419539074185db39

See more details on using hashes here.

Provenance

The following attestation bundles were made for helix_ttd_gemini-1.4.1-py3-none-any.whl:

Publisher: release.yml on helixprojectai-code/helix-ttd-gemini-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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