AI as a component. Not an oracle.
CX+AI treats a local small language model as a deterministic, observable component of a running program — not a remote service you rent by the token. Write one line; an entity in your game or application behaves autonomously. Then ask the toolchain to show you — in source code — exactly what its AI wrote.
- Download the folder for your platform
- Run its installer:
sh ./install.sh— on Windows,install.ps1 - Write a file and run it:
cx hello.cx --run
Free to use, including commercially — the licence, and what we claim and what we don’t.
// AI-authored rule on 'guard' — decompiled from the register VM { float d = distance(e["x"], e["y"], player["x"], player["y"]); if (d < 120) { e["state"] = "pursue"; } else { e["state"] = "patrol"; } }
That second panel is the point. AI-written behaviour runs in a bounded region executed by a compact register VM — and the bytecode it produced decompiles back to readable source with cx --decompile, whenever you want to audit what your program was told to do.
Six doors. Open any of them.
Click a card — it leaves the grid and expands.
Esc or the backdrop sends it home.
What CX+AI is
C, expanded. The same power, far less ceremony.
CX+AI compiles to C. Strings, lists, maps and json are first-class
values — no malloc, no length bookkeeping, no free —
and every escape hatch of C stays reachable, including literal C through
_C{}. The source stays flat; nothing is taken away to get there.
Two recent examples of what that principle buys. A handle answers questions
about itself in one spelling — doc->count,
doc["servers"]->type — which cost nothing at run time and made a
whole family of footguns unwritable rather than merely fixed. And a json
document or a rule body can now be written as itself, in
braces, and is parsed at build time: a typo is an error on
that source line instead of a surprise while the program is running.
Behaviour written while it runs
A rule is a string. A model can write it.
A CX+AI rule is a short C body over an entity, and it is data —
a string the program can swap while it runs, from a config file or from a
model, with no recompile. aiRule(entity, schedule, trigger, prompt)
turns a sentence of English into behaviour that runs on its own schedule.
CX+AI compiles that rule in-process, through its own assembler,
to register-VM bytecode. There is no system(), no
popen, no dlopen anywhere on that path — which is
why it works in places that have no toolchain installed at all.
It is not a slow path. A two-phase rule bakes an authored catalogue into typed slots once, then reads baked numbers per event: measured on a stock-control workload with honest string-key lookup in the hot loop, that runs within about 1.3× of hand-written native C — roughly five million events a second on the VM.
Write CX+AI, press Run
Curated examples, or your own program.
The register VM compiled to WebAssembly, running in your own tab. The server compiles and stops there — it never executes what you wrote. Your program runs on your machine, and if you write an infinite loop the only thing you can hang is your own worker thread, which the page kills for you.
Examples come levelled simple, medium and advanced, including the one that matters most: a rule written as a string while the program is running, compiled on the spot, changing a live entity.
Open the playgroundWindows, Linux, macOS
Installable today, free to use.
Each platform gets a complete drop-in folder: the cx binary, a
prebuilt runtime library, public headers, and a one-command installer that
proves itself with a real build before it claims success. Windows is
self-contained with graphics on; Linux and macOS use the platform's own
system libraries, from a list measured on the real link rather than guessed.
Free to use, including commercially, with credit to CX+AI for bundled material. It is not open source: you get binaries, headers and examples — the compiler and runtime source stay private.
Get CX+AIManuals that check themselves
Generated from the source that implements them.
Eight reference manuals ship with the release, and each one is generated from a checked source: a manual that names a builtin which does not exist is refused publication rather than quietly shipped.
The builtins reference is the one to start with. It counts itself, and it states its own coverage rather than implying completeness: every one of the 882 builtins the compiler accepts has a row, across 35 families, and 882 of those rows carry a description verified against the C source. A manual that tells you what it has not covered is worth more than one that doesn't.
Read the manuals Builtins referenceWhat comes next
The demo being built to push CX+AI under load.
Gigantica is the showcase — a 3D game with a particle system, world-space effects and AI-driven entities, built in CX+AI to find out what the engine does when it is genuinely worked. It ships alongside the release.
There is no launch date on this page and no demo promise. CX+AI itself is downloadable today; Gigantica is the thing to follow.
Follow the buildA complete stack, written in pure C.
Compiler, IDE, 2D/3D game engine with a particle system, and an embedded AI subsystem — one codebase, native ahead-of-time compilation for your code and a compact register VM for the AI's. Windows, Linux and macOS, native and VM, with identical output. CX+AI is C-compatible: everything C can do, CX+AI can do, with less ceremony.
We are members of the Kwaai community and share its conviction that AI should be personal, local and open to inspection.
What you get
Nine of them. Click any card to open it.
A language, not a framework
C-compatible, compiled ahead of time.
CX+AI compiles to C and links as a native binary. Strings, lists, maps and
json are first-class values, so there is no malloc, no
length bookkeeping and no free to get wrong — and every escape hatch
of C stays reachable, including literal C in a _C{} block.
Nothing is taken away to make it easier. That is the whole design constraint.
json doc; doc["servers"][0]["host"] = "alpha"; // levels made on demand print(doc->count); // prints 1 — the handle knows itself
AI as a component
One line, and an entity behaves on its own.
An aiRule attaches a model to an entity with a schedule and a trigger.
The model has a defined place in the run loop — it is a component, not a service
call bolted to the side of your architecture.
Ten providers are supported, including fully local ones, so a program can ship with no external dependency and no per-token cost.
// guard is an entity; 0 = every frame, "" = no extra trigger aiRule(guard, 0, "", "pursue the player when within 120 units; otherwise patrol");
Auditable by design
Read back what the AI actually wrote.
AI-authored behaviour compiles to bytecode for a compact register VM and
runs inside a bounded region. cx --decompile turns that bytecode back
into readable source.
So what is my program being told to do? is a question with an answer you can read, at any time, rather than a matter of trust.
Two modes, one language
Native AOT for your code, VM for the AI's.
Your code is compiled ahead of time to native machine code through C. The AI's regions run in the register VM, because they must stay inspectable and replaceable while the program is running.
Same language, same source, same results. The split is about who wrote the code, not about what it can do.
The same answer everywhere
Windows, Linux, macOS — native and VM.
All three platforms are built and tested, and the native and VM paths are held to identical output rather than merely "both working".
Over 300 automated tests run against that promise. A divergence between two backends is a failure, not a footnote.
A 2D and 3D engine
With a particle system, in the box.
The gpu_* API covers 2D and 3D rendering with world-space particles.
Both GPU and CPU are supported natively. Drawing runs on the graphics card, but the image pipeline has a separate pure-CPU path that needs no window at all — so images can be loaded, treated and inspected headlessly, at build or design time, and only uploaded as textures when something is actually drawn.
Images can be tagged with a treatment class and the loader applies its recipe on load — alpha synthesis, edge cleanup, filtering — so the handling a sprite needs is stated once as data instead of repeated at every call site.
// pure CPU: no window, no graphics card needed gpu_image_load_as("hero.png", "sprite_clean");
Batteries actually included
Networking, archives, JSON, rules.
HTTP, FTP, SFTP, SSH and email; compression and archives; a rules and automation engine; and JSON with auto-vivification, so building a nested document does not mean creating each level by hand first.
These ship with the compiler rather than arriving as a package manifest.
sBody.s = httpGet("https://example.com/status.json"); json j = jsonParse(sBody); print(j["state"]); targz("backup.tar.gz", "./data");
The 35 component families, with the number of described builtins in each. These are the reference's own counts.
35 families · 882 described builtins — the counts above add up to exactly the number on the tile.
Browse them allManuals that refuse to lie
Generated from the code they document.
Eight reference manuals are generated from checked sources. A manual that names a builtin which does not exist is refused publication rather than quietly shipped.
The builtins reference states its own coverage — 882 of its 882 rows carry a verified description — instead of implying it covers everything.
Read the manuals Builtins referenceRun it without installing
Write CX+AI in the browser and press Run.
There is nothing to download and nothing to set up. Open the playground, type a program, press Run, and the answer appears — on your own machine, in the page you are already looking at.
Your program never runs on our computers. We only turn it into something your browser can run, and your browser does the rest. It is a good way to find out whether you like the language before installing anything.
print("hello from a browser tab"); n.i = 0; for (i.i = 1; i <= 10; i = i + 1) { n = n + i; } printf("1..10 sums to %d\n", n);
The server runs cx --emit-risc and returns bytecode for the
compact register VM; that VM, compiled to wasm32, executes it in a Worker in
your tab. The sandbox boundary is stated rather than faked — system()
stops with CX-E5037 naming the capability instead of inventing a
return value, and _C{} blocks stop with CX-E5003 because
literal C needs a native binary. File and ai* builtins are refused at
compile time, which is the same answer a native cx --runvm gives.
It speaks your language
Five, and not just in the compiler.
Compiler messages come in English, Spanish, French, German and Italian. Pick one, or let it follow the language the computer is already set to.
It does not stop at the compiler. The choice is built into the program you produce, so a CX+AI application you ship reports its own errors in your user's language — without you writing a single translation.
// one broken line, compiled five times EN error: CX-E0001: expected ')', got EOF ES error: CX-E0001: se esperaba ')', se obtuvo EOF FR error: CX-E0001: attendu ')', obtenu EOF DE error: CX-E0001: ')' erwartet, EOF erhalten IT error: CX-E0001: atteso ')', ottenuto EOF
The code is the same in every one. Translate
the sentence, never the identifier — so a search for CX-E0001 finds the
same answer whichever language it was read in.
One catalog serves both the compiler's diagnostics and the compiled
program's runtime errors: one row per message, one column per language, English at
index 0 and the fallback for any untranslated cell. Select with
#pragma cxlanguage IT or -P cxlanguage=auto, which
detects the locale through portable getenv rather than a platform API.
emit_c bakes the choice into the generated main(). Adding
a language is one enum value and one column.
Built by people who build runtimes.
Terence Agius
Thirty-five years building runtime and VM systems. Sole technical author of the CX+AI platform — compiler, engine, and AI subsystem.
Walter Lundari
Marketing, partnerships and European regulatory engagement. A degree in AI and telecommunications, with a career spanning industry and academia — he ran a web design and e-commerce business in Milan for many years, and now works as a consulting lecturer.
Follow the build.
CX+AI is already downloadable for Windows, Linux and macOS. What comes next is Gigantica — the ambitious demo we're building to show what CX+AI actually does under load. Leave an email and we'll send you its progress. Nothing else; no newsletter carpet-bombing.
Form not working? Email us directly: hello@cxai.plus
Or just watch: every arc dispatched and shipped, updated as it happens.
CX+AI doesn't reinvent the wheel. It is the wheel.
CX+AI is built by one person. Using it and saying what happened — what worked, what broke, what was missing — is the most useful thing anyone else can do.
Ways to help →

