Nu — the interaction primitive.
Build apps in one primitive that spans your
whole stack — databases, UIs, AI agents,
and services. No glue. 50× less code.
Built for
- 01AI agentic systems
- 02Personal apps
- 03Data-intensive apps
- 04Enterprise in-house tools
Meet Nu.
What Nu is, how it works, why it matters.
A tiny program is a joy to write. Three lines, one substrate.
Real apps don't stay here. a moves into a database. b comes from a form a user submits. The result renders in a browser. A background job reruns it when either input changes. Now the three lines are three hundred: an ORM, a request handler, a template, a websocket, a queue. Almost none of it is about a + b anymore. It is all interaction between substrates.
Nu makes interaction the primitive.
- Ref
- A name for a value, wherever it lives: a KV slot, a UI text block, an LLM endpoint, a remote object.
- Interaction
- What you do with a Ref: read, write, branch, iterate, compose.
- Fabric
- Binds Refs to a real backend.
same program, a and b persisted in a kv store
>> chains interactions in order. Kill the process, run it again, the values are still there.
same program, result rendered in a live browser dashboard
Dashboard.out is a Ref too. Setting a browser text block is the same interaction as setting a KV slot.
Same primitive, different substrate. One Ref for any resource, one Interaction for any op. Nu doesn't care what the backend is.
Nu is small on purpose.
Nu is a model and a set of interfaces, hosted in Python. There is no runtime magic to learn beyond Refs and Interactions. Capabilities come from Fabrics. You compose them; the Refs and Interactions stay the same across every one.
nu.mem- plain dicts, hot state
nu.kv- persistent state on a KV store
nu.ui- browser widgets, live-rendered
nu.invisibles- any Fabric on the wire
nu.ray- teleport to a Ray cluster worker
Persistence, reactivity, atomicity, observability, distribution — not features Nu has, but what falls out of naming interactions instead of executing them.
Why this matters.
Because Refs are just names and Interactions are just descriptions, the runtime is free to persist them, replay them, ship them across the network, watch them for changes, batch them into a transaction, run them on another machine.
Which means the same lines that put a + b on a dashboard can, without changing shape:
- Persist across restarts— the KV slot is already durable.
- Re-render live on input changes— wrap in a
Reactinteraction. - Handle terabytes— shard the KV Fabric; the Refs don't notice.
- Run distributed across a cluster — bind through
nu.ray; the Refs don't notice.
interaction-model
the theoryThe language-agnostic specification.
What an interaction is, how Refs name locations, how Interactions compose into programs. Nu is one implementation; anyone can build another.
nu
the python implementationBatteries-included, ready to run.
The interaction model in pure Python, with Fabrics for the everyday jobs: in-memory state, kv-based state, UI, network, cluster compute.
Quickstart.
Three steps: install, run a demo, explore Nu.
01 Install
Python 3.10+ · everything ships in the wheel
pip install "nustack-py[all]"02 Run a demo
counter
A live counter, persistent across restarts.
nu demo countersampled
An infinite series, live-sampled into a fixed-size chart.
nu demo sampledmovies
A movie tracker: form, filterable table, detail pages.
nu demo moviesFabrics.
Fabrics are the tissue between Refs and the real world: memory, kv stores, UI, network, cluster. These are the ones Nu ships with today.
nu.mem
In-memory state fabric.
In-memory state on plain dicts. Perfect for cache, hot state, and in-process coordination.
nu.virtuals
Persistent state fabric.
Refs over a KV backend (RocksDB, LMDB). Transactions, snapshots, and change notifications, built in.
Backends: rocksdb, lmdb
nu.ui
Web UI fabric.
Same fabric shape as the others, but the Refs are widgets: text, buttons, tables. The fabric renders them in the browser and live-updates them as your state changes.
nu.invisibles
Network fabric.
A Nu fabric that puts other fabrics on the network. Bind a fabric in one process, use it from another; same Refs, same interactions, over TCP or Unix socket.
nu.ray
Cluster compute fabric.
A Nu fabric for cluster compute. Teleport a Nu tree to any worker in your Ray cluster; it runs there and returns the result.
Standalone apps built on Nu.
Applications built on Nu today.
nulog
Pure-Python, serverless logger and metrics store. Billions of entries, live UI.
Log messages and observe metrics from any Python code. Entries persist to an embedded KV store and scale to billions, in-process. One line boots a live viewer.
nuspace
A programmable knowledge base.
A knowledge base whose pages hold both writing, data and code as first-class citizens. Blocks store markdown, live metrics, saved searches, or automation rules, all in the same tree, all inspectable and composable.
Status: Coming soon.
Infra. The tools that power Nu fabrics.
Standalone Python libraries the fabrics build on. Each is useful on its own; together they form the substrate under Nu.
virtuals
Virtual Python collections over any KV storage.
Native-shaped Python collections that are thin views over an ordered KV store. Same API as a built-in dict or list, but the bytes stay on disk and stream in on access.
invisibles
Transparent remote objects for Python.
Move an object to another process or node; the calling code doesn't change. Sync stays sync, async stays async.
rdbpy
RocksDB for Python, with transactions.
RocksDB and its compression libs bundled into the wheel for Linux and macOS. No system install. Open a DB and put/get/iterate.
kh57
Deterministic range reservoir sampling.
Draw n uniform samples from a sub-range of a massive (billions) sorted KV dataset without scanning it. Any sorted KV store works as a backend.