FunctorFlow.jl
FunctorFlow.jl is a Julia package for building AI systems as categorical diagrams. It provides:
- a typed diagram DSL for objects, morphisms, Kan extensions, and obstruction losses
- a backend-neutral execution pipeline
- Lux-backed neural compilation for trainable architectures
- categorical extensions for universal constructions, causal semantics, sheaves, coalgebra, and JEPA-style world models
FunctorFlow.jl is a Julia port of the original Python FunctorFlow package by Sridhar Mahadevan, and extends it with a Julia-native macro DSL, Lux integration, and tighter interoperability with the AlgebraicJulia ecosystem.
Documentation map
Getting Started: installation, a first diagram, and macro syntaxCore Concepts: the package model of diagrams, Kan extensions, losses, and executionBlock Library: prebuilt categorical building blocks and training-oriented Lux helpersVignettes: rendered tutorial notebooks and longer worked examplesAPI Reference: reference pages for the exported API
Package highlights
FunctorFlow centers on a small set of primitives:
Diagramfor architecture specificationFFObject,Morphism,KanExtension, andObstructionLossfor categorical structurecompile_to_callablefor backend-neutral executioncompile_to_luxfor differentiable execution with Lux@functorflowand Unicode operators likeΣ,Δ, and→for concise authoring
For longer worked examples, see the published Vignettes page.