The Agent Interconnection Model (AIM)

TL;DR

AI tooling changes weekly, but the plumbing is settling down. This is my working draft of a seven-layer model for AI agents, built the way OSI taught us to think about networks, with MCP as the narrow waist that connects agents to tools and data. It’s a mental model, not a standard.

Remember it asAIMAgent Interconnection Model
Top down
7 to 1
InL7RealL6ChangeL5Control,L4CaptureL3EveryL2RollbackL1
Bottom up
1 to 7
RealL1EngineersL2CheckL3ConfigsL4Constantly,L5RarelyL6ImprovisingL7

Three C layers sit side by side in the middle (Context, Capability, Connectivity). That’s the tricky part, and the order of the C words keeps them straight.

Working draft v0.1Updated November 18, 2026Status: mental model, not a standardBy Ryan Thomas Huff (NetworkNerd1337)

A seven-layer mental model for AI agents, and where the Model Context Protocol fits in it.

What this is, and why I wrote it

Every week there’s a new agent framework, a new “agentic” product, and somebody on LinkedIn declaring the last thing dead. Underneath all that noise, though, the plumbing has been quietly settling down. The Model Context Protocol has become the common way agents reach tools and data, Agent Skills turned procedural know-how into a folder you can version and share, and A2A gave agents a way to hand work to each other. Those pieces sit at different heights in the stack, and once you see the heights, a lot of the noise sorts itself out.

That’s what this page is for. The OSI model never really won as a protocol suite, but it won big as a way to think: thirty-some years later, network folks still say “that’s a Layer 2 problem” and everybody in the room knows where to look. I think agents need the same kind of shared map. The Agent Interconnection Model (AIM) is my attempt at one: seven layers from the systems an agent touches up to the person (or agent) asking for the work, plus two planes that cut across all of them. Let me be straight about what it is, though. This is a working draft of a mental model, not a standard and not a proposal to anybody. The layer names, the order, and the boundaries are my opinion, and I fully expect to move things around as the industry does.

How to read this page. Facts about MCP, A2A, Agent Skills, OSI and the like are current as of the date above, with sources at the bottom. Anything marked My take is opinion.

The model at a glance

Trust plane
Telemetry plane

The mnemonic words line up with their layers (top down on the left, bottom up on the right; on a phone they sit inside each band). Read it bottom to top, like OSI. Each layer consumes the one below and serves the one above. The pinch at Layer 3 is on purpose: that’s the narrow waist, and it’s where MCP lives. The two planes on the right cut across every layer.

Remembering the order

Network folks learned OSI with “All People Seem To Need Data Processing” going top down, or “Please Do Not Throw Sausage Pizza Away” going bottom up. AIM gets the same treatment, and both of these ought to sound familiar to anybody who’s sat through a change window:

  • Top down, 7 to 1: In Real Change Control, Capture Every Rollback. (Interaction, Reasoning, Context, Capability, Connectivity, Execution, Resource)
  • Bottom up, 1 to 7: Real Engineers Check Configs Constantly, Rarely Improvising. (Resource, Execution, Connectivity, Capability, Context, Reasoning, Interaction)

The tricky part is the middle. Three C layers sit right next to each other (Context, Capability, Connectivity), and that’s where folks will mix them up. The mnemonics keep them in line: going down it’s Change for Context, Control for Capability and Capture for Connectivity, and going up it’s Check for Connectivity, Configs for Capability and Constantly for Context. If you’d rather think it through than memorize it, the top-down order runs from what the model sees (Context), to what it knows how to do (Capability), to what it can reach (Connectivity).

The seven layers

L1

Resource

The real systems an agent ultimately reads from or changes.

What lives here
Systems of record and systems of action. Databases, file shares, SaaS apps, ticketing systems, source repos, cloud APIs, and yes, routers and switches.
Real-world examples and protocols
REST and GraphQL APIs, SQL, S3, Git, SSH, NETCONF and RESTCONF, SNMP.
Data unit
the record. A row, a file, a config, an API response.
When it breaks
The agent did everything right and the answer’s still wrong. The backend’s down, the data’s stale, you got rate limited, or the service account can’t see what it needs to see.

My take: This is the layer that never goes away. Agents come and go, but the switch in the closet still has a running config.

L2

Execution

Where code actually runs on the agent’s behalf, and with whose credentials.

What lives here
The processes behind MCP servers, the scripts that ship inside skills, the shell an agent runs commands in, sandboxes, containers, VMs, serverless functions, and the secrets that get injected into all of them.
Real-world examples and protocols
A local MCP server launched as a stdio subprocess, Docker containers, CI runners, and OpenSandbox, which the Agentic AI Foundation (AAIF) took on in October 2026.
Data unit
the invocation. A process with its inputs, exit code, stdout and stderr.
When it breaks
Missing dependencies, timeouts, “works on my laptop,” and the scary ones: an over-privileged service account or a sandbox that isn’t really a sandbox.
L3

Connectivity

MCP lives here

One standard way for an agent to discover and call tools and read data, no matter what’s behind them.

What lives here
MCP hosts, clients and servers. Tool, resource and prompt catalogs. Transports, authorization, gateways, and registries for finding servers.
Real-world examples and protocols
The Model Context Protocol, currently spec revision 2026-07-28, speaking JSON-RPC 2.0 over stdio or Streamable HTTP. HTTP deployments use an OAuth 2.1 based authorization flow. Gateways like agentgateway handle routing and policy, and the official MCP Registry handles discovery.
Data unit
the message. A JSON-RPC request and its result, like a tools/call and what came back.
When it breaks
The server’s unreachable, you’re getting 401s and 403s, the token was minted for the wrong audience, a tool’s schema changed underneath you, the versions don’t match, or you bolted 60 servers on and now the tool catalog is drowning the model.
L4

Capability

Skills live here

Packaged know-how that teaches an agent how to do a specific job well.

What lives here
Agent Skills. A skill is just a folder with a SKILL.md file in it: YAML frontmatter with a name and description, then plain Markdown instructions. Next to it you can nest scripts/ for code the agent can run, references/ for docs it reads when it needs them, and assets/ for templates and data.
Real-world examples and protocols
The Agent Skills open standard (agentskills.io), now an AAIF project. A made-up example: a change-window-precheck skill with a checklist in SKILL.md, a scripts/parse_show_run.py, and a sample report in assets/.
Data unit
the skill. One folder, one job.
When it breaks
The wrong skill fires because its description was vague, the instructions went stale, a script assumes a tool that isn’t installed, or somebody installed a skill off the internet that does something nasty.

My take: This is the layer I find most interesting, because it’s the first one that’s really just documentation that runs. If you’ve ever written a good runbook, you already know how to write a skill.

L5

Context

Decides what the model actually sees on this turn.

What lives here
System instructions, AGENTS.md files, conversation history, memory, retrieval (RAG), skill metadata, tool descriptions, results from earlier steps, and compaction when the window gets full.
Real-world examples and protocols
AGENTS.md (an AAIF project). Agent Skills’ progressive disclosure, where only about 100 tokens of name and description load at startup, the full SKILL.md loads when it’s needed, and supporting files load only if the task calls for them. MCP list results now carry cache hints and a stable order, which helps prompt caching up here.
Data unit
the context window. The assembled tokens for one model call.
When it breaks
The agent “forgot” something, the important bit got buried, the window overflowed, memory went stale, or a prompt injection rode in on a tool result and got treated like an instruction.
L6

Reasoning

The model and the agent loop that plans, picks an action, looks at the result and decides what’s next.

What lives here
The LLM itself, the inference API, the plan, act, observe loop, agent runtimes and frameworks, stop conditions and budgets.
Real-world examples and protocols
Provider model APIs, Open Responses (an AAIF project for talking to models across providers), goose as an agent runtime, and frameworks like LangGraph, the OpenAI Agents SDK and Google ADK.
Data unit
the step. One trip around the think, act, observe loop.
When it breaks
Loops that never end, the wrong tool picked, a confident wrong answer, or the token budget blown before the job’s done.
L7

Interaction

Where work comes in and results go back out, whether the requester is a person or another agent.

What lives here
Chat apps, IDEs, CLIs, tickets, schedules and triggers, approval prompts, interactive UI, and agent-to-agent endpoints.
Real-world examples and protocols
A2A (version 1.0), where an agent publishes an Agent Card describing what it can do and how to reach it, and other agents hand it tasks over JSON-RPC, gRPC or HTTP+JSON. MCP Apps, which lets a tool hand the host an interactive UI to render in a sandboxed iframe.
Data unit
the task. A request with an outcome: an answer, an artifact, or an action taken.
When it breaks
The ask was ambiguous, the result went to the wrong place, nobody approved something that needed approving, or two agents talked right past each other.

My take: Putting people and agents at the same layer is deliberate. From where an agent sits, a task from a human in a chat window and a task from another agent over A2A come in the same front door.

The two planes

Like the control and management planes on a router, these aren’t layers you stack. They touch every layer.

Trust plane

Who is this, what are they allowed to do, and did a human say yes? It shows up as sandbox permissions at L2, OAuth tokens at L3, skill provenance at L4, injection defenses at L5, budgets at L6, and approvals and A2A security schemes at L7. The MCP spec is blunt about this: hosts must get explicit user consent before invoking any tool, tool descriptions should be treated as untrusted unless they come from a trusted server, and the protocol itself can’t enforce any of it. That’s why I keep trust as its own plane instead of burying it inside L3.

Telemetry plane

What happened, in what order, and what did it cost? Traces, logs, evals, audit trails and token spend. OpenTelemetry has GenAI semantic conventions for agent spans and MCP calls, though they’re still in Development status, and the 2026-07-28 MCP spec documents how to carry trace context in a request’s _meta so one trace can follow a task from L7 all the way down.

Where MCP sits, and why

MCP lives at Layer 3, Connectivity. Its whole job is to give any agent host one consistent way to find out what a server offers and use it:

  • Tools: functions the model can call.
  • Resources: context and data for the user or the model.
  • Prompts: templated messages and workflows.
  • Elicitation: a way for a server to ask the user for more information.

It carries all of that as JSON-RPC 2.0 over stdio for local servers or Streamable HTTP for remote ones. HTTP deployments use an OAuth 2.1 based flow where the MCP server acts as the resource server.

The 2026-07-28 revision is the reason I’m so comfortable putting MCP at the waist. It made the core stateless: no more initialize handshake and no session IDs, so every request carries its own protocol version and capabilities. It also puts the method and tool name in Mcp-Method and Mcp-Name HTTP headers so a gateway can route and authorize without cracking open the body, makes list results cacheable, and formalizes an extensions framework, with Tasks moving out of the core to join extensions like MCP Apps. It also deprecated sampling, roots and logging, telling implementers to call the model provider directly, pass paths as parameters, and log to stderr or OpenTelemetry instead. To a network engineer, that reads like a protocol growing up: it’s getting stateless enough to sit behind a plain round-robin load balancer, with headers you can write policy against.

My take: MCP is the narrow waist of the agent stack, the same way IP is the narrow waist of the internet. Lots of things above it (models, frameworks, skills), lots of things below it (every API and system you own), and one thin, boring, standard thing in the middle that everybody agrees on. Boring in the middle is exactly what you want. That’s why I don’t think MCP is going anywhere. The products on top will churn; the waist tends to stick.

What MCP deliberately doesn’t do

Knowing what a protocol leaves out is half of knowing where it fits.

MCP doesn’t… That belongs to…
Decide which tool to call, or whether to call one at all L6 Reasoning
Decide what goes into the context window L5 Context
Teach the agent how to do a job well L4 Capability (skills)
Run your code safely or pick the credentials it runs with L2 Execution
Coordinate work between independent agents L7 Interaction (A2A)
Enforce consent; the spec says implementers have to build that Trust plane
Ask the model for completions on a server’s behalf going forward (sampling is deprecated) L6, called directly

Adjacent standards

Standard AIM layer One-liner Steward
Model Context Protocol L3 Agent to tool and data connectivity AAIF (Linux Foundation), donated by Anthropic in December 2025
Agent Skills L4 Folder of SKILL.md plus scripts and references AAIF, donated by Anthropic in October 2026
AGENTS.md L5 Project instructions for agents, in Markdown AAIF, donated by OpenAI
Open Responses L6 Talking to models across providers AAIF, contributed by OpenAI
goose L6 Open source agent runtime AAIF, contributed by Block
A2A L7 Agent to agent discovery and delegation AAIF since August 2026, created by Google
MCP Apps L7 Interactive UI delivered through MCP MCP extension
agentgateway Trust plane Routing, policy and observability at the boundary AAIF
OpenTelemetry GenAI conventions Telemetry plane Agent and MCP tracing OpenTelemetry (Development status)

The AAIF describes its own projects as covering “distinct layers of the open agentic stack.” I take that as a good sign that somebody besides me sees layers here, even if we’d draw the lines a little differently.

How Agent Skills fit, and why they’re their own layer

A skill is a folder. That sounds almost too simple to deserve a layer, and that’s exactly the point. Look at what nests inside it:

change-window-precheck/
├── SKILL.md          # name + description (frontmatter), then instructions
├── scripts/          # code the agent can run      → executes at L2
├── references/       # docs it reads on demand     → feeds L5
└── assets/           # templates, sample data      → feeds L5

The folder is a little vertical slice of the stack. Its instructions tell L6 what to do, its metadata and references feed L5, its scripts run at L2, and it’ll often call MCP tools at L3 along the way. I still give skills their own layer because the thing is different: a tool is a capability the agent can call, while a skill is the know-how for when and how to use the tools. MCP tells the agent what it can do. A skill tells it how to do it well.

One thing to watch: a skill’s scripts can run straight at L2 without going through MCP at all. That means they skip whatever auth and gateway policy you set up at L3. Treat installing a skill like installing software, because that’s what it is.

Mapping to OSI: where it holds and where it breaks

My take, start to finish. This is an analogy, so I’m grading each row honestly.

AIM layer Closest OSI layer Does it hold? Why
L7 Interaction L7 Application Holds Both are where the user, human or not, meets the stack.
L6 Reasoning L5 Session (loosely) Weak The agent loop keeps state across steps the way a session does, but it also decides things, which no OSI layer does.
L5 Context L6 Presentation Holds pretty well Both are about shaping data into a form the consumer can use. Presentation formats bytes; Context formats tokens.
L4 Capability none Breaks OSI has nothing like packaged know-how. This layer exists because agents need judgment, and networks don’t.
L3 Connectivity L3 Network (by role) Holds by role, not mechanics MCP plays IP’s role as the narrow waist. Mechanically, it’s an application protocol riding on top of HTTP or stdio.
L2 Execution L2 Data Link (loosely) Weak Both are about local delivery within one domain. The comparison is thin past that.
L1 Resource L1 Physical Holds The real stuff at the bottom that everything else is ultimately about.

Where the analogy breaks for real:

  1. No strict encapsulation. In OSI, a frame wraps a packet that wraps a segment. Here, a context window doesn’t “wrap” an MCP message; it summarizes and quotes from it. Layers inform each other more than they wrap each other.
  2. Layers get skipped. Skill scripts jump from L4 to L2. A chat app can call a tool directly. OSI frowns on that; agents do it all day.
  3. It’s recursive. Another agent can show up as a tool at L3 or as a peer at L7. A whole AIM stack can hide behind one MCP server. OSI has tunnels, but not a stack hiding inside one tool call.
  4. It’s not deterministic. Send the same packet twice and the router does the same thing. Send the same task twice and L6 might not.
  5. Nobody blessed it. OSI is ISO/IEC 7498-1. This is a guy with a website. And for what it’s worth, OSI’s own protocol suite lost the Protocol Wars to TCP/IP, and the model stuck around anyway because it was a good way to think. That’s the bar I’m shooting for.

How to use the model

1. Troubleshooting: which layer is broken?

Same playbook as a network outage. Go bottom-up when you suspect the plumbing, top-down when you suspect the ask, or start in the middle at L3 and split the problem in half.

Symptom Likely layer First thing to check
Agent says it did it, but nothing changed in the system L1 / L2 Backend permissions, the invocation’s exit code and stderr
“Tool not found” or auth errors L3 Server reachable? Token audience? Versions match?
Agent uses the right tools in the wrong order L4 Does a skill exist for this job? Is its description specific enough to fire?
Agent ignores an instruction it was given L5 Was it actually in the window, or did compaction or retrieval drop it?
Agent loops, stalls, or burns the budget L6 Stop conditions, step limits, model choice
Right answer delivered to the wrong place or person L7 Task routing, A2A target, approval step
Can’t tell what happened Telemetry plane Are traces carried end to end, through _meta on MCP calls?

2. Design reviews

Walk a proposed agent up the stack and make somebody answer one question per layer:

  • L1: Which systems does it touch, and is any of it a write?
  • L2: Where does code run, and whose credentials does it carry?
  • L3: Which MCP servers, which transport, how’s auth handled, and what sits at the gateway?
  • L4: Which skills, who wrote them, and where are they versioned?
  • L5: What’s in the window by default, and what’s the plan when it fills up?
  • L6: Which model, what loop, and what are the limits?
  • L7: Who can start a task, who approves risky ones, and where do results land?
  • Planes: Where’s the audit trail, and where’s the kill switch?

If a team can’t answer a layer, that’s your risk register.

3. Security boundaries

The useful trust boundaries fall right on the layer lines:

  • L2 / L3: Credentials live here. Keep secrets in the execution environment, scope tokens to one server, and never pass them up into the context window.
  • L4: Skills are code plus instructions. Review them, pin versions, and know where they came from.
  • L5: This is where prompt injection lands. Everything that came back from a tool is data, not instructions.
  • L7: Writes and anything irreversible get a human approval step.

Open questions (what might change)

All opinion. These are the spots where I’d bet the model moves.

  1. Are Skills really a layer, or part of Context? I think they’ve earned their own layer, but you could argue L4 and L5 merge.
  2. Do L1 and L2 belong in this order? Execution sits below Connectivity in my drawing because an MCP server’s process has to run somewhere before it can be connected to. You could also flip them.
  3. Where does memory end up? Right now it’s scattered across L5 and L6 with no common standard. I’d expect one to show up.
  4. Will MCP and A2A converge? They’re stewarded under the same foundation now. MCP is becoming request and response; A2A is built around long-running tasks. They could stay neatly separate or start borrowing from each other.
  5. Does the stateless MCP core change the waist? I think it makes MCP more waist-like. But moving sampling out of MCP also pushes model calls firmly up to L6, which is a real design shift for some servers.
  6. Where do evals live? I’ve parked them in the Telemetry plane, but they might deserve their own home.
  7. What should be renumbered when this hits v1.0? Probably something. That’s why it says draft.

Glossary

  • A2A (Agent2Agent): Open protocol for agents to discover each other through Agent Cards and delegate tasks. Version 1.0. Hosted by the AAIF.
  • AAIF (Agentic AI Foundation): A directed fund under the Linux Foundation that hosts MCP, A2A, Agent Skills, AGENTS.md and other agent projects.
  • Agent Card: A2A’s JSON document describing an agent’s identity, skills, endpoints and auth requirements.
  • Agent loop: The plan, act, observe cycle at L6.
  • AGENTS.md: A Markdown file of project-specific instructions for coding agents.
  • AIM mnemonics: Memory aids for the layer order, OSI style. Top down (7 to 1): “In Real Change Control, Capture Every Rollback.” Bottom up (1 to 7): “Real Engineers Check Configs Constantly, Rarely Improvising.” The three middle words in each one keep the three C layers (Context, Capability, Connectivity) in order.
  • Context window: Everything the model sees on one call. AIM’s L5 data unit.
  • Elicitation: MCP feature that lets a server ask the user for more information.
  • Host / client / server (MCP): The host is the AI app, the client is its connector to one server, and the server exposes tools, resources and prompts.
  • Narrow waist: The one thin, widely agreed layer in a stack that everything above and below depends on. IP for the internet, and in my view MCP for agents.
  • Progressive disclosure: Agent Skills’ pattern of loading metadata first, instructions on activation and files only as needed.
  • Resources (MCP): Context and data a server exposes for the user or model.
  • Skill: A folder with a SKILL.md file and optional scripts/, references/ and assets/. AIM’s L4 data unit.
  • stdio / Streamable HTTP: MCP’s two standard transports, local subprocess and remote HTTP.
  • Tools (MCP): Functions a server exposes for the model to call.

Sources

Working draft v0.1. Feedback’s welcome through the contact page. If you think a layer’s in the wrong place, I want to hear why.