The Library
Every architecture. From "Hello World" to Predictive World Models.
100% Python. No Magic.
Showcase Projects
Full RepositoriesThe Nervous System
The industry is building the Brain. We are building the Nervous System. Three repos. One cognitive architecture.
The execution spine — deterministic graph engine, EU AI Act compliance, HMAC-signed audit trails.
The world model layer — route LLMs, JEPAs, diffusion models, GNNs as first-class nodes in the same deterministic graph.
The memory layer — bicameral mind, sleep cycles, episodic memory. Catastrophic forgetting solved architecturally.
Lár-JEPA: Route Any Model — Not Just LLMs
Every framework assumes one model type. When a JEPA world model outputs a 768-dimensional latent tensor, those frameworks crash — there is no signal type for it. Lár-JEPA routes anything. LLMs, JEPAs, diffusion models, SSMs, GNNs — as first-class nodes in the same deterministic graph.
Adaptive Execution
examples/adaptive/Runtime-Adaptive Graphs
You pre-define the tools. At runtime, AdaptiveNode asks an LLM to design the graph — how many nodes, which tools, in what order — based on the actual input. A simple NDA gets 1 review node. A complex multi-party software license gets 3 parallel specialists: legal terms, financial liability, GDPR compliance. You don't hardcode both paths. The agent decides.
The graph shape changes at runtime. The compliance guarantees don't. TopologyValidator (pure Python, not an LLM) enforces the tool allowlist and rejects cycles before a single node executes. Every generated spec is logged to the HMAC-signed Causal Trace. All 13 compliance primitives work inside generated subgraphs exactly as they do in static ones. In fractal agents (parallel specialists), BranchTriageNode ensures the human jury sees per-branch findings — not just a rolled-up score.
How it works → Fractal agents →
Simple Query vs Deep Research — adaptive worker count
Runtime Code Generation — writes & executes Python tools in a sandboxed executor
Error Recovery — injects validated recovery subgraph at runtime
Structural Adaptation — topology determined at runtime by the LLM itself
Domain Subgraph Dispatch — pre-defined expert spec injection
Compliance & EU AI Act
13 Primitives · 24 ExamplesHigh-Stakes & Regulated Environments
Production-ready compliance architecture. Every structural requirement in Nannini et al. (2026) is covered. EU AI Act enforcement: August 2026. EU AI Act Deep Dive → Auditor Guide →
Flagship Showcases
Full 13-primitive backbone · €500k SME loan decision · 3 HMAC-SHA256 signed artefacts. One command. Full proof.
BranchTriageNode + AdaptiveNode · parallel HITL · Art. 14 fractal oversight gap solved
Core Compliance Primitives
Article 14 · User Approval & Interrupts
Blocking Prompt Injection with Code
Proposer → Jury → Kernel pattern
Jury + Supervisor + Manager
Red Teaming: Social Engineering
Red Teaming: Prevent Stale Tool Calls
Article 14 Compliance Node (direct)
Art. 12 · Immutable Cryptographic Logs
SEC compliance · HMAC-signed audit trail
FDA 21 CFR Part 11 · Trial Logic
Standalone auditor script for regulators
Art. 72 · Continuous Surveillance
Art. 13 · Transparency Disclosure
Art. 14 · RiskScorerNode gates
Art. 3(23) · RuntimeStateVersioner
Art. 15(4) · Privilege Minimisation
GDPR Art. 17 · Strips PII before signing
Art. 12 · Step-level causal graph
Art. 50 · SyntheticMarkerNode
prEN 18283 · BiasFilterNode
Step 9 · External action inventory
AEPD Rule of 2 · LethalTrifectaGuard
Reasoning Models & Comparisons
System 2 Thinking & The Black Box Evidence
Native support for DeepSeek R1, OpenAI o1, and Liquid. Plus — the proofs of why other frameworks fail. Reasoning Models Docs →
Reasoning Models (examples/reasoning_models/)
Native <think> tag parsing — reasoning extracted to metadata, main context stays clean
High-IQ O1 Planner Nodes — complex multi-step reasoning tasks
Fast Local Edge Inferencing with Liquid models
The Evidence (examples/comparisons/) · Red Teaming Case Study →
Scale & Advanced
Massive Parallelism & World Models
High Scale (examples/scale/)
60+ Node Stress Test
Dynamic Graph Pruning
True Parallelism via BatchNode
Concurrent Branch Execution
Advanced (examples/advanced/)
Core Patterns (examples/patterns/)
Cognitive Architectures
Knowledge Retrieval — ToolNode & State Merging
The "Judge" Loop — error state retry
Fan-Out / Fan-In Aggregation
Strict JSON Enforcement
Multi-Agent Collaboration
Prompt Optimisation — Iterative Refinement
CoinCap API Tool
Agentic Evaluation — Parallel Prompts
Crash & Exact Resume — deterministic replay
Custom Logging & Cost Tracking
Resumable Graphs
No other framework can do thisEvery crash is a resumption point.
Other frameworks re-send the full conversation history on retry. Lár's routers are pure Python — same state in, same decision out, deterministically. When Lár resumes at Step 47, it takes exactly the path Step 47 would have taken. Every causal trace entry is a resumption checkpoint. Resumable Graphs Docs → Continuously Running Agents →
Crash & exact resume — serialise state, kill the process, resume from the exact node. Deterministic replay guaranteed.
4-step legal pipeline. Crashes at Step 2. Resume sends 302 tokens — not 776. Live comparison printed to console.
Graph halts at HumanJuryNode. Process can be killed. Hours later, when the human responds — execution resumes from exactly that node. Art. 14 in practice.
If your agent produces a wrong output at Step 5, load the state from Step 4, modify the prompt, and run Step 5 alone — repeatedly, cheaply. In a black-box framework you re-run the whole pipeline and hope the LLM reproduces the same path. In Lár you rewind to the exact state that produced the bad output.