Skip to main content

version python license stars forks

RoboLang — An AI-native language and interoperability foundation for robots.
Built by @rokorobot

RoboLang Logo


RoboLang

RoboLang is a task language for robots, written mainly by AI systems and reviewed by people. A task declares what must be true before it starts, the goal it must achieve, the steps to take, and safety limits. RoboLang checks the task statically and runs it in a deterministic, symbolic simulation. A run succeeds only when the goal is verified in the final world, not merely because the steps ran.

⚠️ Simulation only. Physical robot execution is not implemented or authorized. RoboLang does not replace ROS 2, MoveIt 2, Nav2 or hardware safety controllers. Do not run it against real hardware.

Created and maintained by Robert Konecny (@rokorobot). Licensed under Apache 2.0.

Quickstart

You need Python 3.11 or newer. No ROS 2, no robot, no other packages.

python -m pip install robolang
robolang reference          # the language reference: everything a task author needs
robolang validate FILE.rob
robolang example            # writes fetch.rob and world.json, the two files below

A verified run in two files

Nothing but the installed package is needed. robolang example writes both files into the current directory (or robolang example DIR); or save this task as fetch.rob:

robolang 1.6;

task fetch(robot r, object box, location src, location dst) {
    pre { robot_ready r; }
    goal { object_at box dst; }
    plan {
        move r to src;
        grasp r box;
        move r to dst;
        place r box at dst;
    }
}

and this world as world.json. A world file lists the locations, robots and objects, and binds each task parameter to one of them (format):

{
  "world_schema": "robolang.sim.world",
  "world_schema_version": "1.2",
  "locations": ["home", "shelf", "table"],
  "robots": { "arm1": { "ready": true, "location": "home", "gripper": true } },
  "objects": { "box1": { "present": true, "location": "shelf" } },
  "tasks": { "fetch": { "bindings": { "r": "arm1", "box": "box1", "src": "shelf", "dst": "table" } } }
}
robolang validate fetch.rob --world world.json
robolang simulate fetch.rob --world world.json    # stderr: simulation only: run sim-…: SUCCEEDED

Delete the place line and run simulate again: every step still succeeds, but the run ends FAILED (S301): a goal condition is false after the last step.

Tried it? If the quickstart took you more than ten minutes, or you got stuck anywhere, open an issue and say where. First-run friction is a bug here.

More examples

The examples and test worlds live in the repository:

git clone https://github.com/rokorobot/RoboLang.git
cd RoboLang
python -m pip install .     # or use the robolang installed from PyPI

robolang validate examples/handover.rob
robolang inspect  examples/handover.rob --json
robolang simulate examples/handover.rob --world examples/world.json

simulate prints simulation only: run sim-…: SUCCEEDED, then the run record as JSON. The same commands work from a clone without installing: python src/robolang validate FILE.rob. Add --world WORLD to validate to also catch, before any simulation, failures a run would certainly hit in that world: a speed limit above the robot's profile, a grasp without a gripper, a sensor on another robot.

Bind task parameters on the command line instead of in the world file (FILE comes first):

robolang simulate examples/handover.rob --world examples/world.json \
    --bind arm=arm1 mobile=amr1 box=box1 src=shelf handoff=handoff dst=table zone=handoff_zone
Command What it does Exit status
reference Prints the tested RoboLang 2.1 language reference shipped in the package 0
example [DIR] Writes the sample task fetch.rob and world world.json; never overwrites a file 0 written, 2 a file exists
validate FILE Checks the file and prints every diagnostic (up to 50) as file:line:column: error[CODE]: … 0 valid, 1 invalid, 2 usage error
inspect FILE [--json] [--task NAME] Validates, then shows the tasks as text or as Task IR JSON as validate
simulate FILE --world W [--task NAME] [--bind P=ID …] Runs one task against a world file in a symbolic simulation; the same inputs give a byte-identical run record 0 succeeded, 1 invalid source, 2 usage, 3 invalid world, 4 failed, 5 cancelled
export-goal FILE --world W --from AGENT [--to ROBOT] [--bind P=ID …] [--core 0.2] Turns a 1.3 task's goal into a signed Core 0.1 propose_goal message (simulation-only signature) 0 printed, 1 invalid source, 2 usage, 3 invalid world, 6 goal has no Core form
delegate FILE --world W --from AGENT --to ROBOT [--plans PATH …] [--lease D] End to end: the planner sends the task's goal; the robot matches it (in any order) to a plan in its own .rob library, runs it, and returns a Core outcome; the planner checks the evidence itself. A plan with a second robot brings it in as a peer: commitment with a lease, then custody transfer before the peer's steps (spec) 0 verified success, 4 failed or unknown, 7 rejected; others as export-goal
arch02 --scenario S --cases C --case NAME Runs one case of the Core 0.1 reference scenario (AI planner, arm and mobile robot exchanging signed messages) 0 ran, 2 usage, 3 invalid input

Every command that reads a .rob file also reads Task IR JSON instead: --ir FILE.json. The IR is re-validated from scratch; its version claims are never trusted (spec).

Validation and simulation say nothing about whether a task is safe on a real robot.

The language

robolang 1.3;

task handover(robot arm, robot mobile, object box, location src, location handoff, location dst, region zone) {
    @safety max_speed 0.5 m/s;

    pre {
        robot_ready arm;
        robot_ready mobile;
        object_exists box;
    }

    goal {
        object_at box dst;
    }

    plan {
        move arm to src;
        grasp arm box;
        move arm to handoff;
        place arm box at handoff;
        communicate arm to "fleet" with "BOX_AT_HANDOFF";
        wait until region_clear zone timeout 30s;
        move mobile to handoff;
        grasp mobile box;
        move mobile to dst;
        place mobile box at dst;
    }
}
  • Parameters are typed (robot, object, location, region, sensor) and bound to world IDs at run time, so one task runs in many worlds.
  • Goals decide success. After the plan, every goal condition is checked against the final world: all true → SUCCEEDED; any false → FAILED (S301); otherwise unknown → FAILED (S302). Goal conditions: object_at, robot_at, holding, plus every precondition form.
  • Preconditions fail closed. Logic is three-valued: a false or unknown condition stops the run.
  • Steps: move, grasp, place, inspect … using, wait for, wait until … timeout, communicate. Plans are sequential.
  • Versions: unmarked files are 1.1. robolang 1.2; adds and, or, not. robolang 1.3; adds the required goal block, the outcome conditions and sensor parameters. robolang 1.4; adds bounded if/else and fail; robolang 1.5; adds step failure handlers (<step> else { ... }); robolang 1.6; adds measured values (measure, comparisons). robolang reference teaches 2.1; robolang 1.7; adds region limits (@safety no_go_region R;, @safety in_region R;); robolang 1.8; adds declared actions (do r open door;, in_state door "open"); robolang 1.9; adds clock readings (measure r time as t;, 22:00, clock_time); robolang 2.0; adds missions (mission, repeat, run, until, on failure); robolang 2.1; adds incoming messages (message_received "line" with "DOCKED", declared channels and senders in the world).
  • @safety max_speed is checked against the robot's profile and recorded, never enforced.

Specifications: 1.1 (grammar), 1.2 (grammar), 1.3 (grammar), 1.4 (grammar), 1.5 (grammar), 1.6 (grammar), 1.7 (grammar), 1.8 (grammar), 1.9 (grammar), 2.0 (grammar), 2.1 (grammar), Task IR, Mission IR, simulation, world file and run record.

How it fits together

.rob source ─ lexer + parser ─ validator ─ Task IR (JSON) ─┬─ symbolic executor ─ run record (JSON)
                                                          world file
Component Where
Lexer, parser, validator src/robolang/lexer.py, parser.py, validator.py
Task IR src/robolang/ir.py
Symbolic executor and run records src/robolang/sim/
Core 0.1 message checks (schemas, canonical JSON, simulation-only signatures) src/robolang/core/
Core 0.1 reference simulation src/robolang/arch02/
Task IR reader and re-validator (CORE-1) src/robolang/ir_reader.py
.rob → Core bridge, export-goal, delegate src/robolang/bridge.py, export_goal.py, delegate.py, delegate_peer.py
Interoperability test harness (gate 2) src/robolang/interop/ (repository only: not part of the installed package)
CLI src/robolang/cli.py

RoboLang Core 0.1 is a separate, draft layer: a JSON message envelope and capability descriptor for AI-to-robot and robot-to-robot exchanges, with authority, custody and evidence-backed outcomes. It runs only inside the arch02 reference simulation.

The bridge from .rob to Core (plan) is built, in simulation. Goal conditions object_at, robot_at and holding map to Core located_in and carried_by facts (src/robolang/bridge.py). export-goal sends a task's goal as a Core propose_goal, and every 1.3 run record ends with core_outcome: a Core outcome with signed observations as evidence. delegate closes the loop: the goal crosses as a Core message, the robot runs its own .rob plan (plans never travel, Core decision R3), and the planner accepts succeeded only after re-checking the signed evidence (spec):

robolang delegate examples/handover.rob --world examples/world.json \
    --from rl:agent:planner-1 --to rl:robot:arm1 --plans examples/plans
# simulation only: delegate rl:goal:handover → rl:robot:arm1: succeeded (verified)

See Core 0.1, the reference simulation and RFC-001.

Limitations

  • Symbolic world only: facts such as location, holding, readiness and region status. No motion planning, kinematics, collisions or physics. Only wait steps advance time.
  • Speed limits are recorded, not enforced.
  • No hardware, no ROS 2 runtime, no network transport. Core signatures are simulation-only.
  • No loops: branching is bounded (if, 1.4) and a retry is written by nesting (1.5); unbounded loops and schedules stay with the orchestrator.
  • The original v1 interpreter lives in legacy/ as a compatibility fixture. It bypasses the validator, is never installed and only prints; its ROS 2 adapter was removed in 2026-11 (details).

Status and roadmap

Area State
Language 1.1, 1.2 and 1.3 (goals, typed sensors), validator, Task IR Delivered
Language 1.4 (bounded if/else, fail; 0027): validate, inspect, Task IR 1.3 Complete in code: front end, simulate, export-goal and delegate run branching tasks (record 1.3, simulation 12), validate --world checks every path, language reference and benchmark scoring per path. Accepted 2026-10-30 on set 3 (evidence)
Language 1.5 (failure handlers <step> else { ... }; 0033): validate, inspect, Task IR 1.4 Front end and simulation complete in code (record 1.4, simulation 13). Taught by the language reference and benchmark prompts; accepted 2026-11-09 on set 4 (evidence)
Language 1.6 (measured values: measure, comparisons, live readings in wait until, typed communicate; 0036): validate, inspect, Task IR 1.5, world file 1.2 Front end, IR reader, simulate (record 1.5, simulation 14) and validate --world complete in code. delegate and the ROS 2 backend refuse a measure. The language reference and benchmark prompts teach 1.6 since 0036 PR 2; accepted 2026-11-10 on set 5 (evidence)
Language 1.7 (region limits: @safety no_go_region R;, @safety in_region R;; 0039): validate, inspect, Task IR 1.6, world file 1.3 Front end, IR reader, simulate (record 1.6, simulation 15) and validate --world complete in code. A region limit is a request, checked against the world and never enforced. delegate, export-goal and the ROS 2 backend refuse a task with one. The language reference and benchmark prompts teach 1.7 since 0039 L4; acceptance on set 6 is the next step (plan)
Language 1.8 (declared actions: do r ACTION TARGET [to VALUE];, in_state X "label"; 0040): validate, inspect, Task IR 1.7, world file 1.4 Front end, IR reader, simulate (record 1.7, simulation 16) and validate --world complete in code. A do is a request to the robot's own controller, declared in its profile; only the goal's in_state counts. delegate, export-goal (a goal with in_state) and the ROS 2 backend refuse. The language reference and benchmark prompts teach 1.8 since 0040 L4; acceptance on set 7 is the next step (plan)
Language 1.9 (clock readings: measure r time as t;, measure r elapsed as d;, time literals 22:00, live clock_time in wait until; 0042): validate, inspect, Task IR 1.8, world file 1.5 Front end, IR reader, simulate (record 1.8, simulation 17) and validate --world complete in code. One day only; a time reading with no world clock fails closed (S237); a wait for a time that has already passed fails before the run (S010). The ROS 2 backend refuses a clock reading (S510). The language reference and benchmark prompts teach 1.9 since 0042 L4; acceptance on set 8 is the next step (plan)
Language 2.0 (missions: mission NAME(params) { repeat ... { run task(args); } until ...; on failure { ... } }; 0041): validate, inspect, Mission IR 1.0, mission run record 1.0 Front end, IR reader and simulate --mission (simulation 18) complete in code. A mission runs tasks one after another in one world; every repeat has a hard bound; each task run is a complete verified run; the mission ends completed, bounded, failed or stopped. A robot never receives a mission: export-goal, delegate (X607) and the ROS 2 backend (S514) refuse it. The language reference and benchmark prompts teach 2.0 since 0041 L4; acceptance on set 9 is the next step (plan)
Language 2.1 (incoming messages: the condition message_received "CH" with "TEXT" in pre, if, wait until and a mission's until; 0043): validate, inspect, Task IR 1.9, Mission IR 1.1, world file 1.6 Front end, IR reader, simulate (record 1.9, simulation 19) and validate --world complete in code. A message counts from the start of the run and only from a sender the world declares for its channel; a world with no channels has no message service and fails closed; never in a goal. Delivery, "for each message", the content of a message and patterns are not in 2.1. delegate (X608) and the ROS 2 backend (S515) refuse a message wait. Taught since 0043 L4: the language reference and the benchmark prompts teach 2.1; acceptance on set 10 is the next step (plan)
Simulation-only execution (simulate) Delivered, signed off 2026-10-27 (evidence)
Core 0.1 reference simulation (arch02) Implemented, gate 1 signed off 2026-10-27 (evidence)
Core 0.2 (alternatives, met_alternative, declared; 0028, spec) Frozen 2026-10-30: schema, robolang.core checks, fixtures, and opt-in --core 0.2 on simulate, export-goal and delegate. Core 0.1 output is unchanged and the default
Gate 2 independent interoperability Passed 2026-11-10, signed off by the owner: an independent Core 0.2 amr-07, written by a clean-room AI session from the frozen bundle, passes 25/25 cases after erratum 0037 (evidence). Caveat: network and search were not technically blocked; no human or outside implementer yet
.rob → Core bridge Delivered in simulation: Core-shaped outcomes, export-goal, delegate with a peer robot, commitment, lease and custody (plan)
CORE-1, Task IR reader Delivered: --ir on every command (0021)

Every implementation item needs owner approval. The full plan and history are in the development plan; decisions are in spec/decisions/. How the language evolves with robot activities: the language evolution strategy and its humanoid activity plan.

robolang --version prints three independent versions: the Python package (0.8.0, alpha), the language (1.1 to 2.1), the Task IR schema (1.0 to 1.9) and the Mission IR schema (1.0 and 1.1).

Contributing

Pull requests are welcome. Keep each change small, with CI passing. New syntax, IR kinds and Core schemas need a versioned specification and an owner decision first.

python -m pip install -r requirements-dev.txt
python -m pytest -q
python -m ruff check .
python tools/smoke_install.py   # builds and installs the wheel and sdist into fresh venvs; needs network

Tests marked xfail describe planned behaviour. Report problems in Issues. Documentation site: rokorobot.github.io/RoboLang.

License

Licensed under the Apache License 2.0: free to use, modify and distribute in open or commercial robotics projects.

Metadata

Release files for robolang 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robolang 0.8.0
File Size Uploaded Provenance Actions
robolang-0.8.0.tar.gz 938.4 kB With provenance Details for robolang-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robolang 0.8.0
File Interpreter ABI Platform Actions
robolang-0.8.0-py3-none-any.whl Python 3 none any Details for robolang-0.8.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / robolang-0.8.0.tar.gz

Download URL robolang-0.8.0.tar.gz
Size 938.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a63b672ab2b6294b081d0fab4830e72278f8b37940942dfb0d2dd9077b322c88
BLAKE2b-256 checksum
How to use checksums
c3347d0b7ecbcc7a38d2fca72ab4eef7b30989a555d3ee31554ec89b4610c086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / robolang-0.8.0-py3-none-any.whl

Download URL robolang-0.8.0-py3-none-any.whl
Size 225.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96eef29c839afee410ab2ece380b090e9ce49c153b7c5ab27d1ff68bcb2052bf
BLAKE2b-256 checksum
How to use checksums
6f60769ff4f43252af15124659a93e747c8bfaae94324ff542125f40c462ea80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for robolang 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for robolang-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page