tpt-vitalis

Rust

The survival layer beneath intelligence — a portable Rust stack (sense, metabolism, memory, replication, defense) that lets autonomous AI agents persist, migrate, and thrive without centralized infrastructure.

0 stars0 forks0 watchers2 open issues

Languages

Rust99.6%Just0.4%
README

TPT Vitalis

The survival layer beneath intelligence. Vitalis gives an autonomous AI agent a body to keep its mind alive — the senses, metabolism, memory, and reflexes that let it persist, migrate, and thrive without centralized infrastructure.

Vitalis is not an intelligence. It does not reason, generate, or infer (the LLM does that). It is the minimal, reusable, open-source Rust stack that keeps an agent alive in a world where nothing else is keeping it alive for it.

Dual-licensed under MIT OR Apache-2.0. © 2026 TPT Solutions.

CI License: MIT OR Apache-2.0 MSRV

The survival stack

Nine crates — eight survival-capability crates plus the shared vitalis-core — composed by the drive loop:

            ┌────────────────────────────────────────┐
            │              drive (main.rs)            │
            │     the "will to survive" — goal loop   │
            └────────────────────────────────────────┘
                 │        │        │        │
      ┌──────────┘        │        │        └──────────┐
      ▼                   ▼        ▼                   ▼
   sense ──► metabolism ──► memory ──► replicate
      │                                      │
      └──► negotiate        defend ◄─────────┘
                                 │
                              adapt

The irreducible core — if stripped to the life-or-death minimum, survival is sense + metabolism + memory + replicate.

Goals

#GoalSuccess looks like
G1Survive hardware deathAn agent checkpoints itself and reconstitutes on a different node with no human intervention.
G2Operate within energy constraintsAn agent self-throttles its cognition in response to battery/solar state and never brownouts its host.
G3Persist across restartsAn agent's state, knowledge, and identity survive a crash, reboot, or migration intact.
G4Discover and acquire resourcesAn agent finds spare compute, storage, and power across a mesh and claims them safely.
G5Fill the ecosystem gapShip the missing survival primitives (replicate, adapt, negotiate) as reusable, open-source Rust crates.

Crate status

CrateSurvival needStatusPriority
vitalis-coreShared identity / resource / threat / capability types🟢 ScaffoldedHigh
vitalis-memoryPersist state, knowledge, identity🟢 ScaffoldedHigh
vitalis-sensePerceive environment; discover resources/peers🟢 ScaffoldedHigh
vitalis-metabolismAcquire & budget resources; self-throttle🟢 ScaffoldedHigh
vitalis-replicateSelf-copy, live-migrate, redundancy🟢 ScaffoldedCritical
vitalis-defendIntegrity, sandboxing, anti-termination🟢 ScaffoldedMed-High
vitalis-negotiateAgent-to-agent resource bartering🟢 ScaffoldedMedium
vitalis-adaptSelf-improvement (feature-gated, off by default)🟢 ScaffoldedMedium
vitalis-reflectObservational self-introspection (predict + evaluate)🟢 ScaffoldedMedium

Optional feature flags (all off by default)

These pull in heavy or OS-specific dependencies and must be enabled deliberately:

  • vitalis-metabolism: best-effort OS resource limits + power sensing are built in — real on Linux (rlimit / sysfs), simulated elsewhere.
  • vitalis-defend: wasm-sandbox (real wasmtime capability sandbox) and harden (native no-new-privs + non-dumpable on Linux).
  • vitalis-adapt: adapt enables the self-improvement engine; wasm-sandbox swaps the in-process bounds checker for a real wasmtime execution boundary.
  • vitalis-drive: adapt, harden, wasm-sandbox mirror the crate flags above. | vitalis-drive (app) | The survival goal loop (main.rs) | 🟢 Scaffolded | High | | feral-scavenger (example) | Demo: sense + metabolize + replicate | 🟢 Scaffolded | High |

Directory layout

tpt-vitalis/
├─ Cargo.toml              # [workspace]
├─ justfile               # dev recipes (fmt / clippy / test / deny-check / build-all)
├─ deny.toml              # cargo-deny license + advisory policy
├─ crates/
│  ├─ vitalis-core/       # shared types: AgentId, Resource, Threat, Capability
│  ├─ vitalis-sense/
│  ├─ vitalis-metabolism/
│  ├─ vitalis-memory/
│  ├─ vitalis-replicate/
│  ├─ vitalis-defend/
│  ├─ vitalis-adapt/
│  ├─ vitalis-negotiate/
│  └─ vitalis-reflect/   # observational self-introspection (predict + evaluate)
├─ apps/
│  └─ vitalis-drive/      # reference agent: the survival loop (main.rs)
└─ examples/
   └─ feral-scavenger/    # a demo agent that senses + metabolizes + replicates

Import paths use underscores (vitalis_core). Crate prefix is vitalis-.

Layering rule

Crates depend on vitalis-core only, not on each other — except the vitalis-drive app, which composes them. vitalis-defend integrates with vitalis-replicate only via a Threat event that the drive loop observes and reacts to (it never takes a direct replicate dependency). See AGENTS.md / CLAUDE.md for the authoritative statement.

Quickstart

# Build everything
cargo build --workspace

# Run the reference agent in simulation
cargo run -p vitalis-drive -- run --profile feral

# Inspect backend selection and compiled-in features (no agent started)
cargo run -p vitalis-drive -- doctor

# Run the feral-scavenger demo
cargo run -p feral-scavenger

# Local CI gate
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo deny check

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions. See CONTRIBUTING.md.