Most agent demos skip the boring layers. Production agents die on the boring layers.
If you only remember four boxes, make them these:
- Model - the brain you can swap
- Tools - what the agent can touch
- Context - what the agent is allowed to know right now
- Harness - the loop that plans, acts, verifies, and hands off
Miss one and you do not have a system. You have a chat that sometimes works.
This is the compact production version of the same thesis as The 4 Layers of AI Work. Originally posted on X.
Layer 1 · Model
The model is a replaceable worker.
Pick one that is good enough for the task. Pin the version. Log which version ran. Do not rebuild your company around a single chat UI.
Production habit: treat model upgrades like dependency upgrades - changelog, smoke tests, rollback.
Layer 2 · Tools
Tools are capabilities with blast radius.
Shell, browser, DB, wallet, email, deploy hooks. Every tool needs:
- Scope (what it can touch)
- Auth boundary (whose credentials)
- Idempotency story (what happens if it runs twice)
- Human gate for irreversible writes
If the agent can spend money or ship code, tools without gates are a liability.
Layer 3 · Context
Context is not "more memory." It is the curated working set.
Production agents fail when the window fills with noise: old errors, irrelevant files, entire repos pasted by habit. The fix is selection and structure, not a bigger number on the model card.
Minimum production context stack:
- Task brief (goal + constraints)
- Current file / system state
- Relevant receipts from prior runs
- Explicit "do not do" list
See also: Your AI Agent Didn't Get Dumber. Your Context Did.
Layer 4 · Harness
The harness is the product.
It owns:
- Loop (plan → act → verify → log)
- Skills / plugins as behavior contracts
- Cron and messaging surfaces
- Approval gates
- Failure visibility
Without a harness, every improvement dies when the tab closes. With a harness, the second run is smarter than the first.
Longer take: The Harness Is The Product
Production readiness smoke test
Before you call an agent "in production":
- It can fail without silent corruption
- A human can see the last action and reverse or redo it
- Secrets are not in the prompt history
- You can swap the model without rewriting the tools
- There is a written handoff a teammate can run
If any fail, you are still in lab mode. That is fine - just do not sell it as done.
What to build next
- Map your current agent to the four layers on one page
- Put irreversible actions behind a gate
- Move repeated instructions into a skill file, not a longer system prompt
- Free checklist: Agent OS setup
- Install help: packages
Four layers. Ship the missing one first.