⚡ Fable-Jev

September 19, 2026 · View on GitHub

Fable Mascot

⚡ Fable-Jev

Sub-100ms Cognitive Reflexes for Autonomous Coding Agents

Where TypeSafe AI's System One (Jev) meets get-fable's Deterministic Lifecycle Engine.

Parent Ecosystem Model Latency Awesome License: MIT


ArchitectureFast CompactionAwesome JevPlaybookBenchmarksRoadmapParent Repo


🔮 The Teaser: The Missing Half of Autonomous Agents

The dirty secret of modern AI coding agents is that they are cognitively imbalanced:

  1. They are sluggish and token-hungry: Asking a 70B+ reasoning LLM to generate paragraphs of Chain-of-Thought just to pick which tool or skill to trigger next wastes 2 to 5 seconds and thousands of tokens per step.
  2. Brittle regexes fail in the wild: Classical keyword routers are lightning-fast, but shatter the moment human instructions become ambiguous, sarcastic, or colloquial.
  3. Lossy summarization causes amnesia: When context limits hit, naive agents ask an LLM to summarize conversation history. File paths, CLI flags, exact error codes, and line numbers vanish forever.

The Breakthrough: Dual-Brain Architecture

Human cognition operates on two distinct systems (Kahneman):

  • System 1 (Reflex): Instantaneous, associative, gut-feeling, sub-100ms intuition.
  • System 2 (Reasoning): Deliberate, analytical, rule-governed, machine-checked rigor.

Fable-Jev bridges this gap for AI agents. By pairing TypeSafe AI's Jev (the world's premier System One foundation model) with the get-fable deterministic lifecycle harness, agents gain superhuman reflexes backed by mathematically unbreakable safety gates.

🛡️ The Golden Invariant

"Jev is allowed to be wrong. The system is never allowed to become unsafe."

Jev offers probabilistic intuition; get-fable enforces deterministic law. If Jev hiccups, times out, or hallucinates, hard invariants and circuit breakers take over instantaneously.


🏗️ How It Works: Route Fusion & Reflex Pipeline

flowchart TD
    Task["👤 User Prompt & State Envelope"] --> Extract["⚡ Signal Extraction"]
    Extract --> Det["⚙️ get-fable Deterministic Router<br/>(Hard Invariants & State Machine)"]
    Extract --> Jev["🧠 TypeSafe Jev Reflex Advisor<br/>(Sub-100ms Typed Probabilities)"]
    
    Det --> Fusion{"🔀 Route Fusion Policy"}
    Jev --> Fusion
    
    Fusion -->|"Hard invariant triggered<br/>(Failure streak >= 2, Security, Release)"| HardWin["🛡️ Deterministic Path Wins<br/>(Unconditional Safety)"]
    Fusion -->|"Ambiguous intent +<br/>High Jev Margin (> 0.20)"| JevAdvise["🚀 Guided Specialist Routing<br/>(Fable-Jev Reflex Decision)"]
    Fusion -->|"Low confidence / Network jitter / Circuit Trip"| Fallback["🔁 Graceful Deterministic Fallback"]
    
    HardWin --> Exec["🛠️ Active Specialist Execution & Evidence Gate"]
    JevAdvise --> Exec
    Fallback --> Exec

    style Jev fill:#0d9488,stroke:#0f766e,color:#fff
    style HardWin fill:#2563eb,stroke:#1d4ed8,color:#fff
    style Fusion fill:#f59e0b,stroke:#d97706,color:#fff

Typed Decision Primitives (Zero Prose Waste)

Unlike chat models that vomit markdown, Jev answers strict, typed schemas:

PrimitiveWhat It DoesWhy It Matters for Agents
ChoiceSelects exactly 1 candidate from a closed enum with probability distributionsInstant skill and subagent selection
ScoreEvaluates a state on an ordered semantic rubric (0.0 to 1.0)Urgency assessment, risk level, task complexity
NoulBoolean truth estimation with calibrated certaintySafety gates, context compaction keep/drop decisions

⚡ Superpowers Inside Fable-Jev

1. 2-Stage Lookalike Disambiguation

When an agent faces overlapping skills (e.g., fable-tdd vs fable-execute vs fable-discover), Fable-Jev queries Jev in two rapid passes:

  1. Candidate Shortlist (Choice): Evaluates the top 3 semantic matches.
  2. Semantic Fitness Check (Noul): Checks whether the top candidate explicitly satisfies the task invariants before committing.

2. Fast Jev Compaction (Lossless Context Pruning)

Standard LLM summarization is toxic for developers: it turns grep -rn "API_KEY" /var/log into "searched logs for keys". Fast Jev Compaction does not summarize:

  • It scores every historical tool call and output with Jev Noul questions.
  • Retains critical technical strings, paths, and constraints verbatim.
  • Prunes stale or redundant intermediary tool churn.
  • Result: Up to 80% token reduction with 0% hallucinated drift. (See docs/COMPACTION.md).

3. Bulletproof Circuit Breakers & Shadow Mode

  • Zero-risk evaluation: Run Fable-Jev in shadow mode where Jev evaluates every route in parallel with get-fable, recording telemetry to .fable/reflex/events.jsonl without modifying live execution.
  • Fail-Open / Fail-Safe: If the TypeSafe API exceeds 1200ms or throws 3 consecutive errors, the circuit breaker opens instantly, falling back to deterministic get-fable routing with zero interruption.

📊 Benchmarks: The Speed of System One

MetricTraditional LLM Router (70B)Static Regex RouterFable-Jev Dual-Brain
Latency2,200 ms – 4,500 ms< 1 ms70 ms – 120 ms
Token Cost / 1k routes~$15.00 – $30.00$0.00$0.042 (99.8% cheaper)
Ambiguity HandlingGood (but slow/verbose)❌ Brittle / Fails🎯 Calibrated & Robust
Safety Invariant Guarantee❌ None (Hallucinations)✅ Strict🛡️ 100% Guaranteed
Context CompactionLossy / Hallucinates❌ Not capableLossless & Verbatim

(Explore full benchmark methodology in docs/BENCHMARKS.md)


💻 Live Experience in get-fable

The Fable-Jev Reflex Subsystem is integrated natively into the get-fable CLI:

# Check the status of your Fable-Jev reflex engine
bun ./bin/get-fable.js reflex status

# Run the live diagnostic doctor
bun ./bin/get-fable.js reflex doctor --live

# Test real-time reflex routing with live TypeSafe Jev arm
bun ./bin/get-fable.js reflex route "We need to trace how user tokens leak into auth logs" --live

Sample Doctor Output:

--- Fable-Jev Reflex Doctor ---
Provider configured: typesafe-jev                    [ PASS ]
Model configuration: jev-latest                      [ PASS ]
API Key presence check                               [ PASS ]
Circuit Breaker State: CLOSED                        [ PASS ]
TypeSafe Live Reflex Ping: 84ms latency (Healthy)    [ PASS ]
Route Fusion Policy: Invariants Enforced             [ PASS ]

🌟 The "Awesome Jev & Fable" Collection

We maintain an authoritative, curated index of everything happening in the Jev & System One ecosystem:

👉 Browse the Full AWESOME.md Directory


🗺️ What We're Building Next (Roadmap)

  • v1.0 (Shadow Mode): Non-blocking parallel advisory routing, telemetry logging, doctor diagnostics.
  • v1.1 (Fast Compaction Engine): Lossless verbatim message compaction plugin for Claude Code, Antigravity, and Codex.
  • v1.2 (Guarded Override Mode): High-margin (>0.35) Jev recommendations automatically steer ambiguous discovery & planning phases.
  • v1.3 (Local Jev Edge Distillation): Sub-10ms local ONNX/WASM quantized reflex model for 100% offline environments.
  • v2.0 (Multi-Agent Reflex Fabric): Distributed reflex synchronization across swarm nodes using TOON format.

🤝 Join the Movement

  1. Star the Repositories:
  2. Explore the Specs: Read the complete RFC in docs/ARCHITECTURE.md.
  3. Contribute: Check out CONTRIBUTING.md to propose new Jev decision rubrics and playbooks.

Built with precision by Mamdouh Aboammar & the Fable Autonomous Systems Community.
Powered by TypeSafe AI & Bun.