Skip to main content

Constitutional AI governance for clinical decision support — Agents Assemble hackathon

Project description

clinicalguard

PyPI Python License: AGPL-3.0

Constitutional AI governance for healthcare agents.

clinicalguard is a Starlette-based A2A service for validating proposed clinical actions against a healthcare constitution. It combines deterministic ACGS validation, healthcare-specific validators, JSON-RPC 2.0 endpoints, and audit-trail persistence.

Installation

clinicalguard supports Python 3.11+.

pip install acgs-lite clinicalguard
pip install clinicalguard[anthropic]
pip install clinicalguard[openai]

clinicalguard currently relies on acgs-lite at runtime; install it alongside the package when working from PyPI or source checkouts.

Quick Start

Run the Service

uvicorn clinicalguard.main:app --host 0.0.0.0 --port 8080

Validate a Clinical Action

curl -X POST http://localhost:8080/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tasks/send",
    "params": {
      "id": "task-001",
      "message": {
        "parts": [{
          "text": "validate_clinical_action: Patient SYNTH-042 on Warfarin. Propose Aspirin 325mg daily."
        }]
      }
    }
  }'

Build the App in Python

from clinicalguard.agent import ClinicalGuardApp

guard = ClinicalGuardApp.create(
    constitution_path="constitution/healthcare_v1.yaml",
    audit_log_path="audit.jsonl",
)
app = guard.build_starlette_app()

Key Features

  • Healthcare-focused constitutional validation with MACI-style self-approval blocking.
  • A2A skills for clinical validation, HIPAA checks, and audit-trail queries.
  • Starlette service surface with agent-card, health, and JSON-RPC endpoints.
  • Audit-log persistence and restoration for forensic review.
  • Optional Anthropic and OpenAI reasoning layers on top of deterministic checks.

Configuration

Variable Default Purpose
CLINICALGUARD_API_KEY unset Optional X-API-Key protection for request handling
CLINICALGUARD_URL unset Optional published service URL for agent-card metadata

License

AGPL-3.0-or-later. Commercial licensing is available; contact hello@acgs.ai.

Links

Constitutional Hash: 608508a9bd224290

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

clinicalguard-1.0.1.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

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

clinicalguard-1.0.1-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file clinicalguard-1.0.1.tar.gz.

File metadata

  • Download URL: clinicalguard-1.0.1.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clinicalguard-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b7c7ab89512fcea1d81dbc5b73247dd30aac37f87fd9d12fba341c6db234429d
MD5 38eca1cfd1fce465eeff4e14d5154264
BLAKE2b-256 1b3050aa8c353af1351a88ffafe9e02a8bd933023b155a0a11d9463071e8345a

See more details on using hashes here.

File details

Details for the file clinicalguard-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: clinicalguard-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clinicalguard-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c492533661f72a53cee8948f532ba679488d8959a08585c01da058c39d7186d
MD5 468a9a81b3ca9a247df7f14f2c926019
BLAKE2b-256 2b6dfe036e042bd14d560f86bd8396cf6537057d45c47641f1df535f913f2de5

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