Linked Data MASE - A Maze-Based Multi-Agent Systems Environment for Testing and Visualizing Hypermedia Agents
Run MASE server and MASE viewer together with Docker Compose to run simulations of interactive maze scenarios accessible to agents via HTTP GET and POST and get a corresponding front end for visualization purpose.
- Docker Desktop (or Docker Engine with Compose)
docker compose up --build- Server (entry point): http://127.0.1.1:8080/maze
- Viewer: http://127.0.1.1:3000/ or http://localhost:3000
Default scenario is sim-SmallMaze.
$env:TASKNAME="sim-MidMaze"
docker compose up --buildFor each scenario, a .properties file is available (e.g., sim-SmallMaze.properties) that defines the maze dataset and the execution order in which the rules (SPARQL Queries, see below) are applied.
- Rules may be applicable to every maze or only to a specific maze scenario (e.g.,
SmallMaze). - Rules that apply to a specific maze scenario are always activated (e.g., the unlocking mechanism), while globally applicable rules are optional (e.g.,
Stigmergy). - To define which rules that are globally applicable should be activated, pass their names as a second value in
TASKNAME(e.g.,sim-SmallMaze Stigmergyto apply theStigmergyruleset to thesim-SmallMazescenario).
The maze dataset is an RDF file that defines the maze structure and the initial state of the environment.
Pass both values in TASKNAME (equivalent to Gradle --args="sim-SmallMaze Stigmergy").
$env:TASKNAME="sim-SmallMaze Stigmergy"
docker compose up --buildRules are SPARQL Queries that are executed after initilaization and during the processing of each HTTP GET and POST request to the MASE-server by an agent. This can be used to customize the environment and to evolve it in response to the effects of agents' operations. For example, the Stigmergy ruleset adds stigmergic markers to the maze cells counting the traffic of agents. The ruleset is applied to the sim-SmallMaze scenario in the example above, but it can be applied to any maze scenario by passing Stigmergy as a second value in TASKNAME.
Rules are defined in mase-server/src/main/resources/rules/ and are either globally applicable (e.g., Stigmergy) or only to a specific maze scenario (e.g., SmallMaze).
MASE navigation is controlled by HTTP semantics plus RDF validation logic.
- Authorization header activates access control: send
Authorization: <agentName>(orAuthorization: Agent <agentName>) so requests are validated against the agent’s current maze location. - No header = unrestricted access (debug mode): if no
Authorizationheader is provided, all resources remain accessible to support runtime debugging and inspection. - First entry rule: an agent without a known location must enter by POSTing to the maze entrance cell (the
xhv:starttarget) with exactly onedynmaze:entersFromtriple that points to/maze. - Adjacency constraints for movement: movement POSTs are detected by
dynmaze:entersFrom; MASE enforces exactly one source cell, requires that source to match the agent’s actual current cell, and allows movement only when an RDF edge (maze:north|south|east|west|exit) exists from source to target. - Local perception and action: authenticated agents can only
GETand non-movementPOSTon their current cell. - Agent named graph creation: on first valid maze entry, MASE creates a named graph for the agent IRI and inserts an
a maze:Agenttriple. - Request validation pipeline: MASE parses RDF payloads, classifies movement vs. interaction, applies access checks, and only then merges triples and executes server rules.
-
Agent
bobsendsGET: http://127.0.1.1:8080/mazewith headerAuthorization: bobto discover the maze entrance cell (e.g.,/cells/0/0). -
Bob sends
POST: http://127.0.1.1:8080/cells/0/0with headerAuthorization: boband body<http://127.0.1.1:8080/agents/bob> <https://paul.ti.rw.fau.de/~am52etar/dynmaze/dynmaze#entersFrom> <http://127.0.1.1:8080/maze> .to enter the maze. The global movement rules materialize the movement by adding a containment triple for the agent in the target cell’s graph and removing any previous containment triple. See move_start.rq and move.rq for details. -
Bob is now allowed to
GETandPOSTon/cells/0/0. Remember that Bob can only perceive the current cell and can only request a move to an adjacent cell. If Bob tries to move to a non-adjacent cell or tries toGETorPOSTon a different cell, the request will be rejected by the server. -
If a cell is locked and Bob has previously observed a key of the required type, it can
POSTto the locked cell (e.g.,http://127.0.1.1:8080/cells/0/1) a triple like<http://127.0.1.1:8080/cells/0/1> <https://paul.ti.rw.fau.de/~am52etar/dynmaze/dynmaze#keyValue> "redkey" .to unlock the cell. The ruleset materializing the unlocking is defined in the maze-specific rules file (e.g., unlock-redkey.rq). -
Consider the maze solved when Bob moved to the exit cell (
/cells/999) via themaze:exitedge.
Run sample dfs agent (name: bob) against a running server:
gradle runBobAgentRun the same agent with Docker (server must already be running):
docker compose exec mase-server sh -lc "java -cp '/opt/mase/install/mase-server/lib/*' org.maze.examples.SampleDfsAgentBob"The sample agent always sends Authorization: bob, starts with GET /maze, enters the discovered start cell with dyn:entersFrom, then navigates in depth-first-search ordered by west, north, east, south. If the current cell is locked and dyn:needsAction requires a key type that was previously observed via GET, it posts dyn:keyValue to unlock and re-checks the cell. It finishes when it reaches /cells/999 via maze:exit.
Detailed example-agent documentation: mase-server/src/main/java/org/maze/examples/README.md
@inproceedings{schmid_2025,
address = {Cham},
title = {Adaptive {Planning} on the {Web}: {Using} {LLMs} and {Affordances} for {Web} {Agents}},
isbn = {978-3-031-81221-7},
shorttitle = {Adaptive {Planning} on the {Web}},
doi = {10.1007/978-3-031-81221-7_7},
abstract = {We investigate the adaption of agents using plans on the Web despite its large and dynamic nature, as well as agents’ constrained perception. Based on Semantic Web technologies and affordances, we compare how agents choose appropriate actions to adapt to their environment by condition-action rules or suggested actions of large language models. We conduct experiments on execution cost and plan stability distance to see whether agents choose appropriate actions to adapt their plans. We find that cost and stability of rule-based and LLMs for adaptation with affordances are close together, while performance differs greatly.},
language = {en},
booktitle = {Knowledge {Graphs} and {Semantic} {Web}},
publisher = {Springer Nature Switzerland},
author = {Schmid, Sebastian and Freund, Michael and Harth, Andreas},
editor = {Tiwari, Sanju and Villazón-Terrazas, Boris and Ortiz-Rodríguez, Fernando and Sahri, Soror},
year = {2025},
keywords = {Adaption, Dynamic Environments, Web Agents},
pages = {93--108},
}In particular the datasets (SmallMase, MidMaze, BigMaze) and key-lock mechanism (e.g., unlock-redkey.rq).
@misc{kafer_2023,
title = {{BOLD}: {A} {Benchmark} for {Linked} {Data} {User} {Agents} and a {Simulation} {Framework} for {Dynamic} {Linked} {Data} {Environments}},
shorttitle = {{BOLD}},
url = {http://arxiv.org/abs/2307.09114},
doi = {10.48550/arXiv.2307.09114},
abstract = {The paper presents the BOLD (Buildings on Linked Data) benchmark for Linked Data agents, next to the framework to simulate dynamic Linked Data environments, using which we built BOLD. The BOLD benchmark instantiates the BOLD framework by providing a read-write Linked Data interface to a smart building with simulated time, occupancy movement and sensors and actuators around lighting. On the Linked Data representation of this environment, agents carry out several specified tasks, such as controlling illumination. The simulation environment provides means to check for the correct execution of the tasks and to measure the performance of agents. We conduct measurements on Linked Data agents based on condition-action rules.},
urldate = {2025-09-24},
publisher = {arXiv},
author = {Käfer, Tobias and Charpenay, Victor and Harth, Andreas},
month = jul,
year = {2023},
note = {arXiv:2307.09114 [eess]},
keywords = {Computer Science - Artificial Intelligence, Computer Science - Systems and Control, Electrical Engineering and Systems Science - Systems and Control},
}In particular as a reference for Configurator.java with .properties files (e.g., sim-SmallMaze.properties) and LinkedDataDereferenceResource.java


