# Stigmergic Coordination

> Agents coordinate by leaving and reading marks in a shared environment — no direct messaging, no central coordinator, one agent's trace stimulates another's next action.

- **Category**: Agentic AI
- **Subcategory**: Multi-Agent
- **Canonical URL**: https://designpattern.fyi/patterns/stigmergic_coordination/

---

## Description
**Intent**: Agents coordinate indirectly by leaving and reading marks in a shared environment (files, queues, scratchpads, world model) so that one agent's trace stimulates another's next action, with no direct messaging.
**Context**: Multiple agents share an environment — a workspace directory, a task queue, a shared scratchpad, a vector store. Direct point-to-point messaging is either expensive, unreliable, or unavailable across agent boundaries (different processes, different products, different time windows).
**Solution**: Define a structured trace format the environment carries — a TODO file, a queue of jobs, status markers in a scratchpad, named entries in a vector store. Each agent's action writes a trace; each agent's next decision reads traces left by others. Traces include enough context that a fresh agent can act on them. Traces decay or are explicitly cleared. No direct messaging required.



## Use Cases
- Agents share an environment they all read and write.
- Coordination crosses time windows or process boundaries that direct messaging can't span.
- Trace format can be made readable by future agents without prior protocol agreement.






## Trade-offs


### Advantages

- Coordination across time, processes, and product boundaries — no sync required.

- No N×N direct-message graph; the environment is the only channel.

- Audit comes for free — the environment is the trace log.




### Considerations & Drawbacks

- Stale or conflicting traces produce wrong-direction stimulation that's hard to detect.

- Traces designed for one agent can mislead another that reads them with different assumptions.

- Latency is bounded by how often agents poll the environment.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/stigmergic-coordination/)

