Fluxon Docs

Introduction

Fluxon is a programming language designed for backend systems that AI agents write well.

What is Fluxon? Fluxon is a programming language designed for backend systems that AI agents write well. Its philosophy: "The language adapts to the AI, not the AI to the language." There is one clear way to do each thing, the syntax uses few tokens, and the things you need most (HTTP server, database, AI/LLM calls, cron, queues) are built into the language — with no package installs.

Fluxon files are saved with the .fx extension.

This site is the complete, detailed human guide. If you want to teach Fluxon to an AI agent, point it at the Agent Spec — or just hand it any page URL: agents and curl automatically receive raw Markdown instead of HTML (see For AI Agents).

Core ideas (read these first)

The 5 principles that set Fluxon apart from other languages:

  1. One task = one way (canonical form). In other languages you can write the same thing 5 ways (while, for, do-while...). In Fluxon there is only each for iteration. There is only one way to print to the screen. The reason for this rule: the AI does not think "which method should I choose?" each time — there is no choice, so there are fewer mistakes.

  2. Few tokens, but readable. The syntax is as short as possible, but not cryptic. Keywords are spelled out in full (each, match, else) — because a human or AI seeing Fluxon for the first time must understand them immediately.

  3. Batteries included (everything built in). http, db, ai, json, cron, queue — all of these are in the standard library. No npm install, no composer require. You just say use http and use it.

  4. AI is a first-class primitive. In other languages, calling an LLM means installing an SDK, configuring a key, and parsing JSON. In Fluxon, ai.json turns text into structured data in a single line and returns a confidence score.

  5. Significant whitespace (indentation). Blocks are separated not by {} braces but by indentation (2 spaces) — just like Python. This removes redundant characters.

A taste of Fluxon

A complete HTTP + database app — no installs, no connection code, no boilerplate:

use http db ai json

tbl notes
  id   serial pk
  text str
  ts   now

http.on :post "/notes" \req ->
  note = db.ins "notes" {text:req.body.text}
  rep 201 note

http.on :get "/notes" \req ->
  rep 200 (db.q "select * from notes order by ts desc")

log "server on :8080"
http.serve 8080

Where to go next

On this page