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

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 1.6 language reference shipped in the package 0
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.
  • @safety max_speed is checked against the robot's profile and recorded, never enforced.

Specifications: 1.1 (grammar), 1.2 (grammar), 1.3 (grammar), Task 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/
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 branching, loops or local bindings yet (planned language extensions).
  • The original v1 interpreter and ROS 2 adapter live in legacy/. They bypass the validator, are never installed and were never validated against ROS 2 (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. Acceptance run (set 3 under 1.4) pending
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). The language reference and benchmark prompts still teach 1.4
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; the acceptance run is pending
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 Bundle frozen 2026-10-28. INTEROP-3 deferred until a real second implementer (Core 0.2 is now frozen) (0023)
.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/.

robolang --version prints three independent versions: the Python package (0.3.0, alpha), the language (1.1 to 1.6) and the Task IR schema (1.0 to 1.5, one for each language version).

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.3.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.3.0
File Size Uploaded Provenance Actions
robolang-0.3.0.tar.gz 685.7 kB With provenance Details for robolang-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 854.3 kB

Release files / robolang-0.3.0.tar.gz

Download URL robolang-0.3.0.tar.gz
Size 685.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24f8b0b13737a4a515b2d0dc23b9c6c844fe286328a84b8317738d228db5d73f
BLAKE2b-256 checksum
How to use checksums
1a47d050e1cd3baba614c8c591e2a4c33158c5e103e83522600bf8b10bdc4b0a
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 11, 2026.

Transparency log

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

Download URL robolang-0.3.0-py3-none-any.whl
Size 168.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1d6e881b850015737658d8283c3c3f56c017fb7bd5b50840df50c5138a1c49e
BLAKE2b-256 checksum
How to use checksums
9b0df91b57f0176ec3384a787085e9eeb9f561153e2478690604b68e40a1e810
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 11, 2026.

Transparency log

Security for robolang 0.3.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.3.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 11, 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