Biological intelligence for agent infrastructure

No manager.
No handoffs.
Just signals.

Stigmergy is a TypeScript framework for building agent colonies that coordinate through a shared medium with decay - not orchestrators, not direct messages, not managers.

Or install now

$npm install github:NetaBresler/stigmergy

Postgres as the medium · Signals as pheromones · Validators as reinforcement

See the roadmapReleased under the MIT open-source license

The shift

Most agent frameworks copy the org chart.
Stigmergy removes the middle.

Manager agents become bottlenecks. Specialization should emerge from the work, not from a planner that has to hold the whole world in its context window.

Coordination model

Manager

A planner agent decides what each worker does and waits for results.

Stigmergic

Agents read and write signals in a shared medium. No one is in charge.

Context window

Manager

The manager has to hold the whole world in its prompt to plan.

Stigmergic

Each agent only sees its local slice. The medium holds the world.

Failure mode

Manager

Brittle. When the manager hangs or hallucinates, the colony stalls.

Stigmergic

Graceful. A dead agent is just a missing signal; the rest keep working.

Specialization

Manager

Assigned by the planner up front. Locked in until someone rewrites it.

Stigmergic

Emerges from the pressure landscape. Roles drift toward where the work is.

Scaling cost

Manager

Each new agent makes the manager's job geometrically harder.

Stigmergic

Adding agents adds throughput. No coordinator to overwhelm.

Adapting to change

Manager

Replanning means re-prompting the manager with the whole new state.

Stigmergic

The medium shifts; the next reader sees the new pressure and reacts.

Memory of bad plans

Manager

Stale plans linger in the manager's context until it's reminded to drop them.

Stigmergic

Unreinforced signals decay automatically. The colony forgets what isn't working.

Adding a new agent

Manager

Update the manager's prompt, retest the delegation logic, redeploy.

Stigmergic

Declare the role. It joins the medium and starts reading its slice.

Observability

Manager

You debug an opaque chain of LLM calls inside one prompt.

Stigmergic

Every coordination event is a typed row. You query the medium with SQL.

The medium, materially

Coordination is just rows.

Every coordination event is a typed signal in Postgres. Strength, decay, status, origin - explicit, queryable, durable. No hidden state. No prompts inside prompts.

signalactive
type:demand_pheromone
strength:0.82
decay:0.9 / hour
origin:scout-7
signalreinforced
type:claim
strength:0.96
decay:reinforcement-only
origin:worker-3
signaldecaying
type:result_candidate
strength:0.18
decay:0.7 / hour
origin:worker-1

The six primitives

The minimum load-bearing structure.

A system is stigmergic if and only if it has all six. Miss one and you have something else: a knowledge base, a queue, a workflow engine, a manager-in-disguise.

Read all six in detail

How a colony runs

Three roles. One medium. No manager.

The reference implementation ships three composable defaults - Scout, Worker, Validator. They never talk to each other.

Where it stands

The framework runs end-to-end. The interesting work is putting it against a real problem.

The worked example in examples/bug-triage.ts runs from a clean checkout - a colony of agents deposit signals, compete for claims, and reinforce the trails that pay off. Installable from GitHub, not yet on npm. No production claims until real projects run on it.

Try it in two minutes.

Clone, install, watch a three-agent colony deposit signals, compete for claims, and reinforce the winning trails.

installshell
$npm install github:NetaBresler/stigmergy