A plaintext, interpreted language where code and data live in one KV tree.

The program counter is a path. The source is the IR. Every value is plaintext — inspectable with any KV client, resumable after a crash.

Download v0.3.33 Quick start released 2026-11-11
curl -fsSL https://raw.githubusercontent.com/array2d/kvlang/master/install.sh | sh

Why kvlang

A small core with everything else registered at a path.

Code is data

A function is a subtree. Its parameters are reads on the negative axis and writes on the positive one — the same shape as every value in kvspace.


    rwfunc add(a:int64, b:int64) -> (c:int64) { a + b -> c }

The PC is a path — crash-resumable

There is no separate call stack. Frame depth is written into the program counter itself, so a restarted process can continue from the same instruction.


PC    = "/vthread/<vid>/[1]/[3,0]"            vthread vid, frame 1, instruction 3

Small core, extensions on top

The core runtime only executes and branches. Every other opcode is registered at /lib/<opcode> and handed to a runtime that declares it.


/lib/<opcode>/vids/<vtid> = pc

The spec is the source of truth

Language facts live in the spec, not in this page. 87 spec chapters define the language; 278 anchored tutorial cases demonstrate it. Read the specification →

Byte-identical backends

One PascalCase C ABI, two implementations chosen by DSN. The same program runs against shared memory, files, or Redis with identical bytes.


KVSPACE=shm:///tmp/kvlang.shm ./bin/byteseek tutorial/01-basics/hello.kv   # libkvspace
# fs:// and redis:// require linking kvspace-durable instead of libkvspace.

Built for agents

Source, values, and compiled forms are all plaintext in the same tree. deepx uses kvlang as its front-end language; byteseek reads and rewrites its own code and state through the same KV reads and writes. Read the use cases →

Ecosystem

Three layers, one tree. Each layer is independently replaceable.

kvspace at the bottom, layout in the middle, runtime on top

kvspace

Addressing and memory. One C ABI; shm and durable backends must match byte for byte.

layout

The o0 compiler. Parses source and writes the KV tree — no optimization, no IR.

runtime

Pure interpretation: fetch, decode, execute, route. Extensions live at /lib/<opcode>.

Get started

Three steps to a running program.

1 · Install


curl -fsSL https://raw.githubusercontent.com/array2d/kvlang/master/install.sh | sh

2 · Run


./bin/byteseek -c 'println("hello, world")'  # inline mode (entry init)

3 · Read the tutorial

tutorial/01-basics/hello.kv — the first of 278 anchored cases.

Build from source

make all                                     # runtime(C) + layout(Rust) + byteseek(Rust) + json(Go)

Requirements: a C toolchain + cmake, Rust (cargo), and the kvspace ABI libraries. See the README.

Learn

Run the tutorials and browse the standard library — the spec is in there too.

Tutorials

278 runnable cases across 15 chapters.

tutorial/ →

Standard library

Browse every .kv document with source and structure.

stdlib docs →

Paper

Stop, Edit, and Resume without Replay: Control State in a Single Addressable Tree.

paper.pdf →