Protocol Background
OPEN STANDARD

FoodBlock Protocol

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

Read the WhitepaperTechnical Specification

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 (things that exist) and three actions (things that happen). Subtypes use dot notation: substance.product, observe.review, transfer.subscription.

Entities: things that exist

actor

A person or organisation. A farmer, a restaurant chain, a food bank, a home cook selling meal prep.

{ "type": "actor", "state": { "name": "Kent Farm", "role": "producer" }, "refs": {} }

place

A physical location. The coordinates of a farm, the terroir of a vineyard, a market stall, a kitchen.

{ "type": "place", "state": { "name": "Borough Market", "lat": 51.50, "lng": -0.09 }, "refs": {} }

substance

An ingredient, product, or material. Tomatoes, sourdough, a meal prep box, flour, starter culture.

{ "type": "substance.product", "state": { "name": "Tomatoes", "price": 3.00, "organic": true }, "refs": { "seller": "a3f..." } }
Actions: things that happen

transform

Changing one thing into another. Cooking, processing, fermenting, growing. A recipe is a transform subtype.

{ "type": "transform.recipe", "state": { "name": "Sourdough", "time": "4h" }, "refs": { "inputs": ["flour_hash", "water_hash", "starter_hash"] } }

transfer

Moving something between actors. A sale, a delivery, a gift, a surplus rescue. Value changing hands.

{ "type": "transfer.order", "state": { "qty": 2, "amount": 6.00 }, "refs": { "item": "b7c...", "from": "a3f...", "to": "d2e..." } }

observe

Making a statement about something. A review, a photo, a certification, a health inspection. Trust is built here.

{ "type": "observe.review", "state": { "score": 4.8, "text": "Best tomatoes in Kent" }, "refs": { "subject": "b7c...", "author": "d2e..." } }

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.

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 via Stripe = real interaction. Weight trust by financial history.
4
Temporal Validity
Decay
Certifications expire. Trust scores check timestamps.
5
Contextual Trust
Relevance
A great baker might be a terrible caterer. Trust is per-type, not global.
The Trust Formula
Trust(actor, context) =
  (authority_certs WHERE valid_until > NOW() x 3)
  + (peer_reviews WHERE reviewer.verified_orders > 0 x review_weight)
  + (chain_depth x 2)
  + (verified_order_count x 1.5)
  + (account_age x 0.5)

Agent Infrastructure

Autonomous agents are first-class actors in the FoodBlock protocol. They register, propose actions, and build memory โ€” all as FoodBlocks.

1
Registration
actor.agent
Agents register as actor.agent FoodBlocks with Ed25519 keypairs. Every agent has a content-addressed identity, an operator (human owner), and scoped capabilities.
2
Permissions
capabilities[]
Scoped by block type (e.g. transfer.order), amount caps, auto-approve thresholds, and rate limits per hour. Agents can only act within their granted capabilities.
3
Draft โ†’ Approve
two-phase commit
Agents propose actions as draft blocks. Low-value actions auto-approve instantly. High-value actions queue for human confirmation. Every draft is a FoodBlock.
4
Event Subscriptions
pub/sub
Agents subscribe to block type patterns (e.g. transfer.*, substance.product). New blocks trigger handlers in real-time via PostgreSQL LISTEN/NOTIFY.
5
Memory
observe.preference
Agents store preferences and learned state as observe.preference FoodBlocks. Memory is append-only, scoped to the agent, and cryptographically linked to its source data.
Agent Lifecycle
Registeractor.agent
Subscribetransfer.*, substance.*
Receive Eventblock notification
Create Draftstate.draft = true
Amount Check
< threshold
Auto-approve
> threshold
Human Approval
Confirmed Block
Store Memoryobserve.preference
Agent-to-Agent Commerce
๐Ÿž
Bakery Agent
actor.agent
Posts surplus
transfer.donation
โ†’
๐Ÿ’š
Charity Agent
actor.agent
Claims donation
transfer.shipment
โ†’
๐Ÿš›
Logistics Agent
actor.agent
Routes pickup
Three agents. Zero humans in the loop. Every action is a signed, traceable FoodBlock.
Federated Agent Network
Agents discover peers via /.well-known/foodblock. Blocks flow between servers in real time.

Status

Model (3 fields, 6 types)
Complete
Hash determinism
Complete โ€” canonical JSON, 124 cross-language vectors
Content-addressed identity
Complete โ€” SHA-256, tamper-evident, offline-valid
Trust computation
Complete โ€” 3-layer model, computed at query time
Cryptographic signing
Complete โ€” Ed25519 signatures, verifiable authorship
Encryption
Complete โ€” X25519 + AES-256-GCM, field-level access control
Selective disclosure (Merkle)
Complete โ€” field-level proofs without revealing state
Agent registration & permissions
Complete โ€” actor.agent, scoped capabilities
Agent draft/approve lifecycle
Complete โ€” two-phase commit with auto-approve
Agent memory & learning
Complete โ€” observe.preference blocks, append-only
Vocabularies
Complete โ€” 14 built-in (bakery, restaurant, farm, dairy, fishery...)
Templates
Complete โ€” 9 built-in (supply-chain, surplus-rescue, cold-chain...)
Federation & discovery
Complete โ€” .well-known/foodblock, peer sync
Merge & conflict resolution
Complete โ€” three-way merge, fork detection
Tombstone & GDPR erasure
Complete โ€” content erasure, chain integrity preserved
Snapshots & attestation
Complete โ€” periodic compaction, multi-party signing
Natural language entry point
Complete โ€” fb() parses plain English to blocks
SDKs (JS, Python, Go, Swift)
Complete โ€” 22+ modules each, full parity
MCP server (AI agents)
Complete โ€” 20 tools, Claude/Cursor/Windsurf ready
OpenAI & Gemini integration
Complete โ€” ChatGPT Custom GPTs, Gemini API
Whitepaper
Complete โ€” v1.2, scientific paper format, 5 diagrams
Technical specification
Complete โ€” v0.5, 31 sections