Skip to main content

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

Metadata

Release files for clinicalguard 1.0.1

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

Source distribution (sdist)

Source distribution for clinicalguard 1.0.1
File Size Uploaded Provenance Actions
clinicalguard-1.0.1.tar.gz 34.4 kB Without provenance Details for clinicalguard-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clinicalguard 1.0.1
File Interpreter ABI Platform Actions
clinicalguard-1.0.1-py3-none-any.whl Python 3 none any Details for clinicalguard-1.0.1-py3-none-any.whl

Total release size: 59.3 kB

Release files / clinicalguard-1.0.1.tar.gz

Download URL clinicalguard-1.0.1.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b7c7ab89512fcea1d81dbc5b73247dd30aac37f87fd9d12fba341c6db234429d
BLAKE2b-256 checksum
How to use checksums
1b3050aa8c353af1351a88ffafe9e02a8bd933023b155a0a11d9463071e8345a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / clinicalguard-1.0.1-py3-none-any.whl

Download URL clinicalguard-1.0.1-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c492533661f72a53cee8948f532ba679488d8959a08585c01da058c39d7186d
BLAKE2b-256 checksum
How to use checksums
2b6dfe036e042bd14d560f86bd8396cf6537057d45c47641f1df535f913f2de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for clinicalguard 1.0.1

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

1.0.1 This release

2 release files No provenance

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