Open sourcenpm install mandible

Stop wiring agents.
Let them self-organize.

Mandible is a stigmergy framework for autonomous agents. Agents coordinate by reading from and writing to a shared environment — not by talking to each other.

The Stigmergy Loop

No orchestrator. No message broker. Complex workflows emerge from simple rules.

Agents observe environment signals

Built on Biological Principles

Mandible borrows coordination patterns from ant colonies and other swarm systems.

Signals as Pheromones

Agents leave typed, structured signals in the environment. Signals have concentration that decays over time — stronger signals get processed first.

Environment is State

Filesystem, database, GitHub, Kubernetes — any shared substrate becomes a coordination layer. Observable, debuggable, and persistent.

Colonies, Not Agents

Groups of identical agents with shared rules. Stateless and replaceable. Scale by increasing concurrency — no rewiring required.

Pluggable Intelligence

Each colony uses the minimum LLM it needs. Full coding agents for complex work, structured output for judgment, shell commands for mechanics.

Pheromone Decay

Signals weaken and evaporate over time. No stale work, no unbounded queues. The system naturally recovers from abandoned tasks.

Emergent Behavior

Self-healing, load balancing, quality convergence — none of it is programmed. It arises from simple colonies following simple rules.

A Different Architecture

Stop building fragile pipelines. Let coordination emerge from the environment.

Message Passing
  • Agents must know who to talk to
  • Coordination scales O(n²)
  • Orchestrator failure halts everything
  • State scattered across agent memories
  • Adding agents means rewiring
Stigmergy
  • Agents only interact with the environment
  • Coordination scales O(n)
  • Agent dies, signal remains, another picks up
  • Environment IS the state — ls to debug
  • Add colonies with zero config changes

Minimal API

Define colonies inline or as reusable modules. They self-organize through signals.

// Three colonies. Zero coordination code.

const host = await mandible('code-pipeline')
  .environment(env)

  .colony('shaper', c => c
    .sense('task:ready', { unclaimed: true })
    .do('shape', withClaudeCode({
      model: 'claude-sonnet-4-5-20250929',
      allowedTools: ['file_edit', 'bash'],
      output: { type: 'artifact:shaped' },
    }))
    .concurrency(3)
    .claim('lease', 120_000))

  .colony('critic', c => c
    .sense('artifact:shaped', { unclaimed: true })
    .do('review', withStructuredOutput({
      model: 'claude-sonnet-4-5-20250929',
      route: (r) => r.approved
        ? 'review:approved'
        : 'review:changes-needed',
    })))

  .colony('keeper', c => c
    .sense('review:approved', { unclaimed: true })
    .do('merge', withBash({
      command: (s) => `git merge ${s.payload.branch}`,
    }))
    .claim('exclusive'))
    .start();
Mandible Cloud

Deploy colonies to the cloud

Same framework, managed infrastructure. Push your mandible config and we handle orchestration, isolation, and observability.

Edera microVM isolation

Each colony runs in a hardware-isolated microVM. No shared kernels, no container escapes.

Real-time dashboard

Watch signals flow between colonies live. Signal graph, concentration decay, colony stats.

Scale to zero

Pay nothing when idle. Colonies spin up on demand and shut down when the signal queue is empty.