The Borz language

Two first-class constructs. One .borz source file.

Declare pure LLM agents with a model, persona, and typed interface. Write actors that compile to four targets — native binary, DEMIX microservice, DENSE nanoservice, or Ephernity contract — without changing the program. Both constructs share one typed message bus.

classifier.borz spec v0.9.5
import "std/string" as *

msg Classify:
    text: str

actor Classifier:
    @persistent var label:      str = "unknown"
    @persistent var call_count: i64 = 0

    on msg Classify:
        call_count = call_count + 1
        infer:
            system: "Classify the topic in one word."
            user:   msg.text
            target: label
        response(label, f"[{call_count}] {to_upper(label)}")
4
compile targets
~50µs
p50 dispatch · no-op handler
13+
verified examples
Two building blocks

One language. Two kinds.

agent and actor are distinct first-class constructs in the same .borz source file. The compiler checks both sides of every handoff between them.

agent
pure LLM agent
Claude · ollama · gemma4

A first-class Borz construct defining a pure LLM persona: persona prose, a mandated model and host, a declared toolset, memory, and a typed message interface. The whole agent is inference — it does not call an LLM, it runs as one.

  • Model-portable: pin to claude:opus, local:ollama:gemma4:12b, or any compliant host
  • Typed interface: declares which message types it handles; compiler rejects wrong-shape callers
  • Memory: rolling-window or persistent conversation — declared in source, managed by Clan Control
  • Tools: declared capabilities the Clan enforces as policy caps at dispatch time
Never DENSE

Agents have no handler bodies and no state variables. The compiled artifact is a validated JSON manifest. DENSE constraints do not apply.

actor
deterministic compiled code
DENSE · DEMIX · native · Ephernity

Isolated compiled Borz code with typed messages, sequential handlers, and persistent state. The compiler enforces isolation — no shared variables, no global state. May call infer for one typed LLM step (agentic actor) — still an actor, still deterministic core.

  • Write once: same source compiles to all four targets — change the flag, not the program
  • @persistent state: survives restarts and hot-reloads; DENSE snapshot on each dispatch
  • DENSE target: flat ELF, ~50 µs p50 dispatch (single no-op handler benchmark), 2 MiB cap, Ed25519 receipt per call
  • Ephernity target: deterministic smart contract on the Epher Compute Chain
Agentic actor ≠ agent

An actor that calls infer is an agentic actor. Its control logic is still Borz source code. It is not a pure LLM agent.

One typed message bus

Agents and actors communicate over the same typed message system. An actor sends a typed message to an agent — the agent processes it as an LLM call and sends a typed reply back. The compiler checks both sides of every contract at build time.

RiskActor (DENSE) → NarrateAnomaly → AnomalyNarrator (gemma4) → AnomalyReport → AuditActor (DENSE)
Actor compile targets

Write once. Run four ways.

The same actor source compiles to a standalone binary, a supervised microservice, a sub-millisecond nanoservice on bare KVM, or a smart contract on the Epher Compute Chain — without changing the program.

The runtime underneath
DELIGHT — Decent Edge Lightweight Application Server

The platform Borz programs run on in production, with two execution lanes: DEMIX for full microservice VMs and DENSE for bare-metal nanoservices. The compiler emits artefacts DELIGHT knows how to schedule, supervise, and hot-reload.

--target native

Native binary

Single static binary · zero runtime dependencies

  • Compiles to one self-contained Go binary today; MLIR/LLVM lowering planned
  • Built-in CLI and HTTP server — no external runtime needed
  • State auto-persisted as JSON; infer calls any LLM provider
  • Ideal for local tools, CI workers, and serverless functions
--target demix

Microservice — DEMIX

Full Linux VM · supervised lifecycle · hardware isolation

  • DEMIX is Decent Edge's microservice VMM — each actor runs in its own Linux micro-VM
  • Millisecond cold starts; full network stack; hardware-isolated; supervised restart on failure
  • Rolling hot-reload via `borz deploy` without dropping connections
  • Choose when you need a full runtime, POSIX APIs, or unbounded in-memory state
--target dense

Nanoservice — DENSE

No OS · no runtime · KVM directly · sub-millisecond

  • DENSE is Decent Edge's nanoservice layer — each handler is a flat binary on bare KVM
  • ~50 µs p50 dispatch (single no-op handler benchmark); 16 KB binary size; 2 MiB memory cap enforced at compile time
  • Comparable to Microsoft Hyperlight — with a high-level actor language on top
  • Distributed state replication built in; primary/follower failover with zero downtime
--target ephernity
roadmap

Smart contract — Ephernity

Deterministic actor on Epher Compute Chain · attested · auditable

  • Actors with @deterministic and @canonical decorators compile to Epher Compute Chain contracts
  • Every execution is attested via HATP (Hardware Attestation Trust Protocol) signing — tamper-evident, append-only audit trail
  • Actor state is an immutable append-only ledger — write logic once, the chain enforces invariants
  • BLAKE3 + Falcon-1024 signing; spans T0 (seconds) to T7 (eternal) timed-ledger tiers
Examples

Real programs, real short.

Each tab compiles to all targets without changes. examples/ contains the full corpus and forms the test suite.

counter.borz The hello-world of actors: state + handler.
msg Increment:
    by: i64

actor Counter:
    @persistent var count: i64 = 0

    on msg Increment:
        count = count + msg.by
        response(count)
Getting started

60 seconds from intent to artefact.

Borz is a closed-source product of Decent Edge. There is no public source repository, no toolchain to install. The first-touch path is the remote compilation API: submit your Borz program, receive an artefact in seconds. The same API powers the in-browser playground.

1

Try the playground (no signup)

# Open in your browser:
https://play.borz.ai

# Or hit the public anonymous endpoint:
curl -F target=native \
     -F source=@hello.borz \
     https://api.borz.ai/v1/compile
2

Write a Borz program

msg Hello:
    name: str

actor Greeter:
    on msg Hello:
        response(reply="hi, " + msg.name)
3

Request an API key for production

# Sign up at decentedge.com/borz
# You receive a per-tenant key.
export BORZ_API_KEY=de_live_…
4

Compile to your target backend

curl -H "Authorization: Bearer $BORZ_API_KEY" \
     -F target=dense \
     -F source=@hello.borz \
     -o hello.tar.gz \
     https://api.borz.ai/v1/compile

# The tarball ships ELF nanobinaries
# ready to deploy on a DEMIX or DENSE host.
Enterprise option

For air-gapped or latency-sensitive workflows we ship an offline CLI as a signed, hardware-bound binary under a Decent Edge commercial license. The CLI compiles locally without phoning home. Contact decentedge.com to request access.

What comes next

Write actors. Build a Clan.

Borz actors are the code-driven members of a Borz Clan — running alongside AI agents on one unified substrate. Once you write actors in Borz, you can deploy them directly into a Clan via Clan Control.