03 / Language Reference
Language reference
The specifications live in the RoboLang core repository. This page points to them at a fixed version and gives a short orientation.
The documents linked here are the authority. This website does not restate the
grammar or the rules. If anything on this site disagrees with a specification, the
specification is right. All links point to core commit 6e2c823, release
tag v0.11.0, the version this site was checked against.
Specifications
-
Language reference
Everything a task author needs on one page, tested against the tools. The installed package prints the same text with
robolang reference. -
Language specification 1.1
Source text, tokens, grammar, static rules, the full list of diagnostics, the abstract syntax tree and compatibility with earlier RoboLang sources.
-
Language specification 1.2
What 1.2 adds to 1.1: conditions combined with
and,orandnot, evaluated in three-valued logic. -
Language specification 1.3
What 1.3 adds: a required
goalblock that decides success, the outcome conditionsobject_at,robot_atandholding, and typedsensorparameters. -
Language specification 1.4
What 1.4 adds: bounded
if/else if/elsein plans, with a goal per branch, andfail "reason";for branches that report and stop. -
Language specification 1.5
What 1.5 adds: a failure handler on a step,
<step> else { … }, which runs only when that step fails. -
Language specification 1.6
What 1.6 adds:
measure, typed values with units bound to a name, and comparisons in conditions. A reading near a threshold is unknown and fails closed. -
Language specification 1.7
What 1.7 adds: region limits,
@safety no_go_regionandin_region. Requests checked against the world, never enforced by RoboLang. -
Language specification 1.8
What 1.8 adds: declared actions with
do, from the robot's profile, and the conditionin_stateto verify their result. -
Language specification 1.9
What 1.9 adds: clock readings, the local time of day and the time elapsed, read with
measureand compared in conditions. -
Language specification 2.0
What 2.0 adds: the mission layer. A
missionrepeats bounded, verified task runs with a hard bound, an optionaluntil, andstop,continueorretry Non a failed run. -
Language specification 2.1
What 2.1 adds: incoming messages,
message_received "CH"with an optional exact text, in apre, anif, await untilor a mission'suntil. -
Language specification 2.2
What 2.2 adds: four more kinds for
measure,fillandconfidencein%,pressureandcount. -
Language specification 2.3
What 2.3 adds:
choose, which binds a name to one robot, object or location when the job runs, from a list,objects ata place orrobots, optionally narrowed by a condition on world facts and ordered by distance. -
Language specification 2.4
What 2.4 adds: the robot's own charge, read with
measure r charge as c;in%, and the liverobot_charge rin await untiland in a mission'suntil. -
Grammars (EBNF)
The syntactic and lexical grammar in ISO-style EBNF, including the reserved words: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3 and 2.4.
-
IR schemas
The versioned JSON produced by
robolang inspect --json. Task IR 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11 and 1.12, and Mission IR 1.0 to 1.4 for files with missions. The IR reader defines how--irreads it back and re-validates it. -
Simulation semantics
What
robolang simulatedoes: executor states, goal checking, decisions in branching plans, missions, world file 1.0 to 1.9, run record 1.0 to 1.12 and mission record 1.0 to 1.4. -
Decisions
The recorded design decisions behind the specifications, for example language 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3 and 2.4. All of them are in the decision records.
Experimental: Core 0.1 and 0.2
Core defines what AI agents and robots exchange, separately from the .rob language.
Core 0.1 and 0.2 are drafts, implemented as per-message checks and exercised in simulation
only, by export-goal, delegate and the reference simulation. Core
0.1 is the default; --core 0.2 opts in. An independent Core 0.2
implementation passed the Gate 2 interoperability test on 2026-11-10. Core is not a
network protocol, and a valid Core document is never permission to operate a robot.
-
Core 0.1 and Core 0.2
Goals, capabilities, messages, authority, commitments and custody, and evidence-backed outcomes, with the order in which a receiver checks each message and its rejection codes. Core 0.2 adds alternatives,
met_alternativeanddeclaredfacts. -
Core schemas
JSON Schema draft 2020-12: the message envelope for A2R and R2R exchanges (0.1, 0.2), and the capability descriptor.
-
From a task to Core
How a task's goal becomes a Core
propose_goal(export-goal), and howdelegateruns it on a robot's own plan, with a peer robot, commitment, lease and custody (on Core 0.2). -
Reference simulation 0.1
The RFC-001 scenario run by
robolang arch02: participants, symbolic world, behavior rules and the failure variants. -
Evidence
The signed-off exit gates: Foundation 1, RL-ARCH-02 gate 1 and Gate 2, independent interoperability on Core 0.2.
-
Physical-run authorization 0.1
A signed cell configuration, task approval and run grant, and the check of the whole chain. Even a valid chain ends in
A731: physical mode is not enabled.
Orientation
This summary is informal and only meant to help you find your way around the specification. See the Examples page for complete files.
-
A file contains one or more tasks, optionally preceded by a version marker
such as
robolang 2.4;. Without a marker a file is 1.1. From 2.0 a file can also contain missions, which repeat its tasks within a hard bound. -
A task has typed parameters:
robot,object,locationandregion, and from 1.3 alsosensor. -
A task may carry
@safetyannotations and apreblock of conditions, and must have aplanblock with at least one statement. From 1.3 it must also have agoalblock, which decides whether a run succeeded. -
The steps are
move,grasp,place,inspect,waitandcommunicate, plusmeasurefrom 1.6,do(a declared action) from 1.8 andchoosefrom 2.3. From 1.4 a plan can also branch withif/else, nested at most four deep, and end a branch withfail; from 1.5 a step can have its own failure handler. -
The conditions are
robot_ready,region_clear,object_existsandsensor_ok, and from 1.3 the outcome conditionsobject_at,robot_atandholding. From 1.2 they can be combined withand,or,notand parentheses. Later versions add comparisons of measured values (1.6),in_state(1.8) andmessage_received(2.1) androbot_charge(2.4). - Comments start with
//and run to the end of the line.
Diagnostics
Every problem the tools report has a stable code and a file:line:column position.
The specification lists each code and its meaning.
| Codes | Kind | Example |
|---|---|---|
E1xx | Lexical errors | An unterminated string |
E2xx | Syntax errors | E202, a missing semicolon |
E3xx | Static errors | E303, an undeclared name |
W4xx | Warnings | W401, max_speed without a unit |
What the rules do not cover
The language specifications define what a well-formed task file is, and the simulation specification defines how a task runs against a symbolic world. Neither defines how a named location becomes a motion or how a safety limit is enforced on a robot. Those semantics are not specified or implemented. Validation covers the text of the program only.