Cyra is a statically typed, LLM-first language that compiles to BEAM bytecode. One syntax. Zero ambiguity. Full Erlang power.
What is Cyra?
A language with exactly one way to express each construct, so every generated token carries maximum confidence.
C-like braces and semicolons. One canonical form per construct. Maximizes per-token confidence for code generation models.
Every parameter and return type declared explicitly. Hindley-Milner verification under the hood. No guessing.
Actors, fault tolerance, hot code reload, distribution. All of Erlang/OTP without learning Erlang syntax.
@pre, @post, @invariant
annotations. Machine-verifiable correctness from day one.
See it in action
A process loop with typed functions, pattern matching, and message passing — all in familiar syntax.
module MyApp.Counter {
use IO;
// Process loop with state via recursion
fn counter_loop(count: int) -> void {
receive {
:increment => counter_loop(count + 1);
(:get, caller) => {
send(caller, (:count, count));
counter_loop(count);
}
:stop => :ok;
}
}
pub fn start() -> pid {
spawn(fn() -> void { counter_loop(0); });
}
@pre(n >= 0)
pub fn format_count(n: int) -> string {
"count: " <> Int.to_string(n);
}
}
Use cases
LLMs produce entire BEAM services with zero syntactic ambiguity. One canonical form means every generated token is high-confidence.
@pre/@post contracts and exhaustive
pattern matching make formal verification a first-class citizen.
BEAM actors and lightweight processes. Millions of concurrent connections with fault-tolerant supervision trees out of the box.
CI agents generate, verify, and hot-reload Cyra modules without human intervention. Deterministic syntax eliminates formatting passes.
OTP distribution, node discovery, and global process registries. Multi-node systems that self-heal across data centres.
One-to-one mapping between syntax and semantics lets static analysers and LLM reviewers reason with mathematical precision.
Honest positioning
Cyra is purpose-built for LLM code generation targeting the BEAM. It isn't trying to replace Python or JavaScript.
Elixir is brilliant for human developers. Cyra is designed for machines that generate and verify code autonomously.
Cyra compiles to BEAM bytecode via Core Erlang. It runs on the same VM that powers Discord, Ericsson, Heroku, Nintendo, and Cisco and many other great products and companies.
Targets production OTP applications with supervisors, GenServers, hot code reload, and distributed clustering.
Design philosophy
"One form, one meaning"
Inspired by Leibniz's Characteristica Universalis. Every construct has exactly one syntactic representation, eliminating ambiguity for both machines and humans.
"Machines that reason"
Designed for automated generation and verification. The type system, contracts, and deterministic syntax make it possible for LLMs to produce provably correct code.
"Standing on giants"
The BEAM VM is battle-tested across decades of telecom and distributed systems. Cyra inherits all of it — actors, fault tolerance, hot upgrades — with a syntax machines prefer.