Memory, and where AGENTS.md sits
One line separates these two, and almost every question in the area is that line wearing a hat.
The line
Both are deep agent additions from module 1’s delta list, and both are handled by middleware, which is the usual tell that you could assemble either onto a plain create_agent if you wanted the pieces separately.
What follows
Cost. A skill costs a name and a description until invoked. Memory costs its full contents on every single run, forever. Ten skills is cheap. Ten memory files is a permanent tax on every request you ever make.
Reliability. A skill loads when something reaches for it. Memory is guaranteed present. If a rule must be obeyed even when nothing prompts the agent to go looking for it, a skill is the wrong container, because the agent did not think to load it is a real outcome with no error attached.
The decision rule, in one question: does this apply to every task, or to some tasks? Every means memory. Some means a skill.
The trap, which is genuinely seductive
Long documents feel like they belong in skills, because progressive disclosure is right there and it was designed for exactly the cost problem a long document creates.
But length is the wrong axis. Applicability is the axis. A long document that must always apply goes in memory and you pay for it, or you shorten it. A short document that only applies occasionally goes in a skill even though it would have been cheap either way.
Sort a real codebase and the split falls out immediately. Repository layout, commit conventions, the rule that applied migrations are never edited: memory, because every task touches them. How to cut a release, how to debug the flaky integration suite, how to onboard a new package: skills, because they are relevant one run in twenty. The release runbook may be ten times the length of the conventions file and it still belongs in a skill.
AGENTS.md
AGENTS.md is the project-level instruction file convention: how this codebase works, what the conventions are, what the agent should always keep in mind. Standing instructions, not an invocable capability.
That puts it firmly on the memory side. Always loaded, paid for on every run.
The mechanism has a name: MemoryMiddleware is the component that loads AGENTS.md files, reads them through the backend, and injects the combined content into the system prompt. Two details are worth carrying, because both correct a natural assumption:
- There is no implicit discovery.
sourcesis a required argument, a list of paths such as["~/.deepagents/AGENTS.md", "./.deepagents/AGENTS.md"]. Nothing walks the tree looking for the file; if you do not name a path, nothing is loaded. - Multiple sources concatenate in order, later ones appearing after earlier ones, so a user-level file and a project-level file compose rather than one overriding the other.
Which has a practical consequence worth more than the exam point: a bloated AGENTS.md is a permanent context cost on every task the agent ever performs. Everything in it competes with the actual work for window space, and unlike an oversized tool result there is no offloading mechanism to rescue you. It was never a result. It is instruction, and instruction that must always be present cannot be relocated.
The always-loaded framing here follows from how memory is defined rather than from a separately published rule about the file itself, so present it as the architectural reading if anyone pushes back on it.
Try it yourself
The cleanest contrast in the domain
If one card from this module survives to exam day, make it this one. It is a four-way contrast that fits in a sentence and it is the most likely single question in the area.
Contrast skills and memory across loading behaviour, the parameter that supplies them, and the middleware that handles them.
Reveal answer
Skills are on-demand with progressive disclosure, supplied via skills=[...], and handled by SkillsMiddleware. Memory is always loaded at startup, supplied via memory=[...], and handled by MemoryMiddleware. A skill costs you a name and a description until it is invoked. Memory costs its full contents on every single run. Skills are capability you might reach for; memory is context you always want present.
Where the house standards go
Your agent must follow your house coding standards on every task it ever performs. Skill or memory?
Show answer
Correct answer: A — Memory, because it must apply on every run and therefore must always be loaded
Always-applicable means always-loaded, which is memory. The progressive-disclosure option is the genuinely tempting one: it is true that the document is long and true that disclosure would make it cheap. But a skill only loads when something invokes it, so a standard that must apply unprompted would routinely never load at all. Cheapness does not help if the content is absent at the moment it matters.
The wrong axis
A release runbook is ten times longer than your three-line conventions file, and it is needed roughly one run in twenty. Where does each go?
Show answer
Correct answer: D — Runbook in a skill for being occasional, conventions in memory for always applying
Applicability is the axis, not length. The runbook is only ever needed when someone is cutting a release, so it is a skill however long it is. The conventions file always applies, so it is memory however short it is. Sorting by size is the single most likely wrong answer in this part of the domain, because size is the visible property and scope is the one you have to think about.
Which side AGENTS.md falls on
A placement question rather than a mechanism question, and the answer has a cost attached that is worth more than the exam point.
On which side of the skills and memory line does AGENTS.md sit, and what does that imply about its cost?
Reveal answer
It sits on the memory side: an always-loaded instruction document rather than an on-demand capability. Its full contents are therefore paid for on every run, which is why a bloated AGENTS.md is a real and permanent context cost on every task the agent ever performs, and why material that only applies to occasional tasks belongs in a skill instead. This is stated outright rather than inferred: MemoryMiddleware is documented as the middleware that loads AGENTS.md files, and its own description of the contrast is that memory is always loaded while skills are on-demand workflows.
Split a real one
Take an instruction file you actually maintain, in any project, and sort it. Fifteen minutes, no code.
- List every distinct rule or section in the file as its own line.
- Mark each one every-task or some-tasks, judged by whether the agent would need it on a run picked at random.
- Move everything marked some-tasks into a candidate skill, and estimate what fraction of the file's length just left always-loaded context.