Protocol Background
THE PROTOCOL

FoodBlock Protocol

One primitive. Three fields. Every food interaction on earth.

The Primitive

id = SHA-256(type + state + refs)

A FoodBlock is a JSON object with three fields. Its identity is derived from its content. Same content, same hash. FoodBlocks are append-only. You never edit one. You create a new one that references the previous version.

Six Base Types

Three entities and three actions. Subtypes use dot notation.

actor

A person or organisation in the food system.

place

A physical location with coordinates.

substance

An ingredient, product, or material.

transform

Changing one thing into another.

transfer

Moving something between actors.

observe

Making a statement about something.

The Rules

01
A FoodBlock is a JSON object with three fields: type, state, refs.
02
id is derived from content. Same content = same hash.
03
FoodBlocks are append only. Never edit, only create new.
04
State updates ref the previous version: refs: { updates: previous_hash }.
05
Genesis FoodBlocks (no updates ref) establish entity identity.
06
The base type determines the refs schema; subtypes inherit it.
07
Authentication: { foodblock, author, sig }. Signature proves authorship.
08
Encrypted state: keys prefixed with _ are access-controlled.
09
Any system that understands the 6 base types can process any FoodBlock.
10
The protocol is open. Anyone can create FoodBlocks, no registration needed.
11
App-specific state lives in a namespaced type. Core types model the real world.

Provenance

Follow refs backwards from any FoodBlock to trace its full history. Provenance is inherited through the chain.

Bread (substance.product)
  <- Baking (transform)
    <- Dough (transform)
      <- Flour <- Mill <- Certification
      <- Water <- Location
    <- Starter
      <- 14 days of fermentation

Trust

Trust is computed from the FoodBlock graph itself.

1
Authenticity
Cryptographic
Signature proves WHO created the FoodBlock.
2
Authority
Registry
Known authority public keys pre-installed.
3
Economic Proof
Sybil Resistance
Real payments = real interaction. Weight trust by financial history.
4
Temporal Validity
Decay
Certifications expire. Trust scores check timestamps.
5
Contextual Trust
Relevance
Trust is per-type, not global. A great baker might be a terrible caterer.

Agent Infrastructure

Autonomous agents are first-class actors in the FoodBlock protocol.

1
Registration
actor.agent
Agents register as actor.agent FoodBlocks with Ed25519 keypairs and scoped capabilities.
2
Permissions
capabilities[]
Scoped by block type, amount caps, auto-approve thresholds, and rate limits.
3
Draft → Approve
two-phase commit
Low-value actions auto-approve. High-value actions queue for human confirmation.
4
Event Subscriptions
pub/sub
Subscribe to block type patterns. New blocks trigger handlers in real-time.
5
Memory
observe.preference
Preferences and learned state stored as append-only observe.preference blocks.

Status

Model (3 fields, 6 types)
Complete
Hash determinism
Complete
Content-addressed identity
Complete
Trust computation
Complete
Cryptographic signing
Complete
Encryption
Complete
Selective disclosure (Merkle)
Complete
Agent registration & permissions
Complete
Agent draft/approve lifecycle
Complete
Agent memory & learning
Complete
Vocabularies (14 built-in)
Complete
Templates (9 built-in)
Complete
Federation & discovery
Complete
Merge & conflict resolution
Complete
Tombstone & GDPR erasure
Complete
Snapshots & attestation
Complete
Natural language entry (fb())
Complete
SDKs (JS, Python, Go, Swift)
Complete
MCP server (AI agents)
Complete
OpenAI & Gemini integration
Complete
Whitepaper v1.2
Complete
Technical spec v0.5
Complete