Featured | 2026-07-26 | 13 min read

The 6 Levels of AI Engineering

A plain-English map of the six AI engineering levels: basic chat, prompt, context, loop, graph, and harness engineering.

Direct answer: The six levels of AI engineering are basic chat, prompt engineering, context engineering, loop engineering, graph engineering, and harness engineering. Each level fixes a different failure: unclear task, weak instruction, missing context, unreliable repetition, complex control flow, or unsafe runtime.

Written by: , AI Visibility Strategist & Founder, Martecks

Short answer

The six levels of AI engineering are basic chat, prompt engineering, context engineering, loop engineering, graph engineering, and harness engineering.

Basic chat is a one-off answer. Prompt engineering improves the instruction. Context engineering improves what AI can see. Loop engineering improves how AI works through steps, checks output, retries, and stops. Graph engineering improves how knowledge, tools, states, decisions, and workflows connect. Harness engineering improves the operating layer around the agent.

The 6 levels

Use this ladder when deciding what to fix first.

LevelWhat it improvesBest question to ask
1. Basic chatThe one-off answer.Do I only need an explanation, summary, or quick idea?
2. Prompt engineeringThe instruction.Did I ask clearly enough?
3. Context engineeringThe information available to the model.Does the AI have the right files, examples, data, rules, and tools?
4. Loop engineeringThe repeated work cycle.Can the AI plan, act, check, retry, and stop safely?
5. Graph engineeringThe workflow and relationship map.Do entities, tools, sources, states, branches, and decisions need to be connected?
6. Harness engineeringThe runtime around the model.Does the agent have the right tools, memory, permissions, sandbox, tracing, and handoffs?

How it matches the AI skill ladder

The seven-level AI skill ladder is about the person using AI. This six-level engineering ladder is about the system being built.

They fit together cleanly. Beginners start with basic chat and better prompts. Power users build context. Operators design workflows, loops, graphs, and runtime controls. The mistake is jumping to the advanced layers before the simpler ones work.

A simple coding-agent example

Imagine asking an AI coding agent to fix a bug.

At the prompt level, you tell it the bug, the expected behavior, and the output you want. At the context level, you give it the relevant files, error message, screenshots, tests, and product rule. At the loop level, it reads the code, makes a small change, runs the test, checks the result, and tries again if it failed.

Graph engineering appears when that work is no longer one straight path. The agent might branch into frontend, backend, and database checks. It might pause for human approval before changing auth. It might route a risky migration to review while letting a copy fix ship. Harness engineering is the environment that makes all of that possible: tools, permissions, logs, memory, sandboxes, and handoffs.

LayerBug-fix example
PromptFix this checkout bug and explain the files changed.
ContextUse the failing test, error log, payment rules, and related files.
LoopInspect, edit, test, review, retry, stop.
GraphRoute frontend, backend, database, and approval paths separately.
HarnessGive the agent tools, permissions, tracing, memory, and safe limits.

Basic chat

Basic chat is the starting level. You ask AI a question and get an answer: a summary, explanation, brainstorm, rewrite, comparison, or checklist.

It is useful, but it is not yet engineering. There is no reusable instruction, no durable context, no verification loop, no state, and no runtime. That is why basic chat is good for learning and weak for repeatable business work.

Prompt engineering

Prompt engineering is still useful. It is the practice of giving clear instructions, constraints, examples, and desired output formats.

Use it when the model already has enough information but gives the wrong shape of answer. If the answer is too generic, too long, too vague, or formatted badly, the prompt may be the problem.

Sources: OpenAI: prompt engineering guide

Context engineering

Context engineering is the next layer. It is the work of giving the model the right information at the right time: source files, examples, business rules, retrieved knowledge, memory, tools, and constraints.

LangChain describes context engineering for agents as managing what enters the model context through writing, selecting, compressing, and isolating context. In plain English: do not dump everything into AI. Give it the right material for the current step.

Sources: LangChain: context engineering in agents

Loop engineering

Loop engineering is what happens when AI needs to keep working, not only answer once. A loop gives the model a goal, context, tools, checks, retry rules, and a stop condition.

This matters for coding agents, content workflows, lead follow-up, research, audits, and any task where the first answer is not enough. A good loop does not run forever. It knows when to verify, when to retry, when to ask for help, and when to stop.

Graph engineering

Graph engineering is the connection layer. It becomes useful when the hard part is not one answer or one loop, but the connections between entities, documents, sources, tools, states, branches, approvals, and decisions.

There are two common meanings. GraphRAG uses knowledge graphs to retrieve connected evidence before answering. Agent graphs and state machines use graph-shaped control flow to decide what an AI system is allowed to do next. They are related, but they solve different problems.

Sources: Microsoft GraphRAG documentation, LangGraph overview

Harness engineering

Harness engineering is the runtime layer around the model. It includes the system prompt, tool definitions, memory, file access, browser or shell access, model routing, middleware, permissions, logs, traces, sandboxes, approval gates, and handoffs.

This is why two teams can use the same model and get very different results. One team gives the agent clean tools, narrow permissions, durable state, and observable execution. The other gives it a vague prompt and hopes the model behaves. The model may be similar; the working conditions are not.

A good harness does not make the agent magically intelligent. It makes the agent safer, easier to resume, easier to inspect, and less likely to waste tokens by rereading the same messy context every turn.

Harness partWhat it controls
ToolsWhich APIs, files, browser actions, shell commands, databases, or MCP tools the agent can use.
Memory and stateWhat persists across turns, sessions, checkpoints, compaction, or handoffs.
PermissionsWhat the agent can read, change, publish, spend, or escalate.
ObservabilityTraces, logs, tool inputs, tool outputs, costs, latency, failures, and review points.
Safety boundarySandboxing, approvals, allowlists, secret handling, and human authorization.

Which one do you need?

Pick the layer that matches the failure.

SymptomLikely fix
You only need a quick explanation, summary, or brainstorm.Basic chat.
The AI misunderstands the task.Prompt engineering.
The AI lacks facts, examples, brand voice, or source material.Context engineering.
The AI needs to check, revise, retry, or run a repeated workflow.Loop engineering.
The AI needs connected evidence, entity relationships, tool paths, or legal workflow states.Graph engineering.
The AI cannot safely access tools, remember progress, run in a sandbox, or show what happened.Harness engineering.
The AI keeps producing plausible but wrong work.Context plus loop: better sources and better verification.

How the layers work together

A serious agent usually needs several levels, but not all at the same depth.

Imagine a research-and-publishing agent. Basic chat helps explore the idea. The prompt defines the task. The context provides sources, brand rules, and examples. The loop drafts, checks, revises, and stops when the evidence passes. The graph controls branching: research, draft, review, approval, publish, or retry. The runtime supplies tools, memory, sandboxing, logs, permissions, and handoffs.

That is the clean sequence: basic chat, prompt, context, loop, graph, harness. Each level answers a different failure.

LevelFailure it fixesDeeper guide
Basic chatYou need a quick answer, not a reusable system.The 7 Levels of AI Skill
PromptThe model does not understand the instruction.Prompt Engineering vs Context Engineering
ContextThe model lacks the right material.What Is Context Engineering?
LoopThe first attempt is not reliable enough.Loop Engineering
GraphThe workflow has branches, states, joins, or approvals.What Is Graph Engineering for AI Agents?
HarnessThe runtime lacks tools, state, permissions, tracing, or safety.What Is AI Agent Harness Engineering?

Read this cluster in order

These ideas are not competing terms. They are levels. Start with the full map, then move through instruction, context, repeated work, control flow, connected knowledge, runtime, token management, and the human skill ladder.

Use the sequence below when deciding what to fix first. If the work only needs a quick answer, basic chat is enough. If the instruction is unclear, improve the prompt. If the model lacks facts, improve context. If the work needs checking and retries, design a loop. If the work branches, use a graph. If the agent needs tools and permissions, improve the harness.

StepGuideWhat it clarifies
1The 6 Levels of AI EngineeringStart with the main map: basic chat, prompt, context, loop, graph, and harness engineering.
2What Is Prompt Engineering in AI?Then learn the instruction layer: how to ask clearly when the model already has enough information.
3Prompt engineering vs context engineering: the simple differenceSeparate the ask from the information environment around the ask.
4What Is Context Engineering? The Skill Better Than PromptingLearn the information layer: files, examples, memory, tools, constraints, and retrieval.
5Loop Engineering: The Skill After Prompt EngineeringMove into repeated work: goals, checks, retries, stop rules, and human review.
6AI Agent State Machines: The Old Idea Behind Loops and GraphsLearn the control-flow idea behind loops and graphs: states, events, guards, actions, and exits.
7What Is Graph Engineering for AI Agents?Use graph engineering when the workflow needs branches, joins, parallel work, approvals, and recovery paths.
8GraphRAG Explained: When Knowledge Graphs Beat Basic RAGSeparate knowledge graphs for retrieval from agent graphs for control flow.
9What Is AI Agent Harness Engineering?Understand the runtime around the model: tools, permissions, memory, state, traces, sandboxes, and handoffs.
10Stop Wasting Tokens: The Claude Code Context WorkflowFinish with token and context management so the workflow stays cheaper and easier to steer.
11The 7 Levels of AI Skill: From Prompts to OperatorsUse the AI skill ladder as the companion guide for the human capability side: answers, prompts, context, workflows, tools, builders, and operators.

The human roles behind the levels

The engineering levels explain the system. The human roles explain the work.

A Prototyper works closest to basic chat and prompt engineering. A Builder moves into context and harness. A Sweeper improves loops and security. A Grower connects content, distribution, and measurement. A Maintainer keeps the system useful after launch.

Sources: The 5 AI Roles That Matter More Than Job Titles

Final answer

Basic chat is the answer level. Prompt engineering is the instruction level. Context engineering is the information level. Loop engineering is the repeated-work level. Graph engineering is the connection and control-flow level. Harness engineering is the runtime level around the model.

Learn them in that order. It keeps AI from feeling like magic and turns it into a system you can improve one layer at a time.