the language · · synced from the layer's source
Genie is the programming language of agentic commerce. Every word it says is a member of the layer's sets; every program compiles to the layer's documents.
- Not from scratch
- A thin surface over three bases: CUE gives the sets (every venue, chain, vault with its caps, product, operation, protocol with its stages, hop, guard) and the shapes a program compiles into; activegraph gives the runtime (the graph is the world, behaviors are physics, the trace is the proof); Motoko gives agents as actors with a total machine.
- The core primitive
- The sale, twelve hops: offer in, classify, listed, hired, delivered, graded, settled, legs, accrued, split, paid, recorded. A hop is a move, a leg is a line of an agreement, a vault is a first citizen with its caps under grid metering, a subscription is a move that renews a period.
- The policy
- No open venue, no undefined definition. A program is refused, with the code and the nearest names, unless every machine is total, every signature stands behind a guard, every money move names a vault within the register's caps on a meter product, every symptom has a fix, every door proposes a next step on every state and ends with a person.
- System One native
assure 0.7on a move asks the judge before it happens; below the score it refuses; the grade is billed on a meter product.- Extensions, never core changes
- A venue or a protocol adds sets and clauses in a pack: a trading venue's time compressor, the layer's on-chain intents, subscriptions. The checker types the arguments; the compiler carries them through.
- Compiled, not promised
- One source → the coord documents (vetted), a runnable agent, collectors, a policy contract, transition tables, an n8n workflow, a Show Me Around tour and this helpdesk's graph. What a compiler cannot honestly produce is said so below.
a program · the checker runs here, in your browser, on the same sets
Write a program. Every refusal names its line, its code and the nearest member of the set.
the sets · what a program may say
The vocabulary is the register. Nothing else is a word.
the compile map · and what is too difficult
From one source to every face of the layer.
| target | what it is | how it is proven |
|---|---|---|
| flow · tour · .cue | the program as the coord language: one #LambdaFlow per agent, one per door with its #TourMeta | cue vet against the package |
| helpdesk | the #HdGraph: product → surfaces → symptoms → fixes, rules, policies, terms — the graphs the studio runs | cue vet; connected from the product |
| .mjs | the runnable agent: guards, the judge, caps per transfer and per day, the carrier, signers, meters; behaviors, fork, diff, replay; one pipe envelope per event; the trace as a twig head | a full sale in the tests; over the cap, below the grade, past a final state refused |
| .py | collectors (header collectors, harvesters) and a mirror of the machine; stdlib only; never a key | compiles, runs, prints its summary |
| .sol | the policy contract: states, allowed moves, guards, caps per settle with a day accumulator; checkSettle a carrier consults; holds and sends nothing | solc --bin |
| .rs | transition tables for the pipe: states, moves, guards, caps, extensions; totality tests | rustc --test green |
| n8n | an importable workflow: trigger, request per read and per op, IF per guarded move; no signer node is ever generated | imports; not executed |
Too difficult, said plainly. Solidity and Rust get policy and tables, not business logic: a compiler cannot write the body of a carrier, a hook or an adapter from a program and must not pretend to. Python gets collectors and a mirror of the machine, never a key. The n8n export is a shape to import. The words a visitor reads are the author's; the compiler never invents copy. There is no tree-sitter grammar yet (Vim and TextMate grammars and a language server are shipped). A partner studio's integration needs their side; this ships the symbols, the language server and the flow documents a studio reads.
the topology · classified from the registers, not by hand
A programmable venue, a genie protocol, a client program, a pack.
- programmable venue
- a row of the venue register with an adapter lane: a program's move names it with
venue; envelopes to it carry the venue. Without an adapter a venue is supply we buy or a directory we list on — a member, never a settle target. - genie protocol
- a program whose agent
follows protocolwith stages in the register and anagreementwith legs: the machine is the register's; the program adds the door, the knowledge, the collectors. Every protocol with a program is automatically a tour and a helpdesk. - client program
- a program without
follows: an agent of ours — a payout, a case, a subscription — that speaks venues and protocols through operations and components and settles through a vault. - pack
- a venue or a protocol's own sets and clauses; the core grammar never changes for it.
the loop · phases, each testable, each confirmed in production before the next
From the language to clients onboarded on the pipe.
the grammar · and the extension packs
Line-oriented. One statement per line. A block is the indented lines under its header.
grammar.ebnf
extension packs
The source of this page is the language's own README and LOOP, synced from the layer's repository at every merge; a check refuses a page that drifts. IDE: a Vim syntax, a TextMate grammar (Zed, VS Code) and a language server whose completions come only from these sets.