Building infection-protocol-lab: A Full-Stack Multi-Agent Simulation with TypeScript, LangChain, and ReactFlow
infection-protocol-lab started as a question: what happens when autonomous LLM agents live inside a social system with incomplete information, hidden contagion, evolving strategy, and role-based as...

Source: DEV Community
infection-protocol-lab started as a question: what happens when autonomous LLM agents live inside a social system with incomplete information, hidden contagion, evolving strategy, and role-based asymmetry? This project answers that question as a runnable local app. It combines: a TypeScript simulation engine a LangChain-powered agent layer an Express + WebSocket backend a ReactFlow live visualization a benchmark playground for repeated experiments This post walks through the architecture, tradeoffs, and code patterns behind the system. Why Build This? Most LLM demos are linear: send prompt receive answer end interaction But many interesting system behaviors only appear when agents: interact repeatedly hold imperfect beliefs react to hidden state adapt their own strategy over time That is where simulation gets interesting. infection-protocol-lab frames that environment around a hidden infection protocol: some agents start infected others do not know who is infected infection spreads thr