hlang

A FBP-Inspired language for building universal applications.

Hlang aims to make programming easier, faster and more comfortable. It avoids coding, repetition and frustration.

Starting
RTextReadable
TUppercaseTransform
WOutputWritable
PORTS ARE LIVE STREAMS

Activity from the interpreter

  1. Type in the Text node.

What an hlang program is

A Readable sends, a Transform maps, a Writable receives, and every port between them is a live stream.

One program, two backends

planGraph checks a graph and plans it once. The interpreter runs that plan; the compiler prints the same plan as a module.

First it is data: an IGraph.

IGraph

text · R · text-sourcetransform · T · uppercaseprint · W · print2 connections

Then planGraph checks and plans it.

ExecutionPlan

roots: texttext.out → transform.intransform.out → print.in

The interpreter runs it in process.

interpret()

in · Ports are live streamsout · PORTS ARE LIVE STREAMS

Or the compiler prints it as a module.

compile()

import {Flow} from "@hlang-org/runtime";import {Subject} from "rxjs";import Node0 from "./nodes/text-source.js";import Node1 from "./nodes/uppercase.js";import Node2 from "./nodes/print.js";export function run(options = {}) {

Lumen, the editor for hlang graphs

This is the editor itself, running in your browser. Drag a node, change a parameter in the inspector or connect a port, and the running total follows.

Loading the editor

Lumen is three packages, released as 0.x while the API settles: a headless core, React bindings and a design system. Read the Lumen docs

Built on hlang

Anything that produces an IGraph can run it with the interpreter or ship it with the compiler, so each product builds its own surface on the same engine.

Retail store operations

A node development tool built on hlang, with Readable, Transform and Writable nodes, a property panel and a run log

Freshippo Rex · CHINASHOP 2020

At CHINASHOP 2020, the 22nd China Retail Expo, Rex, the commercial platform of Freshippo, presented a solution for store operations with hlang as its logic engine. Store logic was built, demonstrated and debugged as flows.

Read about the event

AStack

The AStack mark

AI agents and workflows

A composable TypeScript framework for AI agents, workflows and RAG. Models, tools and agents share one component interface and connect through ports into pipelines. AStack has its own implementation; hlang provides its computational model.

AStack on GitHub

Prism

Prism: image sources, a tone control, compose, grade and a preview on a live graph, with the render panel

Image and video creation · in development

A node-based tool for image and video creators, built on Lumen. Its image sources, intent nodes and render preview are hlang nodes, and what a creator builds is an IGraph.

See the Prism example

Seven packages

Every package is published under @hlang-org, and with identical builds and versions under @hlang-tech. Use one scope in a project.

Start with the runtime and the interpreter.

npm install @hlang-org/runtime @hlang-org/interpreter

The Lumen packages are 0.x: they are in active development and can change in any minor release.

Get started

Write your first graph in the getting started guide.Start