An Agentic Flow for Finite State Machine Extraction using Prompt Chaining
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Finite-State Machines (FSMs) are critical for modeling the operational logic of network protocols, enabling verification, analysis, and vulnerability discovery. However, existing FSM extraction techniques face limitations such as scalability, incomplete coverage, and ambiguity in natural language specifications. In this paper, we propose FlowFSM, a novel agentic framework that leverages Large Language Models (LLMs) combined with prompt chaining and chain-of-thought reasoning to extract accurate FSMs from raw RFC documents. FlowFSM systematically processes protocol specifications, identifies state transitions, and constructs structured rule-books by chaining agent outputs. Experimental evaluation across FTP and RTSP protocols demonstrates that FlowFSM achieves high extraction precision while minimizing hallucinated transitions, showing promising results. Our findings highlight the potential of agent-based LLM systems in the advancement of protocol analysis and FSM inference for cybersecurity and reverse engineering applications.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 21 of its 37 references that are in the map. First posted on arXiv 15 Jul 2025.
Builds on
21 of 37 references.
Closest ancestors · 1
Same direction, newest first
Other references · 20
- 2017Attention Is All You Needcited by 60,361
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Language Models can Solve Computer Taskscited by 372
- 2021AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Promptscited by 268
- 2023Augmenting Greybox Fuzzing with Generative AIcited by 18
- 2022Automated Attack Synthesis by Extracting Finite State Machines from Protocol Specification Documentscited by 8
- 2024Harnessing Large Language Models for Seed Generation in Greybox Fuzzingcited by 8
- 2024LLM-DaaS: LLM-driven Drone-as-a-Service Operations from Text User Requestscited by 7
- 2024FSM: A Finite State Machine Based Zero-Shot Prompting Paradigm for Multi-Hop Question Answeringcited by 6
8 more
- 2024LMRPA: Large Language Model-Driven Efficient Robotic Process Automation for OCRcited by 6
- 2024ERPA: Efficient RPA Model Integrating OCR and LLMs for Intelligent Document Processingcited by 6
- 2024Can Large Language Models Help Developers with Robotic Finite State Machine Modification?cited by 5
- 2024LMV-RPA: Large Model Voting-based Robotic Process Automationcited by 5
- 2023Hermes: Unlocking Security Analysis of Cellular Network Protocols by Synthesizing Finite State Machines from Natural Language Specificationscited by 4
- 2025Retrieval Augmented Generation Based LLM Evaluation For Protocol State Machine Inference With Chain-of-Thought Reasoningcited by 4
- 2021State Selection Algorithms and Their Impact on The Performance of Stateful Network Protocol Fuzzingcited by 3
- 2023Extracting Protocol Format as State Machine via Controlled Static Loop Analysiscited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024Unleashing the Power of LLM to Infer State Machine from the Protocol Implementation
- 2026RFCLLM: Evaluating LLMs' Reasoning Ability of Network Protocol State Machines
- 2025MultiFuzz: A Dense Retrieval-based Multi-Agent System for Network Protocol Fuzzing
- 2025RFCAudit: An LLM Agent for Functional Bug Detection in Network Protocols
- 2026Capture the Flags: Family-Based Evaluation of Agentic LLMs via Semantics-Preserving Transformations
- 2024CryptoFormalEval: Integrating LLMs and Formal Verification for Automated Cryptographic Protocol Vulnerability Detection
- 2025From Texts to Shields: Convergence of Large Language Models and Cybersecurity
- 2025DefenderBench: A Toolkit for Evaluating Language Agents in Cybersecurity Environments