# 32.1 The foundation, not the platform (/affordable-self-improving-ai-workers/choosing-the-foundation/the-foundation-not-the-platform)

---
type: Document
title: "32.1 The foundation, not the platform"
description: "What every AI worker runs on, which parts you choose and which you build, and why the professional layer is yours on every foundation."
status: stable
order: 432.01
ksor:
  owner: team:panaversity
  audience: [ public ]
  approval:
    by: process:panaversity
    at: 2026-11-30T08:18:55Z
chapter: "32"
part: IV
expert_status: manager
concepts: [ "32.1" ]
last_verified: 2026-11-29
generated:
  at: 2026-11-30T08:18:55Z
  by: human:zia
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**In everyday life.** A restaurant does not build its own ovens, fridges or building. It rents or buys them. What makes it a restaurant is the menu, the recipes and the service. Choosing the kitchen still matters: a kitchen that only takes one supplier's gas decides part of every meal's cost.

**What you will learn.** The four parts every AI worker runs on, which of them you choose, and which part you always build yourself.

**Why it matters.** If you think you must build a platform, you will either give up or spend a year on plumbing. If you know what to choose and what to build, you spend your time where your worker earns its money.

### Four parts you choose

Every AI worker that holds a job stands on four parts. You met three of them in Part III, and Chapter 23's reference page named the fourth.

| Part | What it does | In Part III |
| --- | --- | --- |
| **Harness** | Runs the model's loop: calls the model, runs its tools, keeps the transcript | The managed harness inside Claude Managed Agents |
| **Runtime** | Gives each conversation a place to run, keeps its state, wakes it when something happens | Anthropic's sessions and containers |
| **Process engine** | Runs long business processes with steps, retries and waits | Only named: Cloudflare Workflows, on Chapter 23's reference page. Chapter 34 builds it |
| **Model access** | Sends each request to a model, and pays for it | Claude models only |

These four parts are **the foundation.** You choose them. Good ones already exist, and they are hard to build well. A harness that survives a crash in the middle of a tool call took its authors many months.

### One layer you always build

On top of the foundation sits the **professional layer**. This is what makes your worker good at a job, and it is yours on every foundation:

- **Memory** that holds what the worker has learned about this company.
- **Rules**: what the worker may do, what needs a person's approval, and what it may spend.
- **Learning**: the loop from Chapter 31 that turns past runs into tested lessons.
- **Cost control**: knowing what each piece of work costs, and sending it to the right model.

Claude Managed Agents gives you some of this layer too: memory stores and dreaming. The rules and the cost control stay yours. On an open stack, all four are yours, and later chapters of this part build them.

![Two columns, one per foundation. Each has the professional layer on top, in gold, with four parts: memory, rules, learning and cost control. Under it are the four parts of the foundation. On Claude Managed Agents: Anthropic's managed harness, Anthropic's sessions and containers as the runtime, Cloudflare Workflows as the process engine, and Claude models only. A note says Anthropic also gives you memory stores and dreaming, and rules and cost control stay yours. On the open stack: Pi Durable, open source, as the harness, Cloudflare Durable Objects as the runtime, Cloudflare Workflows as the process engine, and any model through AI Gateway, highlighted. A note says all four parts of the layer are yours to build. A line at the foot says the model is the biggest bill you control, so model access is where the two foundations differ most.](img/foundation-and-layer.png)

*Figure 32.1. The same four parts under every worker, and the same layer on top. What differs is who provides each part, and which models you may use.*

### The choice is a trade

A foundation that runs more for you saves engineering time. A foundation you can change gives you more control over cost. Neither is better in general. The rest of this chapter puts numbers on that trade for one real kind of worker.

> **The invariant.** Choose the foundation; build the professional layer. Never build a harness, a runtime or a process engine unless no existing one can do the job.

**Check yourself.** In the middle of a conversation, Brightline's AP worker needs to wait three days for a manager's approval without losing its place. Which of the four parts must handle that? *(The harness and the runtime together: the harness saves the run, and the runtime keeps it and wakes it. A wait inside a long business process that the worker has handed off is the process engine's job.)*
