Your Agent Is Not the Model: Harness vs Inference Service Explained
People often talk about Claude as if it's a single entity, but an AI agent is a stack of three distinct layers. Knowing the difference saves you hours of debugging — when something goes wrong, you need to know whether to blame the model, the service, or the logic around it.
The Three Layers
- Model — the mathematical function that transforms input tokens into output tokens. Examples: Sonnet, Opus, Gemini.
- Inference service — the hosted service that runs the model and tracks usage. Examples: AWS Bedrock, Anthropic's API.
- Harness — the logic that shapes inputs, interprets outputs, and touches the outside world. This includes MCP and Skills — the model doesn't inherently know about them.
Put together, an agent system is a harness that calls an inference service, which runs a model. That's it.
Real-World Breakdown
| Agent System | Harness | Inference Service | Model |
|---|---|---|---|
| Claude Desktop | UI + MCP + local logic | Anthropic's inference service | Sonnet / Opus / Haiku |
| Claude CLI | Tool parsing + file I/O | Anthropic's inference service | Sonnet / Opus / Haiku |
| Cursor | Context assembly + tool routing | Cursor's inference layer | Sonnet / GPT / Gemini |
| Custom LangChain agent | Prompt templates + tool definitions | Bedrock, OpenAI, etc. | Your chosen model |
The same model (say, Sonnet) can behave differently depending on the harness — because the harness shapes inputs and interprets outputs. That's why your prompts work in Claude CLI but not in Cursor.
Debugging With This Mental Model
- Bad answers? Look at the harness — maybe it's not providing enough context.
- Too slow or expensive? Check the inference service — pricing and performance live there.
- Unexpected output? Is the model wrong, or is the harness feeding it garbage?
The article also notes that as models get smarter, some harness logic (like MCP or Skills) might become obsolete — so the way we build harnesses now may not age well.
Next time you say "my model did X," stop and ask: was it the model, or was it the harness orchestrating it?
📖 Read the full source: HN AI Agents
👀 See Also

GitHub Repo Owners: Use Git's --author Flag to Block AI Bot Spam
Archestra fought AI comment/PR spam by exploiting GitHub's 'prior contributors' setting and Git's --author flag to whitelist real humans via a captcha-based onboarding flow.

Interactive Explainer Maps Claude Code Agent Loop Designs, from Single Calls to Self-Mutating Prompts
An interactive site built with Opus 4.7 visualizes 11 real agent loop designs for Claude Code, from basic calls to agents that rewrite their own prompts, with SVG animations showing memory and loop mechanics.

You Can Run OpenClaw: Three Paths to an AI Agent (No Terminal Required)
OpenClaw's one-liner installer, managed platforms, and local ollama models remove the technical barrier. Pick your path and start with boring tasks.

Using AI as a Cognitive Partner Instead of a Code Factory
A Reddit post proposes a system prompt called 'Cognitive Authorship Copilot' that forces AI to act as a pair programming partner rather than an autonomous solution generator, with three intervention levels based on task complexity.