tpt-intellect

Rust

Rust-native structured intelligence primitive: typed, deterministic decisions (classify, rank, score, predict, compare) without natural-language generation or vendor lock-in.

0 stars0 forks0 watchersApache License 2.0

Languages

Rust100.0%
README

tpt-intellect

Structured Intelligence Primitive for High-Performance Software.

tpt-intellect is a Rust-native structured intelligence runtime designed to make probabilistic intelligence a first-class computational primitive:

structured state
    ↓
intelligence primitive
    ↓
typed probabilistic result
    ↓
deterministic application logic

Instead of prompting a generative model and parsing text back out, an application asks a typed question — classify, choose, rank, score, estimate, predict, compare — over structured input, and gets back a typed Decision<T> it can match on directly. The full design is in spec.txt; phased implementation progress is tracked in todo.md.

tpt-intellect is not a chatbot, an LLM replacement, an agent framework, or tied to any specific model vendor. See spec.txt §4 for the full list of non-goals.

Status

Foundational / experimental, pre-0.1.0. Phases 0–19 are complete: repository foundation, core request/response/decision types, the intelligence cache (canonical request identity, deterministic keys, bounded in-memory memoisation with TTL, optional persistence), the backend architecture (IntelligenceBackend contract, capability vocabulary, selection, conformance suite), the first working backend — a deterministic reference backend demonstrating the full request → inference → typed-result pipeline — parallel intelligence (request batching, compatible-request grouping, scoped-thread parallel dispatch with per-request failure isolation), and candidate reduction (provenance-tracking candidate sets, deterministic filters, top-K and constraint-based reduction, backend-driven scoring, staged pipelines). Criterion benchmark suites cover all of it (docs/BENCHMARKS.md). See todo.md for what's next.

Workspace layout

Every crate carries the tpt-intellect- prefix, has its own README and changelog, and is published independently so you can depend on just the slice you need.

CratePurpose
tpt-intellectUmbrella crate re-exporting the public prelude
tpt-intellect-coreIntelligenceRequest / IntelligenceResponse / Decision<T> and validated probabilities
tpt-intellect-cacheCanonical request identity and deterministic-key decision cache
tpt-intellect-backendBackend contract, conformance suite, deterministic reference backend
tpt-intellect-batchRequest batches, compatible-request grouping, parallel dispatch
tpt-intellect-reduceProvenance-tracking candidate sets, filtering, top-K, staged reduction
tpt-intellect-policyPolicies, escalation cascades, information-gain gating, budgets
tpt-intellect-ensembleEnsemble backends and pluggable combination strategies
tpt-intellect-remoteRemote protocol, transports, adapters, Jev reference
tpt-intellect-specialistSpecialist metadata, calibration, evaluation gating
tpt-intellect-streamBounded streaming intelligence with backpressure
tpt-intellect-provenanceDecision provenance, confidence semantics, replay digests
tpt-intellect-irIntelligence IR: plan, validate, optimise, execute
tpt-intellect-guardsRequest limits, validation, timeouts, fuzz targets
tpt-intellect-verifyReplay verification, proof bundles, attestation
tpt-intellect-test-supportInternal allocation-counting test helpers (unpublished)

Try the end-to-end pipeline:

cargo run -p tpt-intellect-backend --example reference_pipeline
cargo run -p tpt-intellect-remote --features serde --bin jev_service   # Jev-pattern service
cargo run -p tpt-intellect-stream --example telemetry_monitor          # sensor workload
cargo run -p tpt-intellect --example erp_decision                  # ERP approval demo
cargo bench -p tpt-intellect-batch      # latency / throughput / scaling suites

Further crates are added only when an actual architectural boundary justifies them (spec §33).

Building

cargo build --workspace
cargo test --workspace
cargo bench --workspace

MSRV is 1.85 (Rust 2024 edition); see docs/MSRV.md. API stability expectations for the 0.x series are in docs/API_STABILITY.md.

Relationship to the TPT ecosystem

tpt-intellect is designed to consume tpt-axiom's uncertainty types and to use tpt-augur and tpt-infer as intelligence backends, without depending on or duplicating their internals (spec §23–§25). See tpt-intellect-core's crate docs for the current state of the Axiom integration seam.

License

Dual-licensed under MIT or Apache-2.0, at your option.