Skip to content

copyleftdev/tala

Repository files navigation

TALA

TALA

Intent-Native Narrative Execution Layer
Remember the why.

Rust License AI Linux

rust ai machine-learning embeddings vector-search semantic-search linux operating-systems observability chaos-engineering devops sre narrative-graph intent developer-tools systems-programming

What is TALA · Architecture · Quick Start · Crate Layout · Performance · License


What is TALA

Run history on any machine. You get a flat list of commands, numbered sequentially, stripped of all context. No record of what you were trying to accomplish. No link between the grep that found the bug and the git commit that fixed it. No memory of which deployment sequence worked last Thursday when the same thing broke.

Fifty years of Unix, and the best we have is an append-only text file. Commands are captured. Intent is lost.

TALA reimagines shell history as a causality-aware, graph-structured narrative of intent. Every action is captured not as a string, but as a structured node in a directed acyclic graph -- linked to what caused it, what it depended on, what it produced, and how confident the system is in the outcome.

Design hypothesis: Systems that model intent + causality + outcome outperform systems that model commands + sequence.

What this enables

  • Semantic recall -- search by meaning, not regex
  • Adaptive replay -- re-execute workflows that adapt to changed context
  • Pattern detection -- identify recurring failure clusters automatically
  • Prediction -- anticipate the next action from historical embeddings
  • Narrative extraction -- pull coherent stories from thousands of interactions

Architecture

TALA models intent as a first-class OS primitive: I = f(C, X, P) where C is the command, X is context, and P is prior knowledge from historical embeddings.

                     tala-core
                    /    |    \
                   /     |     \
            tala-wire  tala-embed  (no inter-dep)
               |    \    /   |
               |  tala-store |
               |      |      |
          tala-graph   |  tala-intent
            /    \     |    /
     tala-weave  tala-kai
               \   |   /
             tala-net
                 |
           tala-daemon
                 |
            tala-cli

Subsystems

Component Role
talad Intent ingestion, normalization, graph construction
weave Adaptive execution and replay engine
kai Insight, inference, and summarization engine

Data flow

raw_command -> Intent extraction -> Embedding (384-dim)
            -> WAL append -> HNSW index -> Edge formation
            -> Narrative graph -> Segment flush (TBF binary format)

Quick Start

Prerequisites

  • Rust 1.82+ (rustup recommended)
  • Docker and Docker Compose (for the observatory demo)

Build from source

git clone https://github.com/YOUR_ORG/tala.git
cd tala
cargo build --release

Run benchmarks

cargo bench

Launch the observatory demo

The demo runs 4 simulated Linux operations domains (Incident Response, Continuous Deployment, Observability, System Provisioning) with chaos injection, exporting metrics to Prometheus. A live topology dashboard visualizes how TALA structures operational intent into narrative.

cd deploy
cp .env.example .env    # adjust settings if desired
docker compose up -d

Open http://localhost:8080 to see the TALA Intent Observatory.

Service URL
Observatory Dashboard localhost:8080
Prometheus localhost:9090
Grafana localhost:3000

To tear down:

docker compose down -v

Crate Layout

crates/
  tala-core/      Foundation types + traits (zero dependencies except std)
  tala-wire/      TBF binary format: columnar storage, CSR edges, bloom filters
  tala-embed/     SIMD-accelerated vector ops, HNSW index, quantization
  tala-graph/     Narrative graph engine with BFS/DFS traversal
  tala-store/     WAL, hot buffer, storage engine, query engine
  tala-intent/    Tokenization, embedding, intent classification pipeline
  tala-weave/     Adaptive replay: plan building, variable substitution
  tala-kai/       Insight engine: k-means clustering, pattern detection, prediction
  tala-daemon/    Unified daemon orchestrating all subsystems
  tala-net/       Distributed TALA: node identity, consistent hashing, TLV codec, in-process transport
  tala-cli/       Command-line interface: ingest, query, replay, insights, narrative inspection
  tala-sim/       Multi-domain simulator with chaos injection

Core types

Type Crate Description
Intent tala-core Structured intent node: id, timestamp, embedding, command, outcome
Edge tala-core Directed edge: from, to, relation type, weight
NarrativeGraph tala-graph DAG with adjacency lists, BFS/DFS, narrative extraction
HnswIndex tala-embed Hierarchical navigable small world ANN index
StorageEngine tala-store Unified storage: WAL + HNSW + hot buffer + segment flush
Daemon tala-daemon Top-level orchestrator: ingest, query, replay, insights

Design decisions

  • DAG, not tree -- the narrative graph is a directed acyclic graph with probabilistic edges
  • Binary-first storage -- TBF format, no JSON. Columnar + CSR hybrid
  • 64-byte alignment -- all embedding storage aligned for AVX-512
  • SIMD with runtime dispatch -- compile all ISA variants, detect at startup
  • Append-only segments -- segments are immutable once flushed. WAL provides durability
  • Trait boundaries between crates -- inter-crate communication via traits in tala-core

Performance

Benchmarked on x86-64 with Criterion. All times are median.

Operation Result
Batch cosine similarity (1K, single thread) 41.7 us
Batch cosine similarity (100K, parallel) 3.41 ms
HNSW search (10K vectors, ef=50, top-10) 139 us
Semantic query (10K corpus, top-10) 151 us
Full segment write (1K nodes) 209 us
WAL append (1K entries, dim=384) 730 us
Full ingest pipeline (1K intents) 1.10 ms
CSR traverse (10K lookups) 21.7 us
Bloom lookup (1K queries) 27 us

Observatory

The TALA Intent Observatory is a topology-first dashboard for observing the system in real time. Click any node in the live infrastructure graph to drill into its telemetry.

Features:

  • Living topology with animated data flow between verticals and subsystems
  • Click any node to open a detail drawer with deep metrics
  • Chaos mode indicator that detects and displays the current fault injection state (Failure Injection, Latency Storm, Retry Cascade, Stampede, Mixed Chaos)
  • Per-node telemetry: pipeline waterfall, HNSW capacity gauge, lock contention, edge relation breakdown, storage layer metrics

Terminology

Term Meaning
Intent Structured representation of a desired outcome: I = f(C, X, P)
Narrative Graph Directed acyclic probabilistic graph of intent nodes and causal edges
TBF TALA Binary Format -- the on-disk segment format
CSR Compressed Sparse Row -- edge storage layout
HNSW Hierarchical Navigable Small World -- ANN index
talad The TALA daemon -- orchestrates all subsystems
weave Adaptive replay engine
kai Insight and inference engine

Contributing

# Run checks before submitting
cargo check --workspace
cargo test --workspace
cargo bench

Conventions

  • #[repr(C)] on all structs that cross FFI or mmap boundaries
  • unsafe blocks require a // SAFETY: comment
  • SIMD intrinsics behind #[cfg(target_arch)] with scalar fallback
  • No unwrap() in library code -- use ? or explicit error handling
  • Benchmarks in crates/<name>/benches/, not tests

License

Licensed under either of

at your option.

Releases

No releases published

Packages

 
 
 

Contributors