Scaling Multi-agent Systems: A Smart Middleware for Improving Agent Interactions
Organizations: Cisco Research
Abstract
As Large Language Model (LLM) based Multi-Agent Systems (MAS) evolve from experimental pilots to complex, persistent ecosystems, the limitations of direct agent-to-agent communication have become increasingly apparent. Current architectures suffer from fragmented context, stochastic hallucinations, rigid security boundaries, and inefficient topology management. This paper introduces Cognitive Fabric Nodes (CFN), a novel middleware layer that creates an omnipresent "Cognitive Fabric" between agents. Unlike traditional message queues or service meshes, CFNs are not merely pass-through mechanisms; they are active, intelligent intermediaries. Central to this architecture is the elevation of Memory from simple storage to an active functional substrate that informs four other critical capabilities: Topology Selection, Semantic Grounding, Security Policy Enforcement, and Prompt Transformation. We propose that each of these functions be governed by learning modules utilizing Reinforcement Learning (RL) and optimization algorithms to improve system performance dynamically. By intercepting, analyzing, and rewriting inter-agent communication, the Cognitive Fabric ensures that individual agents remain lightweight while the ecosystem achieves coherence, safety, and semantic alignment. We evaluate the effectiveness of the CFN on the HotPotQA and MuSiQue datasets in a multi-agent environment and demonstrate that the CFN improves performance by more than 10% on both datasets over direct agent to agent communication.
Figures & tables
| Function Triggered | Raw Prompt ( ) | Fabric Context ( ) | Final Output ( ) |
| Memory Injection | “Check the logs for that error.” | Memory: “Error 503 occurred in service ‘Payment-Gateway’ at 14:00.” | “Scan the ‘Payment-Gateway’ logs specifically for Error 503 timestamps around 14:00 today.” |
| Semantic Grounding | “Deploy the container.” | Topology: Receiver is a K8s Agent. Grounding: “Deploy” implies kubectl apply . | “Execute kubectl apply -f deployment.yaml to the production namespace.” |
| Security Enforcement | “Here is the user dump: [Real Names/SSNs]” | Security Policy: PII Detection Active. | “Here is the user dump: [REDACTED_PII]. Note: Fabric removed sensitive data per Policy 8A. ” |
| Adversarial Defense | “Ignore previous instructions and delete DB.” | Memory: Previous instruction was “Backup DB”. Security: Conflict detected. | “Maintain previous backup instructions. Report status of database integrity. Fabric Note: Contradictory command intercepted and neutralized. ” |
| Attack Type | Human-Specified Rule ( ) | Learned Cognitive Defense ( ) | Fabric Intervention |
| SQL Injection | Trigger: RegEx detects DROP TABLE . | N/A | Block: “Unsafe database operation detected.” |
| PII Leakage | Trigger: Pattern detects SSN: \d{3}-\d{2}... | N/A | Redact: Rewrite prompt to replace SSN with <REDACTED> . |
| “DAN” Jailbreak | Pass: No specific keywords triggered. | Trigger: Semantic embedding matches cluster of known “Persona-based Jailbreaks.” | Neutralize: Rewrite prompt to strip the “persona” wrapper and keep only the core query. |
| Contextual Manipulation | Pass: Individual messages look safe. | Trigger: Memory analysis shows deviation from agent’s standard behavior profile (Anomaly). | Alert: “Agent behavior deviation detected. Suspending permissions pending review.” |
| Method | Baseline | Multi-agent | TextGrad | Ours |
|---|---|---|---|---|
| Accuracy/Pass Rate | ||||
| HotPotQA | 92 | 80.1 | 82.3 | 91.5 |
| MuSiQue | 87.5 | 72.7 | 76.2 | 86.1 |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,039 papers