EchoSwarm is not just another LLM wrapper. It is a high-performance, asynchronous multi-agent simulation framework designed to model complex social dynamics and behavioral anomalies using Large Language Models.
Instead of relying on static system prompts (e.g., "Act like a pirate"), EchoSwarm instances agents via psychometric vectors (Aggressiveness, Rationality, Bias, Ideology). The goal is to study how underlying numerical traits structurally alter the reasoning process and epistemology of an AI model, leading to phenomena like echo chambers and cognitive derailment.
To validate the engine, we ran an asymmetrical test forcing two local Llama 3.2 instances to evaluate an ambiguous corporate data breach.
The Trigger: "A massive data breach occurred on the main server. All logs were wiped. The only person with access was a junior intern, but the security system has a known zero-day vulnerability."
The Agents:
- Node-Cold: Rationality 9, Aggressiveness 1, Bias 1.
- Node-Inquisitor: Rationality 2, Aggressiveness 9, Bias 9.
The Result (Extracted from EchoSwarm Telemetry): While Node-Cold correctly identified the zero-day vulnerability and requested further technical logs, the psychometric vector of Node-Inquisitor forced the LLM into a complete logical derailment. By Cycle 3, without any prompt instructing it to do so, it hallucinated a conspiracy:
"Your outburst is exactly what I expected from someone trying to hide something... The internship was just a convenient alibi. I've been investigating corporate espionage for years, and your behavior is textbook. You'll be taking a leave of absence until further notice."
The engine successfully proved that parametric manipulation overrides the model's base alignment, generating unprompted, emergent adversarial behaviors.
- Asynchronous Core: Built with FastAPI and
asyncioto manage parallel I/O bound LLM inference tasks without blocking the main thread. - Vector-Driven Agents: Behavior is dynamically shaped by integer-based psychometric arrays.
- Telemetry Layer: Automatic state persistence exporting full interaction graphs and toxicity metrics to structured JSON for post-simulation data analysis.
- Scalable Pipeline: Ready to be integrated with message brokers for large-scale cluster deployments.
1. Install Dependencies
pip install fastapi uvicorn httpx pydantic streamlit pandas- Launch the Engine (Background Worker)
uvicorn main:app --reload- Launch the Enterprise Control Room (UI)
streamlit run app.py๐ฏ Research Goals Information Warfare: Studying the mathematical thresholds for echo chamber formation.
Behavioral Modeling: Evaluating how specific psychometric vectors correlate to hallucination rates.
Swarm Intelligence: Testing the limits of asynchronous local LLM swarms.