Stigmergy is a mechanism of indirect coordination where agents communicate by modifying their shared environment, leaving physical or digital traces that trigger subsequent actions by other agents.

In a stigmergic system, the work itself coordinates the workers. Agents do not need to know each other, see each other, or communicate directly. For example, termites build massive, complex nests with zero central planning. Each termite simply deposits a pellet of mud mixed with pheromones. Other termites smell the pheromone and are triggered to deposit their pellets on top of the same spot. The structure emerges bottom-up from the accumulation of these traces.

This shared environment is not a passive background; it is an active part of the system’s collective cognition, acting as a distributed system memory. The lifetime of a trace dictates the system’s behavior: if traces fade quickly (like pheromones), coordination is real-time and fleeting; if traces persist (like files, roads, or code repositories), the system can accumulate knowledge and build complex structures over time.

This makes stigmergy a powerful tool for scaling decentralized coordination, whether in ant colonies, Wikipedia articles, or open-source software repositories.