TLDR: NetGent is an AI-agent framework that automates complex application workflows to generate realistic network traffic datasets. It allows users to define workflows using natural language, which are then compiled into executable code and cached for efficient, repeatable, and robust execution. This approach addresses the challenges of data collection for machine learning in networking by providing diversity, efficiency, and resilience to UI changes, making large-scale data generation economically viable.
In the rapidly evolving field of machine learning for networking, a critical challenge persists: the scarcity of realistic, labeled application data at scale. Unlike other domains where data can be easily scraped, networking datasets often require active generation by executing live application workflows. This means simulating real-world user interactions like streaming a video, joining a meeting, or browsing social media to capture authentic network traffic, logs, and user behavior.
Current methods, primarily relying on browser automation scripts like Selenium or PyAutoGUI, are often manual, time-consuming, and notoriously fragile. They struggle with the dynamic nature of web interfaces, leading to frequent failures when user interfaces (UIs) change. This fragility limits researchers to small sets of applications, hindering the development of generalizable ML models that require data from a diverse range of applications and conditions.
Introducing NetGent: A Smart Solution for Network Data Generation
To address these significant hurdles, researchers have introduced NetGent, an innovative AI-agent framework designed to automate complex application workflows and generate realistic network traffic datasets. NetGent stands out by separating the ‘what’ a workflow should do from the ‘how’ it is executed, offering a flexible yet reliable approach to data collection.
Users interact with NetGent by providing natural-language rules, essentially high-level trigger-action specifications (e.g., “if on login page, enter credentials”). These abstract specifications are then compiled into nondeterministic finite automata (NFAs), which a ‘State Synthesis’ component translates into concrete, reusable, and executable code. This ‘compile-then-replay’ design is a cornerstone of NetGent’s effectiveness.
How NetGent Works Under the Hood
NetGent’s architecture is built on three core abstractions:
-
Abstract NFA: Users define workflows using natural-language state prompts, specifying triggers, actions, and end conditions. This captures complex, non-linear flows while keeping the intent separate from specific UI details.
-
Concrete NFA: Each abstract state is compiled into a concrete state, comprising UI detectors (CSS elements, text, URLs) and executable code. This compiled form ensures deterministic replay and efficient reuse across multiple runs.
-
Cache and Replay: Concrete states are stored in a ‘State Repository’. A ‘State Executor’ then deterministically replays this code. If a UI change causes a detector to fail, only the affected state is regenerated from the original abstract rule, ensuring robustness without re-synthesizing the entire workflow.
This intelligent design allows NetGent to minimize redundant calls to large language models (LLMs) through state caching, making large-scale data generation economically feasible. When a workflow is run, NetGent first checks its cache for existing concrete states. If found, it replays the stored code. If not, it synthesizes the new state, generates the necessary code, and stores it for future use.
Key Advantages and Real-World Impact
NetGent addresses six critical requirements for networking data generation:
-
Diversity: It can scale to diverse applications and platforms with minimal user effort.
-
Repeatability: Identical inputs yield identical outcomes across many runs and network conditions.
-
Complexity: It captures dynamic, non-linear, multi-step interactions.
-
Robustness: It remains resilient to frequent UI changes by regenerating only affected states.
-
Realism: It mimics human behavior to avoid bot detection, incorporating browser stealth, human-like mouse movements (using Bezier curves), variable keystroke intervals, and network control (IP address pooling).
-
Efficiency: Caching and compiled execution significantly reduce token costs and workflow generation time.
In experiments, NetGent successfully automated over 50 workflows across various domains, including video-on-demand streaming, live video streaming, video conferencing, social media, and web scraping. The evaluation demonstrated that concise natural-language prompts (100-200 words) could expand into hundreds of lines of executable code, showcasing its extensibility. Furthermore, the caching mechanism drastically reduced LLM token costs, making millions of repeat runs economically viable. For instance, an ESPN workflow that would cost approximately $98,000 for a million runs without caching, becomes significantly cheaper with NetGent’s approach, costing only about $0.78 annually for weekly state updates.
The framework’s robustness was evident when a UI change (like requiring a PIN for profile access) in the ESPN workflow only necessitated the regeneration of the specific ‘type_pin’ state, leaving other states intact and replayed from the cache. This localized regeneration saved significant time and resources compared to re-synthesizing the entire workflow.
Also Read:
- Autonomous AI Framework Boosts Linux System Performance with Smart Schedulers
- AppCopilot: Advancing Mobile AI Agents for Everyday Use
Future Directions
While NetGent represents a significant leap forward, the researchers acknowledge limitations and outline future work. Currently, manual workflow verification and failure handling still require user intervention. Automating step-level validation and state-level recovery would enable self-healing and fully autonomous workflows. Additionally, NetGent is presently limited to web applications, and extending its NFA abstraction to desktop environments would broaden its applicability. For more in-depth technical details, you can read the full research paper here.


