Skip to main content

Crate llmosafe

Crate llmosafe 

Source
Expand description

LLMOSAFE: A Safety-Critical AI Agent Library

This library provides the formal primitives for building safety-critical AI agents. It implements a 4-tier safety architecture:

  • Tier 0: Resource Body (Physical safety - requires std)
  • Tier 1: Deterministic Kernel (Formal Law)
  • Tier 2: Cognitive Working Memory (Stateful Safety)
  • Tier 3: Perceptual Sifter (Boundary Safety)

Re-exports§

pub use llmosafe_body::ResourceGuard;
pub use llmosafe_detection::DetectionResult;
pub use llmosafe_detection::AdversarialDetector;
pub use llmosafe_detection::ConfidenceTracker;
pub use llmosafe_detection::CusumDetector;
pub use llmosafe_detection::DriftDetector;
pub use llmosafe_detection::RepetitionDetector;
pub use llmosafe_integration::SafetyContext;
pub use llmosafe_integration::EscalationPolicy;
pub use llmosafe_integration::EscalationReason;
pub use llmosafe_integration::PressureLevel;
pub use llmosafe_integration::SafetyDecision;
pub use llmosafe_kernel::CognitiveEntropy;
pub use llmosafe_kernel::DynamicStabilityMonitor;
pub use llmosafe_kernel::KernelError;
pub use llmosafe_kernel::ReasoningLoop;
pub use llmosafe_kernel::SiftedSynapse;
pub use llmosafe_kernel::StabilityResult;
pub use llmosafe_kernel::Synapse;
pub use llmosafe_kernel::ValidatedSynapse;
pub use llmosafe_kernel::PRESSURE_THRESHOLD;
pub use llmosafe_kernel::STABILITY_THRESHOLD;
pub use llmosafe_memory::WorkingMemory;
pub use llmosafe_sifter::calculate_halo_signal;
pub use llmosafe_sifter::calculate_utility;
pub use llmosafe_sifter::get_bias_breakdown;
pub use llmosafe_sifter::sift_perceptions;

Modules§

llmosafe_body
llmosafe_body — Physical resource guard (the autonomic nervous system).
llmosafe_detection
LLMOSAFE Detection Layer - Pattern recognition for cognitive anomalies
llmosafe_integration
LLMOSAFE Integration Layer - Composition primitives for external systems
llmosafe_kernel
LLMOSAFE Tier 1 Cognitive Kernel Prototype
llmosafe_memory
LLMOSAFE Tier 2 Cognitive Working Memory
llmosafe_sifter
LLMOSAFE Tier 3 Perceptual Sifter (Rust Implementation)