Lune

ACL2026Top-tier venue

A Multi-Agent Framework for High-Interaction Terminal Simulation

Kai Wei, Yuwen Cui, Kehan Shen, Hua Wei, Guangjing Wang

2026Year

Abstract

Terminal simulation, framed as a terminal command-level Turing test, is a long-standing symbolic language generation problem in dialogue and interactive systems. Prior scripted simulators lack flexibility for complex, multiturn interactions, while LLM-based approaches often misinterpret commands, break output formats, drift from system state, and remain vulnerable to prompt injection. In this work, we propose MANTIS, a terminal simulation framework that improves realism, consistency, and robustness for command language generation. MANTIS integrates a multi-agent architecture with a filter-based routing model that safely dispatches commands to external tools or an LLM-based agent to support interactive commands and defend against prompt injection attacks. In addition, we design an agentic file system with history memory pruning for long-term state consistency. We release three datasets: 28,045 real terminal input-output pairs, a 1,000 multi-turn interaction session dataset, and a 25,849 labeled classification dataset. MANTIS outperforms stateof-the-art baselines by more than 9%, achieving over 95% accuracy on multi-turn terminal simulation. The dataset and source code are available at https://github.com/kaiwei666a/ MANTIS_Terminal_Simulation .

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 908b2fcd-7601-4596-9120-e773e90a92f1

Builds on8

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines