instinct-ai 0.2.0

Universal Machine-Native System-1 AI Instinct Runtime for Rust & WebAssembly
Documentation
  • Coverage
  • 30.28%
    33 out of 109 items documented0 out of 56 items with examples
  • Size
  • Source code size: 58.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • bhavikprit/instinct-ai
    4 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bhavikprit

🦀 Instinct Rust SDK (instinct-ai / reflex-rs)

High-Performance System-1 AI Decision Runtime & Dual-Brain Gateway

Make decisions, not strings. Pure Rust, zero external dependencies.

License Dependencies Speed


⚡ Features

  • Zero External Dependencies: Standard library only. No C compilers, OpenSSL, or heavy frameworks required.
  • Microsecond Latency:
    • Noul boolean decision: 12.6 µs
    • Dense vector encoding (384-d): 11.7 µs
    • Instant guardrails: 0.2 µs
    • Peak throughput: 79,000+ ops/sec
  • 100% Mathematical Parity: Bit-for-bit identical vector embeddings and decision calibrations with Python instinct-ai and JavaScript instinct-ai.
  • WASM & Edge Compatible: Compiles cleanly to wasm32-unknown-unknown and wasm32-wasi.

🚀 Quickstart

Add instinct-ai to your Cargo.toml:

[dependencies]
instinct-ai = "0.2.0"

or via CLI:

cargo add instinct-ai

Usage

use reflex_rs::{Instinct, Reflex};

fn main() {
    let ins = Instinct::new();
    let state = "Customer: I was billed twice on my invoice today. Refund immediately!";

    // 1. Noul Boolean Decision (<15µs)
    let noul = ins.noul("Is the customer demanding a refund?", state);
    if noul.is_true {
        println!("Refund requested! (Confidence: {:.2})", noul.confidence);
    }

    // 2. Choice Rubric Selection (<15µs)
    let choice = ins.choice(
        "Route ticket to department",
        vec!["billing".into(), "support".into(), "sales".into()],
        state,
    );
    println!("Selected queue: {}", choice.selected);

    // 3. Instant Guardrails (<1µs)
    let guard = ins.guardrail(state);
    assert!(guard.is_safe);
}

🧪 Testing & Verification

cargo test
cargo run --example quickstart
cargo run --example bench --release 5000