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

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.

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, location and region, and from 1.3 also sensor.
  • A task may carry @safety annotations and a pre block of conditions, and must have a plan block with at least one statement. From 1.3 it must also have a goal block, which decides whether a run succeeded.
  • The steps are move, grasp, place, inspect, wait and communicate, plus measure from 1.6, do (a declared action) from 1.8 and choose from 2.3. From 1.4 a plan can also branch with if / else, nested at most four deep, and end a branch with fail; from 1.5 a step can have its own failure handler.
  • The conditions are robot_ready, region_clear, object_exists and sensor_ok, and from 1.3 the outcome conditions object_at, robot_at and holding. From 1.2 they can be combined with and, or, not and parentheses. Later versions add comparisons of measured values (1.6), in_state (1.8) and message_received (2.1) and robot_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.

CodesKindExample
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.