Skip to main content

coreason-enclave

License: Prosperity 3.0 CI Status Code Style: Ruff Documentation

Privacy-Preserving Compute Layer for Federated Learning

coreason-enclave is the "Embassy" / Secure Compute Wrapper of the CoReason AI ecosystem. It acts as the privacy-preserving compute layer, allowing orchestration of training jobs across distributed nodes (e.g., multiple hospitals or partner pharma companies) without accessing their raw data. It combines Federated Learning, Confidential Computing (TEEs), and Differential Privacy to ensure a mathematical guarantee of privacy.

Core Philosophy: "Move the Model to the Data. Never move the Data. Encrypt the RAM."


🚀 Features

  • Federated Learning (FL): Orchestrate training across distributed nodes using NVIDIA FLARE. Only weight updates (gradients) are shared, never raw data. Supports FedAvg, FedProx, and SCAFFOLD strategies.
  • Confidential Computing: Designed to run inside hardware-encrypted Trusted Execution Environments (TEEs) (e.g., NVIDIA H100 Confidential Compute, Intel SGX). This ensures memory is encrypted at the CPU level, protecting against cloud provider inspection. Includes Remote Attestation to cryptographically prove code integrity.
  • Differential Privacy (DP): Integrated with Opacus to inject Gaussian noise into gradients, strictly enforcing a privacy budget ($\epsilon$).
  • The "Sightless" Surgeon: The AI learns from data it never "sees."
  • Data Sentry: An "Airlock" mechanism that validates input data and strictly sanitizes output, ensuring no sensitive information leaks via logs or return payloads.

🛠️ Installation

pip install coreason-enclave

💻 Usage

The coreason-enclave agent typically runs as a service managed by an orchestrator, but can be invoked directly or integrated into custom workflows.

Basic Initialization

from coreason_enclave.federation.executor import CoreasonExecutor
from coreason_enclave.schemas import FederationJob

# Initialize the Executor
executor = CoreasonExecutor(
    training_task_name="train",
    aggregation_task_name="aggregate"
)

# Note: In production, this is handled automatically by the NVFlare runtime.
# The executor listens for tasks from the Federation Overseer.

Running the Agent (CLI)

To start the agent as a standalone client connecting to a federation:

# Secure Mode (Requires TEE Hardware)
python -m coreason_enclave.main \
    --workspace /tmp/workspace \
    --conf config/client_config.json

# Simulation Mode (For Development/Testing)
python -m coreason_enclave.main \
    --workspace /tmp/workspace \
    --conf config/client_config.json \
    --simulation

For more detailed requirements and architecture, please refer to the Product Requirements Document.

📜 License

This project is licensed under the Prosperity Public License 3.0. See the LICENSE file for details.

Metadata

Release files for coreason-enclave 0.2.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 coreason-enclave 0.2.1
File Size Uploaded
coreason_enclave-0.2.1.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coreason-enclave 0.2.1
File Interpreter ABI Platform
coreason_enclave-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.7 kB

Release files / coreason_enclave-0.2.1.tar.gz

Download URL coreason_enclave-0.2.1.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c00dc11b2e7d07a6773fae796581981359d7ae49b7fd93af95f9d2065f04a56b
BLAKE2b-256 checksum
How to use checksums
ffcb13635a959d5f84d6b173902c9b6f02044d90c2afd48956e2f298dd574a03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Release files / coreason_enclave-0.2.1-py3-none-any.whl

Download URL coreason_enclave-0.2.1-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ee12ae84903bb1e1e0f930e595a5c97b40d5adcf43ae2e8871d6125460b8110
BLAKE2b-256 checksum
How to use checksums
43187ecbe2127bf512e35e1d5ef7fed553afd29b7a8974e5c061f089f8538682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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