Framework Integrations
Connect existing AI stacks without rebuilding them
The current repo implements native verification surfaces for PyTorch, TensorFlow, Hugging Face, LangChain, FastAPI, Next.js, Docker delivery templates, and Kubernetes Helm deployment profiles. Each surface follows the same envelope contract so teams can attach proof capture without forking application logic.
Wrap torch.nn.Module-style callables and emit verification envelopes on forward calls without changing the caller contract.
Entry Point
wrap_pytorch_model(model, recorder=..., component_name=...)
Typical Use
Batch inference services, scoring pipelines, and GPU-backed model endpoints that need deterministic output hashing and metadata capture.
VerificationRecorder
Model Wrapper
Output Hashing
Keras Callback
TensorFlow
Attach verification to Keras-compatible training and prediction flows through a callback factory that degrades safely when TensorFlow is unavailable.
Entry Point
create_keras_callback(recorder=..., capture_batch_events=...)
Typical Use
Training pipelines, evaluation jobs, and epoch-level audit trails for TensorFlow or Keras workloads.
Keras
Callback Factory
Epoch Events
Pipeline Runtime
Hugging Face
Use wrap_transformers_pipeline to preserve the standard transformers pipeline interface while attaching proof capture and component-level identity.
Entry Point
wrap_transformers_pipeline(pipeline, recorder=..., component_name=...)
Typical Use
Classification, moderation, and generation services built on transformers.pipeline with verified metadata capture.
Pipeline Wrapper
Component Identity
Verified Inference
Wrap chains and runnables so invoke, ainvoke, batch, and abatch all emit proof-aware telemetry.
Entry Point
wrap_langchain_runnable(runnable, recorder=..., component_name=...)
Typical Use
RAG pipelines, chain orchestration, and agent backends that need trace metadata attached to verified execution flows.
Runnable Wrapper
Trace Metadata
Batch Support
Emit Aethelred verification headers from ASGI responses and record request and response envelopes in the middleware path.
Entry Point
app.add_middleware(AethelredVerificationMiddleware, recorder=...)
Typical Use
Verification APIs, Python inference gateways, and service layers that need proof headers on every response.
ASGI
Response Headers
Envelope Capture
Wrap Pages Router handlers and App Router route handlers so responses ship with verification metadata without custom response plumbing.
Entry Point
withAethelredApiRoute(handler, options?)
withAethelredRouteHandler(handler, options?)
Typical Use
TypeScript API routes, serverless handlers, and application endpoints that need verification headers and response hashing.
Pages Router
App Router
Verification Headers
Delivery Templates
Docker
Use the official image templates and compose stacks to package FastAPI and Next.js verification surfaces into reproducible runtime environments.
Entry Point
docker build -f integrations/deploy/docker/Dockerfile.fastapi-verifier ...
docker compose -f integrations/deploy/docker/docker-compose.verification-stack.yml up --build
Typical Use
Local stacks, CI smoke environments, and reproducible integration testing for verification-aware services.
Image Templates
Compose Stack
Local Devnet
Helm Deployment
Kubernetes
Deploy verification gateways through the Helm chart that packages app containers, config, service objects, ingress, HPA, and an optional verifier sidecar.
Entry Point
helm upgrade --install verifier-fastapi deploy/helm/aethelred-verification-gateway -f deploy/helm/aethelred-verification-gateway/values/fastapi.yaml
helm upgrade --install verifier-nextjs deploy/helm/aethelred-verification-gateway -f deploy/helm/aethelred-verification-gateway/values/nextjs.yaml
Typical Use
Clustered API deployments, autoscaled verification gateways, and platform-managed rollout environments.
Helm Chart
Ingress
Optional Sidecar
from aethelred.integrations import (
AethelredVerificationMiddleware,
VerificationRecorder,
create_keras_callback,
wrap_langchain_runnable,
wrap_pytorch_model,
wrap_transformers_pipeline,
)
recorder = VerificationRecorder()
keras_callback = create_keras_callback(recorder=recorder)