marionnet.org — a virtual network laboratory

Scripting and AI

Marionnet can also be driven in writing. Started with the --control-socket option, it opens its window as usual, and the mouse still works in it; but at the same time it accepts commands sent from a terminal with mrnctl: create machines, cable them, assign them addresses, start them, read what happens inside. Each command shows up in the window immediately, as if it had been done with the mouse.

marionnet --control-socket /tmp/marionnet.sock

Every answer is a line of JSON. A script can therefore drive Marionnet, and so can an AI agent that runs shell commands.

With an AI

You do not need to know these commands: the AI writes them, and you follow along on screen. To guide it, Marionnet ships a skill, a guide written for the agent. It is not meant for any assistant in particular and needs no plug-in: the agent only has to run commands and read their output. It helps the agent design a lab with you, build it without a click, run it, then grade the students’ sessions, exam mode included.

The guides

The teacher’s side, from the statement to the mark, is in the Teaching tab.