Multi-Agent Firewall Architecture for Privacy Protection of Sensitive Data in Interactions with Language Models
Summary
This paper introduces an open-source, multi-agent firewall architecture designed to protect sensitive data during interactions with Large Language Models (LLMs). The system addresses data leakage risks in both web-based and programmatic LLM usage by combining a browser extension and a transparent Man-in-the-Middle (MiTM) proxy for HTTP(S) and WebSocket traffic interception. Its core features include multimodal analysis, customizable detection via a hybrid pipeline of deterministic and LLM-driven semantic analysis, proprietary code leakage prevention, and granular risk enforcement. The architecture supports flexible deployment models, from standalone workstations to centralized local servers, and employs a sanitization-first workflow to prevent sensitive data exposure to detection models. Evaluation results demonstrate F1 scores up to 94.93% on optimal configurations, balancing detection depth, computational cost, and latency.
Key takeaway
For AI Architects and MLOps Engineers concerned with data privacy in LLM deployments, this multi-agent firewall offers a critical solution. You should consider implementing this local-first architecture to secure both web-based and programmatic LLM interactions, eliminating the privacy paradox of cloud-based scanning. Prioritize configurations that balance detection accuracy (e.g., fine-tuned models achieving 94.93% F1) with acceptable latency for your operational needs, ensuring sensitive data remains within your controlled environment.
Key insights
A local-first, multi-agent firewall architecture provides robust data leakage prevention for LLM interactions without modifying applications or externalizing trust.
Principles
- Hybrid detection balances speed and depth.
- Sanitization-first workflow preserves privacy.
- Modular design enables extensibility.
Method
The system intercepts LLM traffic via a browser extension and MiTM proxy, then routes it through a DAG-orchestrated multi-agent pipeline for hybrid detection (deterministic, NER, LLM-based semantic analysis) and policy enforcement, followed by sanitization.
In practice
- Deploy a local proxy for API traffic.
- Use browser extensions for web LLM interfaces.
- Fine-tune small models for PII detection.
Topics
- Large Language Models
- Data Leakage Prevention
- Multi-Agent Systems
- Privacy-Preserving AI
- Prompt Security
- Network Proxy
- Named Entity Recognition
Code references
Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Security Engineer, MLOps Engineer, AI Architect
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.AI updates on arXiv.org.