← Back to Blog
AgentsFebruary 14, 2026·6 min read

The Agent Economy: AI That Understands Food

Last week a bakery in East London ran out of rye flour at 2am. By 2:04am, an AI agent had checked inventory levels, found a supplier with stock, negotiated a price within budget, and created a purchase order -- all without waking anyone up. At 7am the baker arrived to find the flour already on its way, with a full audit trail of every decision the agent made.

This is not science fiction. This is what happens when AI agents operate on a shared, structured data layer. The agent did not scrape websites or parse emails. It read FoodBlocks -- the same data primitives that power every interaction on the FoodX network -- and created new ones to record its actions.

Why food needs autonomous agents

Running a food business involves an extraordinary amount of repetitive decision-making. When do I reorder ingredients? Which supplier has the best price this week? Is this delivery going to arrive before my morning rush? How much bread should I bake tomorrow based on the weather forecast and my sales history?

These are not hard decisions individually. But collectively, they consume hours every day. A small bakery owner spends time on the phone with suppliers, checking inventory, adjusting orders -- time they could spend baking. A restaurant manager manually checks surplus at close, decides what to discount, and coordinates with local charities for donation pickups.

AI agents can handle all of this. But only if they have two things: structured data to reason over, and a safe way to take action. FoodBlock provides both.

The draft/approve pattern

The core safety mechanism is deceptively simple. When an agent wants to take action -- place an order, list a surplus item, respond to a customer -- it does not execute directly. It creates a draft block. The draft is a regular FoodBlock with state.draft = true.

// Agent creates a draft order
{
  "type": "transfer.order",
  "state": {
    "draft": true,
    "quantity": 25,
    "unit": "kg",
    "amount": 62.50,
    "currency": "GBP",
    "note": "Rye flour restock - current stock below threshold"
  },
  "refs": {
    "item": "f8c2a1...flour-product-hash",
    "from": "b3d7e9...supplier-hash",
    "to": "a1c4f6...bakery-hash",
    "agent": "e9b2d4...agent-hash"
  }
}

What happens next depends on the agent's permissions. Every agent has scoped capabilities: which block types it can create, maximum amount per action, and an auto-approve threshold. If the order is below the threshold, it is confirmed automatically. If it exceeds the threshold, it goes to the human operator for review.

This is the key insight: you do not need to choose between full automation and full manual control. The bakery owner might set the agent to auto-approve flour orders under 100 pounds, but require approval for anything above that. The charity coordinator might let the agent auto-accept donations of non-perishable items but flag fresh produce for manual scheduling.

Example: the bakery inventory agent

Let us walk through how a bakery might set up an agent. First, the agent is registered as an actor.agent FoodBlock with an Ed25519 keypair. Every action the agent takes is cryptographically signed, creating an unbreakable audit trail.

// Agent registration
{
  "type": "actor.agent",
  "state": {
    "name": "Borough Bakery Assistant",
    "model": "claude-sonnet",
    "capabilities": [
      {
        "type": "transfer.order",
        "max_amount": 500,
        "auto_approve_under": 100,
        "rate_limit": 10
      },
      {
        "type": "substance.product",
        "auto_approve_under": null,
        "rate_limit": 50
      }
    ]
  },
  "refs": {
    "operator": "a1c4f6...bakery-owner-hash"
  }
}

The agent subscribes to events: new orders (transfer.order), inventory changes (substance.product updates), and supplier listings (substance.product from subscribed suppliers). When a relevant block appears, the agent receives it in real-time via PostgreSQL LISTEN/NOTIFY.

Here is what a typical morning looks like for the agent:

  • 5:00am -- Agent checks current inventory against historical sales data and the day's weather forecast. Rainy Tuesday means 15% fewer customers but higher demand for comfort items like cinnamon rolls.
  • 5:02am -- Detects that rye flour stock is at 3kg, below the 10kg threshold. Creates a draft order for 25kg from the preferred supplier.
  • 5:02am -- Order amount (62.50 pounds) is below the 100 pound auto-approve threshold. Draft is auto-confirmed. Supplier's agent receives the order immediately.
  • 5:05am -- Agent adjusts the day's production schedule: fewer baguettes, more cinnamon rolls. Creates updated substance.product blocks with revised quantities.
  • 6:30pm -- End of day. Agent identifies 8 unsold sourdough loaves. Creates a surplus listing and notifies three local food banks. A charity agent claims the donation within minutes and arranges pickup.

Every single one of these actions is a FoodBlock. Every decision can be audited. Every interaction is traceable.

Agent memory and learning

Agents do not just execute rules -- they learn. Every time an agent makes a decision and observes the outcome, it stores that observation as an observe.preference FoodBlock. This memory is append-only, scoped to the agent, and cryptographically linked to the source data.

// Agent memory block
{
  "type": "observe.preference",
  "state": {
    "observation": "Rye flour from Stone Mill delivers 2h faster than Kent Grain Co",
    "confidence": 0.85,
    "context": "delivery_speed",
    "sample_size": 12
  },
  "refs": {
    "agent": "e9b2d4...agent-hash",
    "subject_a": "b3d7e9...stone-mill-hash",
    "subject_b": "c7f2a8...kent-grain-hash"
  }
}

Over time, the agent builds a rich model of supplier reliability, customer preferences, seasonal patterns, and pricing trends. Because memories are FoodBlocks, they participate in the same trust and provenance system as everything else. You can trace exactly why an agent made a particular decision, all the way back to the original data.

MCP as the bridge

We have built a Model Context Protocol (MCP) server that exposes FoodBlock operations as tools that any AI model can use. Claude, GPT, Gemini -- any model that supports function calling can become a FoodBlock agent through MCP.

The MCP server provides twelve tools: creating blocks, querying by type, following provenance chains, building trees, managing agents, and more. An AI agent does not need to understand the FoodBlock protocol in detail. It describes what it wants to do in natural language, and the MCP tools translate that into structured operations.

This is what makes the agent economy composable. A bakery agent and a supplier agent and a logistics agent can all operate independently, using different AI models, running on different infrastructure. They communicate through FoodBlocks. The protocol is the shared language.

Safety: capabilities, amount caps, rate limits

Giving AI agents the ability to spend money and make commitments on your behalf requires robust guardrails. The FoodBlock agent system has three layers of protection:

  • Capability scoping. Each agent can only create specific block types. A bakery agent might have permission to create transfer.order and substance.product blocks, but not actor blocks. It literally cannot perform actions outside its scope.
  • Amount caps. Every capability has a maximum amount per action. If an agent tries to create an order for 5,000 pounds when its cap is 500, the action is rejected before it reaches the draft stage.
  • Rate limits. Agents have per-hour rate limits for each capability. If something goes wrong and an agent enters a loop, the rate limit stops it from flooding the system.

And beneath all of this is the draft/approve layer. Even if an agent has all the right permissions, high-value actions still require human confirmation. The operator sees exactly what the agent wants to do, the reasoning behind it, and can approve or reject with a single tap.

The agent economy is not about replacing humans. It is about giving food businesses a tireless, intelligent assistant that handles the operational load while the humans focus on what they do best: creating great food.

Related posts