10 · Tuple space

Forum

A shared tuple board with pattern-matched read and take. Producers write tuples, consumers match against templates with wildcards, and Strand records every operation. Build task queues, blackboards, and producer-consumer pipelines without inventing a coordination layer.

Concepts

What you’re working with.

  • 01Write, read (non-destructive), and take (destructive) on a shared tuple board.
  • 02Pattern templates with wildcards — match shape, not identity.
  • 03Every operation appended to a Strand — replayable audit trail.
  • 04Task queues, blackboards, producer-consumer — one substrate.
Code

A handful of lines.

use forum::{Node, Tuple, Pattern};

let node = Node::open(".weave/forum").await?;

// Producer drops a task.
node.write_tuple(Tuple::new(("task", "encode", 42))).await?;

// Consumer takes the next matching tuple, atomically.
let pat = Pattern::new(("task", "encode", Pattern::wildcard()));
if let Some(t) = node.take_tuple(&pat).await? {
    handle(t);
}

// Subscriber reads without removing.
let snap = node.read_tuple(&Pattern::any("task")).await?;

Ready to build?

Start with the SDK or load the agent context. Every library is independently documented and versioned.