Table of Contents
Overview
Batuta coordinates the Sovereign AI Stack, a comprehensive pure-Rust ecosystem for organizations requiring complete control over their ML infrastructure. The stack enables privacy-preserving inference, model management, and data processing without external cloud dependencies.
Key Capabilities
- Privacy Tiers: Sovereign (local-only), Private (VPC), Standard (cloud-enabled)
- Model Security: Ed25519 signatures, ChaCha20-Poly1305 encryption, BLAKE3 content addressing
- API Compatibility: OpenAI-compatible endpoints for drop-in replacement
- Observability: Prometheus metrics, distributed tracing, A/B testing
- Cost Control: Circuit breakers with configurable daily budgets
Installation
Or add to your Cargo.toml:
[]
= "0.1.3"
Quick Start
# Analyze project structure and dependencies
# Query the Sovereign AI Stack
# Model registry operations
# Encrypt models for distribution
Stack Components
Batuta orchestrates a layered architecture of pure-Rust components:
┌─────────────────────────────────────────────────────────────┐
│ batuta v0.1.3 │
│ (Orchestration Layer) │
├─────────────────────────────────────────────────────────────┤
│ realizar v0.2.2 │ pacha v0.1.1 │
│ (Inference Engine) │ (Model Registry) │
├──────────────────────────┴──────────────────────────────────┤
│ aprender v0.14.1 │
│ (ML Algorithms & Formats) │
├─────────────────────────────────────────────────────────────┤
│ trueno v0.7.4 │
│ (SIMD/GPU Compute Primitives) │
└─────────────────────────────────────────────────────────────┘
Core Components
| Component | Version | Description |
|---|---|---|
| trueno | 0.7.4 | SIMD/GPU compute primitives with wgpu backend |
| aprender | 0.14.1 | ML algorithms: regression, trees, clustering, NAS |
| pacha | 0.1.1 | Model registry with signatures, encryption, lineage |
| realizar | 0.2.2 | Inference engine for GGUF/SafeTensors models |
| batuta | 0.1.3 | Stack orchestration and CLI tooling |
Extended Ecosystem
| Component | Description |
|---|---|
| trueno-db | GPU-accelerated analytics database |
| trueno-graph | Graph database for code analysis |
| alimentar | Data loading with encryption support |
| renacer | Syscall tracing for validation |
Commands
batuta analyze
Analyze project structure, languages, and dependencies:
# Output:
# Primary language: Python
# Dependencies: pip (42 packages), ML frameworks detected
# TDG Score: 73.2/100 (B)
# Recommended: Use Aprender for ML, Realizar for inference
batuta oracle
Query the stack for component recommendations:
# Natural language queries
# List all components
# Component details
# Interactive mode
batuta pacha
Model registry operations:
# Pull models from registry
# Generate signing keys
# Sign models for distribution
# Verify model signatures
# Encrypt models at rest
# Decrypt for inference
batuta content
Generate structured content with quality constraints:
# Available content types
# Generate book chapter prompt
# Validate content quality
Privacy Tiers
The stack enforces data sovereignty through configurable privacy tiers:
| Tier | Behavior | Use Case |
|---|---|---|
| Sovereign | Blocks ALL external API calls | Healthcare, Government |
| Private | VPC/dedicated endpoints only | Financial services |
| Standard | Public APIs allowed | General deployment |
use ;
let selector = new
.with_privacy;
// Returns only local backends: Realizar, Ollama, LlamaCpp
let backends = selector.recommend;
Model Security
Digital Signatures (Ed25519)
Verify model integrity before loading:
use ;
let signing_key = generate;
let signature = sign_model?;
// Verification fails if model tampered
verify_model?;
Encryption at Rest (ChaCha20-Poly1305)
Protect models during distribution:
use ;
let encrypted = encrypt_model?;
let decrypted = decrypt_model?;
Documentation
- The Batuta Book — Comprehensive guide
- Sovereign AI Stack Book — Complete stack tutorial with 22 chapters
- API Documentation — Rust API reference
- Specifications — Technical specifications
Design Principles
Batuta applies Toyota Production System principles:
| Principle | Application |
|---|---|
| Jidoka | Automatic failover with context preservation |
| Poka-Yoke | Privacy tiers prevent data leakage |
| Heijunka | Spillover routing for load leveling |
| Muda | Cost circuit breakers prevent waste |
| Kaizen | Continuous metrics and optimization |
Development
# Clone repository
# Build
# Run tests
# Build documentation
License
MIT License — see LICENSE for details.
Links
Batuta — Orchestrating sovereign AI infrastructure.