Prompt engineering, context engineering, agentic engineering and harness engineering are four names for four layers of the same job: getting dependable work out of AI. They go from smallest to biggest. Each layer contains the one before it.
The names are new, they overlap, and they will change. So treat this article as a map, not a rulebook. The map is our own plain summary of how companies such as Anthropic and OpenAI describe these ideas.
The map from smallest to biggest
- Prompt engineering: how you ask. Writing a clear instruction, with the task, context, format and examples.
- Context engineering: what the model sees. Choosing the instructions, documents, examples, tool results and memory that are in front of the model at each step.
- Agentic engineering: what the system does. Designing and supervising AI that plans, uses tools and acts over many steps, with a person accountable.
- Harness engineering: what holds it together. Building the tools, permissions, memory, checks, logs, retries and approval gates around an agent so it works dependably.
Anthropic's own writing supports the first step on this map. Its engineering article on context engineering calls it the natural progression of prompt engineering, and says prompting is mainly about writing and organising instructions, while context engineering covers all the information that ends up in front of the model.
A single example through all four layers
Take a small business owner who wants help answering customer emails.
- Prompt: "Write a friendly reply to this customer. Under 100 words. Offer a refund if the order is more than five days late."
- Context: attach the shop's returns policy and two past replies you liked, and leave out the rest of the inbox, so the tool has the right facts and no clutter.
- Agentic: let a tool read incoming emails, look up the order, draft a reply and put it in a drafts folder. It chooses its steps. You decide what it may touch.
- Harness: the drafts folder is the only place it can write. Anything involving a refund over a set amount needs your approval. Every action is logged. A check confirms the order number in the reply matches the order it looked up. If the lookup fails twice, it stops and asks you.
Notice that nothing about the model changed between layers. What changed is how much is built around it.
What each layer looks like for a non-developer
- Prompt: you write clear requests and refine them. This is the place to start.
- Context: you choose which files to attach, you trim long chats, you start fresh when a conversation drifts and you keep a short note of your background facts.
- Agentic: you use features that let a tool search, open files or take steps for you. You start with low-risk tasks and say what is off limits.
- Harness: you use the settings that already exist: what the tool is allowed to access, which actions need your approval, where the history is kept and how to undo a change.
What each layer looks like for a developer
- Prompt: system prompts and task prompts, tested against real examples. Anthropic's guide recommends clear instructions and examples, structured so that instructions, context and examples are easy to tell apart.
- Context: deciding what enters the window at each step. Anthropic describes keeping the set of information small and high-signal, loading data just in time, and using notes and summaries for long tasks.
- Agentic: choosing between a workflow, with predefined code paths, and an agent, where the model directs its own steps. Anthropic recommends the simplest solution that works.
- Harness: the code and configuration around the loop. Anthropic and OpenAI both describe environments, progress notes, tests and feedback loops as the places where reliability is won.
Which to learn first, and why
Learn them in order. Prompting is the base, and it takes a few days of practice. Context comes next, because the moment you attach a document or hold a long conversation you are already managing it. Agents come after you are comfortable checking an AI tool's work, because an agent can do more before you look. The harness comes last for most people. If you build agents, it becomes a main skill.
Skipping ahead causes trouble. A powerful agent with weak prompts and messy context just makes mistakes faster, and with more reach.
Things that stay true at every layer
- A person stays accountable. Tools do not carry responsibility.
- Check the result. Confidence in the wording is not proof.
- Share only what is safe to share. Do not paste private or confidential data into tools your organisation has not approved.
- Start small, add one change at a time, and keep notes on what worked.
- Keep it simple. More layers are only worth it when the simple version falls short.
Tools, features and even these terms change over time, and they differ by plan and provider. Check the current documentation for what you use.
Sources used for this article, as they stood when we read them. Pages may change after we publish.
- Anthropic, Effective context engineering for AI agents: https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
- Anthropic, Building effective agents: https://www.anthropic.com/engineering/building-effective-agents
- Anthropic, Effective harnesses for long-running agents: https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
- OpenAI, Harness engineering: leveraging Codex in an agent-first world: https://openai.com/index/harness-engineering/
- Anthropic, Prompting best practices: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
Common questions
Which one should I learn first?
Start with prompt engineering. It is the smallest piece, it needs no code, and the habit of clear instructions carries into every other layer. Move to context when your tasks involve documents or long conversations, and to agents and harnesses when you let a tool act on its own.
Are these four official categories?
No. They are terms people use, and the edges overlap. Prompt and context engineering are described in Anthropic's writing, agents in its "Building effective agents" article, and harness engineering in posts from Anthropic and OpenAI. The map in this article is our own simplification.
Will these terms still be used in a year?
Some may. Some may change meaning or be replaced. The ideas underneath, which are clear instructions, the right information, careful action and good checks, are likely to stay useful.
Official pages to check
AI tools change quickly. Check the vendor's current help page before you act, and review anything an AI tool produces before you rely on it.