Two first-class constructs. One .borz source file.
Declare pure LLM agents with a model, persona, and typed interface. Write actors that compile to several targets — native binary (supported), and experimental DENSE and WASM backends (DEMIX is not available yet) — without changing the program. Both constructs share one typed message bus.
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)}") Everything about the language
Tour
Run your first program in 60 seconds: try it inline, install, first steps.
Open →Agents
The agent construct: a pure-LLM persona, model-portable.
Open →Actors
The actor construct: deterministic, typed, compiled.
Open →Compiler
Targets, their honest status, and how to choose one.
Open →Examples
Showcase applications and short real programs.
Open →Playground
Write and run Borz in the browser.
Open →Reference
Specification, grammar and machine-readable files.
Open →Contracts
Typed message contracts between agents and actors.
Open →Editions
Online, Community and Enterprise: how to get Borz.
Open →Why actors
The actor model is older than the web: the rationale.
Open →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 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 per agent; the policy hook checks them where it is installed
Agents have no handler bodies and no state variables. The compiled artifact is a validated JSON manifest. DENSE constraints do not apply.
actor
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: the same source targets several backends — change the flag, not the program; constructs a backend cannot support are refused at compile time, not miscompiled
- →@persistent state: on the native target, only
@persistentvariables survive a restart; DENSE keeps them in a canonical state codec - →DENSE target: flat ELF, 2 MiB cap; experimental target
- →On Epher: any actor can be deployed there; the optional
@deterministicmarker adds a compile-time determinism check
An actor that calls infer is an agentic actor. Its control logic is still Borz source code. It is not a pure LLM agent.
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.
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.