AAAI-27 Lab · Half day of lecture and hands-on practice

Programming Paradigms for Building Cognitive Agents

A hands-on lab in RMPL, the Reactive Model-based Programming Language. You write programs that state goals, tolerate uncertain timing and watch their own progress. An executive then plans, schedules and monitors them.

When
AAAI-27 Tutorial and Lab Forum, February 16–17, 2027. Session day, time and room TBA
Presenters
Jake Olkin and Brian Williams, Massachusetts Institute of Technology
Bring
A laptop with Docker and the lab installed (instructions)
;; The world decides how long a trip takes,
;; anywhere inside the bounds you declare.
(defcp go-to [r :Robot dest lo hi]
  :effects  [(at-end (= r.location dest))]
  :duration [lo hi :contingent])

(defcp main []
  (with-temporal-constraint [0 50]   ; deadline
    (parallel
      (sequence :slack True
        (go-to alpha "site-north" 7 18)
        (sample alpha "site-north")
        (go-to alpha "rendezvous" 6 16)
        (initiate-communication alpha bravo))
      (sequence :slack True
        (go-to bravo "site-east" 10 22)
        ;; ...
        (initiate-communication bravo alpha)))))
Part of a program from the hands-on session. Before anything moves, the executive checks that every combination of trip times inside these bounds still meets the 50-second deadline.
Overview

About the lab

Robots and spacecraft have long been commanded with scripts: fixed sequences of commands that say what to do and when. Scripts are easy to write, but they record neither why each step is there nor how much its timing may vary, so the agent cannot adapt when an action runs long, and cannot tell when something has gone wrong.

This lab introduces participants to the Reactive Model-based Programming Language (RMPL), and through it gives a tour of how several programming paradigms come together to make cognitive agents easier to design, while giving programmers richer ways to specify their behavior. We cover four. Goal-directed programs state what should become true, not how to make it true. Monitorable programs declare conditions and effects, which let the executive detect a failure the moment an assumption breaks. Temporally flexible programs bound uncertain durations and are scheduled online as events unfold. Non-deterministic programs offer alternatives and leave the choice to a planner. Each paradigm hands more of the work from the programmer to the executive, and each rests on algorithms participants will see at work: temporal networks with uncertainty, causal-link monitoring and Conflict-Directed A*.

The lab is half lecture and half coding. The lecture introduces each paradigm and the reasoning behind it. In the hands-on session, participants program a two-robot mission in a Jupyter notebook, starting from a timed command script and adding one paradigm per stage, and watch the Janeway executive plan, schedule and monitor it on simulated robots. Programs are compiled by Tanagra, our RMPL compiler, and checked before they run, so an infeasible program is rejected with the specific constraints that conflict. Everything runs on participants' own laptops in Docker, with no ROS installation or robot hardware, and the same programs run unchanged on physical TurtleBot3 robots.

Is this lab for me?

If you are interested in building cognitive agents, this lab is for you. It suits planning and scheduling researchers who want to see their plans executed, and roboticists who want task-level autonomy without hand-coding sequencing, timeouts and failure checks. It also suits anyone building agents, embodied or driven by large language models, who wants a program representation that an executive can check, schedule and monitor. Participants leave with a working, MIT-licensed RMPL toolchain they can take back to their own research and teaching.

What background is required?

General familiarity with AI and with programming. No background in planning, temporal reasoning, ROS or Lisp is assumed.

Start time TBA

Schedule

SessionPresenterMinMaterials
IntroductionBrian Williams10Slides
Self-monitoring programsBrian Williams25Slides
Programming with flexible timeBrian Williams25Slides
Programs with choicesBrian Williams30Slides
Break30
Overview of the hands-on labJake Olkin15Slides
Hands-on session: the five-stage missionJake Olkin, with Brian Williams90Notebook
Wrap-up and discussionBrian Williams and Jake Olkin15

Slides will be linked here after the lab. The notebook is in the lab repository.

Do this before the forum

Before the lab

Please install in advance

The first start downloads about 1 GB, which is slow on conference Wi-Fi. After that the lab runs with no network at all. If you cannot install beforehand, we will have USB drives with the complete lab.

You need a laptop running Windows, macOS or Linux, with git and Docker Desktop (or Docker Engine with the compose plugin) installed. Docker needs about 6 GB of free disk, and the laptop needs 8 GB of RAM. Then:

git clone https://gitlab.com/mit-mers/enterprise/rmpl-lab-2026.git
cd rmpl-lab-2026/lab
docker compose up

When docker compose ps shows janeway as healthy (about 30 seconds), go to http://localhost:8888/?token=rmpl, open RMPL_Lab.ipynb and run the first cell. If it reports success, you are ready. Stop the lab with Ctrl+C and start it the same way on the day. On Windows, use PowerShell with Docker Desktop's WSL 2 backend.

If something goes wrong
  • "Port is already allocated", or the first cell says Janeway is not reachable. Another program uses one of the lab's ports. Run cp .env.example .env, change the host ports in .env to free ones, and run docker compose up again.
  • janeway never becomes healthy. Check docker logs --tail 40 janeway. A missing file usually means Docker ran out of disk: free space with docker builder prune and start again.
  • Port 8888 is in use. Set JUPYTER_PORT=8889 in .env and use http://localhost:8889/?token=rmpl.
  • Your laptop cannot run Docker. Tell us at the start of the session and we will pair you with a neighbour.
Massachusetts Institute of Technology

Organizers

Brian Williams

Professor, MIT AeroAstro

Brian Williams is Professor of Aeronautics and Astronautics at MIT, where he leads the Model-based Embedded and Robotic Systems group. At NASA Ames he co-invented the Remote Agent model-based autonomy system, which flew on NASA's Deep Space One. He is a Fellow of AAAI.

williams@mit.edu

Jake Olkin

PhD candidate, MIT AeroAstro

Jake Olkin is a PhD candidate at MIT in the Model-based Embedded and Robotic Systems group. He builds temporally flexible plan executives, including Janeway, and was a visiting technologist at NASA JPL. He designed and taught the RMPL lab at the 2026 IEEE RAS Summer School on Cognitive Robotics.

jolkin@mit.edu
Software and reading

Resources

Software

  • Lab repository: the notebook, the Tanagra RMPL compiler and the Janeway executive, MIT-licensed. Report problems as issues there.
  • Hy: the Lisp on Python that Tanagra is embedded in.

Background reading

  1. Williams, B. C.; Ingham, M. D.; Chung, S.; and Elliott, P. H. 2003. Model-Based Programming of Intelligent Embedded Systems and Robotic Space Explorers. Proceedings of the IEEE 91(1): 212–237.Where RMPL comes from.
  2. Dechter, R.; Meiri, I.; and Pearl, J. 1989. Temporal Constraint Networks. In Proceedings of KR 1989, 83–93.Simple temporal networks.
  3. Muscettola, N.; Morris, P. H.; and Tsamardinos, I. 1998. Reformulating Temporal Plans for Efficient Execution. In Proceedings of KR 1998, 444–452.Dispatching a temporal plan online.
  4. Morris, P.; Muscettola, N.; and Vidal, T. 2001. Dynamic Control of Plans with Temporal Uncertainty. In Proceedings of IJCAI 2001, 494–499.Dynamic controllability.
  5. Kim, P.; Williams, B. C.; and Abramson, M. 2001. Executing Reactive, Model-Based Programs through Graph-Based Temporal Planning. In Proceedings of IJCAI 2001, 487–493.Temporal Plan Networks and executing programs with choice.
  6. Williams, B. C.; and Ragno, R. J. 2007. Conflict-Directed A* and Its Role in Model-Based Embedded Systems. Discrete Applied Mathematics 155(12): 1562–1595.How the planner searches among choices.
  7. Levine, S. J.; and Williams, B. C. 2018. Watching and Acting Together: Concurrent Plan Recognition and Adaptation for Human-Robot Teams. Journal of Artificial Intelligence Research 63: 281–359.Causal links for execution monitoring.
  8. Olkin, J.; Lee, I.; Misquitta, K.; and Williams, B. 2026. Janeway: A Temporally Flexible Plan Executive. International Conference on Automated Planning and Scheduling.The executive used in the lab.