Khalid ShamsPrincipal Solutions Architect

Learn AI · guided paths, a living map and two illustrated lessons

Learn AI the way it learns.

A human-free studio of context trays, evidence shelves, instruments, a closed gate and service cabinets.⏸ Control boundary · Instruments represent software componentsBuild a picture of the ideas before learning the vocabulary. Explore the illustrated library →

AI is a web of ideas, not a glossary. This page lays out the forty-four ideas that matter as neurons on a map, from what a model is to when an agent is the right call: touch one and it fires into the ideas it depends on. Every idea is written three ways, so a curious parent and a new product manager can read the same map and stop at different depths. Below the map: where each idea sits in the stack, what separates a chatbot from an agent, how an agent actually thinks, and the questions people ask me most.

Start here

Three doors. Pick the one that sounds like you.

New to this: six short guided paths, in order, each ending with something you can picture and explain. Designing a system: say what you are building and get the route. Or wander: the map, the lessons and the stack are all open, and your progress is kept either way.

Door 1

I'm new to this

Six short paths, in order. Each one ends with something you can picture and explain.

  1. 1What AI is, really20 min
  2. 2How a machine learns25 min
  3. 3What a language model does20 min
  4. 4What makes it an agent25 min
  5. 5Running it safely25 min
  6. 6Should we build one?20 min

Start path 1

Architects compare three alternative system models and a blank recommendation record at a cobalt-accented table.
Read the concept diagram

Door 2

I design systems

Say what you are building. Get the lesson to watch, the gate to run, the playbook and a worked example.

Choose a situation

Door 3

Explore freely

The living map, the two atlas lessons, the stack, the questions people ask. Go anywhere; progress is kept.

Open the map

The SHAMS AI Atlas

See what each part does, and how the whole system works.

The map below teaches the words. The atlas puts them to work: one customer request followed through an illustrated, governed AI system, from who owns the goal to what the model proposes, what is checked before anything happens, and how the run ends. Switch between the picture and the architecture it stands for, turn on the SHAMS lenses, then break things on purpose: remove the evidence, deny a permission, make a tool fail, add a specialist.

Follow one request See a denied action Meet the specialist The architecture view How a model is made

Preview of the atlas scene: people outside an application runtime; inside, an agent operator at a bench with a goal card, a context tray, a model engine and tools, beside a procedure binder, notes cabinet and policy library; gates on the wall lead to connected services and a human approver.Preview of the atlas scene: people outside an application runtime; inside, an agent operator at a bench with a goal card, a context tray, a model engine and tools, beside a procedure binder, notes cabinet and policy library; gates on the wall lead to connected services and a human approver.

43 concepts across two lessons so far, each with a picture, three depths, its boundaries and where the analogy stops. Teaching simulation; all data synthetic.

The map

Forty-four ideas, wired the way they depend on each other.

Left to right: the foundations, how machines learn, how language models work, what turns a model into an agent, what it takes to run one safely, and how to decide whether you should. Tap any idea, or zoom to a cluster. Mark it "I get this" and it lights up; when two ideas you understand are linked, the link between them glows. Pick a guided circuit if you'd rather be walked through.

0 / 44 understood
IdeaUnderstoodSelected

Progress is saved in this browser only. Nothing is sent anywhere.

Nobody needs to understand a transformer to run a company on one. They need to know what it may do, where it gets its facts, and who can stop it.

The stack

Seven layers. Every AI word you've heard lives in exactly one of them.

Most confusion about AI comes from mixing layers: arguing about the model when the problem is the data, or buying an agent framework when what's missing is a guardrail. Read bottom to top. Each layer only works if the one under it is in place, and that order is also the order I build in.

  1. 07

    People and products

    Where AI meets the work: the assistant in a tool, the copilot in a workflow, the approval a person gives before anything irreversible happens.

    AssistantsCopilotsWorkflowsApprovalsHuman in the loop
    The question it answersWho is accountable when it's wrong?
  2. 06

    Control

    The parts that make it safe to run: checks in code that the model cannot talk its way past, tests that run on every change, traces that explain what happened, and an off switch.

    Guardrails and hooksEvaluationObservabilityIdentity and permissionsKill switchCost ceilings
    The question it answersHow do I know it won't do something stupid?
  3. 05

    Agents

    The loop that decides, acts, checks the result, and repeats until the job is done. One agent for a narrow job; a coordinator with specialists for a broad one.

    The agentic loopPlanner and specialistsMulti-agent coordinationHandoffs
    The question it answersWhat makes it an agent and not a chatbot?
  4. 04

    Tools and protocols

    How the model asks your software to do something. The model never runs anything itself; it emits a structured request, your code validates and executes it, and the result goes back as a message. MCP lives here, between the agent and your systems: it standardises how tools and data are plugged in, so each integration is built once and works with any model. It standardises the connection, not the permission. Who may call what is still yours to enforce.

    Function callingMCP servers and clientsAPIsAPI ManagementKey Vault
    The question it answersHow does it actually do things?
  5. 03

    Context

    Everything placed in front of the model for this one request: the standing instructions, what you typed, documents retrieved for the question, and memory brought back in. The model sees only this, nothing else.

    System promptPromptingRetrieval (RAG)MemoryContext window
    The question it answersWhy doesn't it remember me?
  6. 02

    Models

    The trained thing that predicts. Large language models write; embedding models turn meaning into numbers; small models classify and extract. Fine-tuning adjusts behaviour; it does not add facts reliably.

    Large language modelsEmbeddingsSmall and specialist modelsFine-tuning
    The question it answersWhat is GPT, Claude, or Llama actually?
  7. 01

    Data

    What the model learned from, and what your organisation owns: documents, databases, the lakehouse, the labels on the examples. Every fact the system states comes from here or from the model's training, and only one of those is governed by you.

    Training dataYour documentsDatabases and lakehouseLineage and classification
    The question it answersWhere does it get its facts?

How does the stack affect delivery? Explore the components, team design and coordination costs, with a free one-page field guide.

The same seven layers are the inner ring of the estate map in the SHAMS Method, and the build order in every playbook.

Four kinds

A model, a chatbot, a workflow, an agent. They are not the same thing.

People say "AI" for all four. The difference is who decides the next step and who takes the action. That difference is also where the risk lives, which is why I ask it first in every engagement.

Language model
Assistant
AI workflow
Agent
What it is
The raw predictor. Text in, text out.
A model with a conversation, standing instructions, and sometimes your documents.
A fixed sequence of steps written by a person, with a model doing some of the steps.
A model in a loop that chooses its own next step and uses tools to do it.
Who decides the next step
Nobody. There is one step.
You, by what you ask next.
The person who drew the flowchart.
The model, within the boundaries you set.
Takes actions?
No.
Rarely; it answers.
Yes, the ones in the sequence.
Yes, the ones its tools allow.
Remembers?
Only the current request.
The conversation, until it ends.
Whatever the steps store.
Whatever you give it a place to store.
Everyday example
The autocomplete behind everything else.
A chat window that answers questions about your handbook.
Every new invoice gets read, summarised, and routed to approval.
"Find why this customer's order is late and fix it" with the agent checking three systems and drafting the reply.
Use it when
You are building one of the other three.
The value is answers, and a person acts on them.
The steps are known and repeat; you want AI judgment inside a fixed path.
The steps vary each time and a person cannot be in every one.
Watch out for
Confident wrong answers.
Answering from data the user was never cleared to see.
A step that fails silently and the rest keep going.
Taking an action nobody designed a check for.

Most organisations should start at assistant or workflow and earn their way to agents. The autonomy ladder is how I decide when a system is ready to move right.

When to build an agent

Four questions decide it. Most teams should answer "not yet" to the last one.

An agent is the most expensive and least predictable of the four kinds, so it has to earn its place. Walk the questions in order. The first "yes" tells you what to build. Wherever you land, you can move one step to the right later, once the gates for that step are passed; that is the whole idea of the autonomy ladder.

Decision tree: is the task one step, do the steps repeat, does a person act on the answer, can you afford the controls; leading to model, workflow, assistant, agent, or assistant for now Is it one step?Text in, text out, nothing else. yes Use a modelOne call to the API.Keep it simple. no Do the steps repeat?Same path every time, known in advance. yes Build a workflowA person draws the path.AI does some of the steps. no Does a person act on it?The value is the answer, not the action. yes Build an assistantGrounded in your documents.Autonomy ladder level 1. no Can you afford the controls?Typed actions, evaluation, traces,a cost ceiling, an off switch. yes Build an agentStart at level 2: it drafts, a personapproves. Earn levels 3 and 4. no Assistant, for nowBuild the controls first. The eightgates are the list. Then come back. Each box to the right is one rung up the autonomy ladder.

Why this order

Each kind to the right costs more to build, more to run, and more when it is wrong. A workflow fails in one visible place; an agent fails somewhere in a loop nobody drew. So the question is never "could an agent do this?" (usually yes) but "what is the simplest kind that delivers the value?" Teams that start one step simpler ship in weeks, learn what the real steps are, and then have the evidence to move right.

Pick the simplest kind that delivers the value. Move right one rung at a time, and only through the gates.

The controls in the last question are gates 05 to 08 of the eight gates. The gate check tells you in a few minutes which ones you are missing.

How an agent thinks

The agentic loop: four stations, one exit.

Strip away the frameworks and every agent is this loop. Your code sends the model the conversation so far. The model replies and says why it stopped: either it wants a tool run, or it is finished. If it wants a tool, your code runs it, appends the result, and goes round again. The only honest exit is the model's own stop reason.

The agentic loop: send request, model responds, check the stop reason, run the tool and repeat, or finish Station 1Your code sends the requestThe whole conversation so far, as a list ofmessages, plus the tools it may use. Station 2The model respondsText, or a request to use a tool, and astop reason that says which. Station 3Check the stop reason Station 4Run the toolValidate the arguments, execute, appendthe result to the messages. Go round again. ExitDoneThe stop reason was "end turn".Return the answer to the person. request response tool use end turn loop again

Ways people break the loop

  • Searching the text for "I'm done" instead of reading the stop reason.
  • Using a fixed maximum number of turns as the only exit, so the agent either stops mid-task or spins.
  • Asking the model whether it has finished, which it will answer confidently either way.
  • Letting the model's tool request run without validating the arguments against the schema first.

Read the stop reason for each response. Validate every tool call. Count the run as a success only when the goal is verified; a turn, time or cost limit is a legitimate exit, reported as exactly that. See a budget exit.

More than one agent

Hub and spoke: one coordinator, specialists with their own tools and their own context.

When the job is too broad for one agent, don't give one agent more tools. Give a coordinator the goal, let it split the work among specialists that each hold a narrow set of tools, and have it assemble the results. Each specialist works in its own isolated context: it cannot see the others' work, which is exactly what keeps it focused and cheap.

A coordinator agent in the centre sending tasks to a search agent, an analysis agent, and a synthesis agent, and receiving results back Each specialist has its own isolated context. It cannot see the others' work. CoordinatorOwns the goalBreaks the goal into work, routes it,aggregates what comes back, and decideswhen the goal is met. SpecialistSearch agentTools: search, fetch a page SpecialistAnalysis agentTools: read a document, extract SpecialistSynthesis agentTools: write, verify task results task results task results

The common mistake

The coordinator decomposes too narrowly. Asked why one tenant's requests are slow, it sends a specialist to check database CPU and nothing else, and the answer misses lock contention, a recent deployment and a noisy neighbour. I have watched people make the same mistake before any agent was involved: resize first, understand later. The fix is not a smarter coordinator. It is a goal ("find why this tenant is slow, with evidence") rather than a pre-baked task, and a result format that carries the evidence back.

Give goals, not task lists. Keep specialists narrow. Keep their context separate.

How many specialists is too many? Run the coordination cost: ten agents in a full mesh is 45 possible links, through a coordinator it is 9.

The enforcement question

A prompt is a request. A check in code is a rule.

Anything you write in a prompt is guidance the model usually follows. A rule you need to hold is a check in code that runs outside the model, at the boundary the action crosses, and decides allow, deny or ask a person. A hook is one place such a check can live, but not every hook enforces anything: some only log, and some ask another model. Name the behaviour you need and where it runs. And remember that code can be wrong too, so the check gets tests like anything else.

Prompt-based

Guidance the model weighs

"Refunds over $50 need a supervisor's approval."

Lives in the system prompt. The model reads it, weighs it against everything else in the context, and usually complies. Usually. Under pressure from a long conversation, a persuasive user, or an ambiguous case, it can be argued out of it, and you will not know until the refund has gone. Good for shaping how it works; not enough on its own for what it may do.

Good for
StyleToneFormattingPreferencesJudgment calls

Enforced in code

A blocking check at the boundary

before tool_call "issue_refund":
    if not caller.has_scope("refunds:issue"):
        return deny("not permitted")
    if call.amount > 50:
        return ask("duty_supervisor")
    return allow()

Runs in the application or the service, before the call executes, using the agent's configured identity. The model can propose the refund as often as it likes; the check decides, and every decision is logged. It holds as long as the code and its configuration are right, which is why it is tested and reviewed. In Claude Code, for example, a PreToolUse hook can return allow, deny or ask; a logging hook on the same event would enforce nothing.

Good for
MoneyComplianceSecurityData accessAnything irreversible

When money or access is on the line, enforce it in code at the boundary, and test that code. Watch a refund get denied before execution.

This is gate 05 of the eight gates: every action typed, validated, and reversible, with the rules that matter enforced outside the model.

Questions people ask me

The questions that come up in every first conversation.

Short answers, in order of how often I hear them. Each one links back to the idea on the map if you want to go deeper.

Is ChatGPT an agent?

Out of the box it is an assistant: a model with a conversation and standing instructions. It becomes agent-like when it is given tools (browsing, code, files) and allowed to decide when to use them. The product you are using may be either, depending on what is switched on. The test is: does it choose its own next step and act on it? The four kinds.

What is the difference between an LLM and AI?

AI is the whole field. A large language model is one kind of AI: a program that writes by predicting the next word, very well. Spam filters, route planners, and image recognisers are AI too, and most of them are not language models.

Why does it make things up?

Because it is built to produce the most likely next words, not to check them. When it lacks the fact, the most likely words still come out fluently. This is called hallucination. The fix is retrieval (letting it look the fact up in documents you trust), citations, and an evaluation that measures how often it happens.

Why doesn't it remember what I told it last week?

Because a model has no memory of its own. It sees only what is in front of it for this request, called the context window. Products that "remember" are storing notes outside the model and placing them back into the context each time. That is memory as a feature of the system, not of the model.

What is a token, and why do I keep seeing the word?

The small chunks of text a model reads and writes, often parts of words. Everything about a model is counted in tokens: the price, the speed, and how much it can hold at once.

What is a system prompt?

The standing instructions a model is given before the conversation starts: who it is, what it may do, how to answer. It is strong guidance, not enforcement. Anything that must never happen needs a rule in code, not a sentence in the prompt. The enforcement question.

What is RAG?

Retrieval-augmented generation: before the model answers, the system searches your documents for the relevant passages and places them in front of it. An open-book exam instead of answering from memory. It is how you get an assistant to answer from your handbook rather than from the internet in general.

Should we fine-tune a model on our data?

Usually not first. Fine-tuning changes how a model behaves and sounds; it is unreliable at adding facts, and it has to be redone when the facts change. For facts, use retrieval. Fine-tune when you need a consistent style or format, or a small model to do one narrow job cheaply.

What is MCP?

Model Context Protocol, an open standard for connecting tools and data sources to AI models. Think of it as one connector shape: a tool built once as an MCP server works with any model or agent that speaks the protocol. It sits in the tools layer, between the agent and your systems. It standardises how the connection is made, not who is allowed to use it; permissions are still yours to enforce. The stack.

What is the difference between function calling and MCP?

Function calling is how a model asks for a tool to be run: it emits a structured request that matches a schema you declared. MCP is how tools are packaged and discovered so that any model can find and call them. Function calling is the verb; MCP is the plug.

What does "multi-agent" mean, and do we need it?

Several agents with different jobs, usually one coordinating the rest. You need it when one agent would have to hold too many tools or too much context to stay reliable. Most teams don't need it on day one. Hub and spoke.

How do I know if an AI system is safe to let act on its own?

It can tell you what decision it makes and who owns it. It runs as the user, with the user's permissions. Every action is typed, validated, and reversible where it matters. There is a test set that runs on every change, a trace that explains each run, a cost ceiling, and an off switch someone has tested. If any of those is missing, keep a person in the loop. That list is the eight gates, and you can run the check on your own system.