Skills vs MCP vs RAG vs Memory: What AI Agents Need to Know

IBM TechnologyPublished Sep 3, 202609:10Added Sep 7, 2026

Learn more about Types of AI Agents here → https://ibm.biz/~P180J8KFb AI agents need more than training data to solve real-world problems. Martin Keen breaks down four core techniques used in modern AI agents: Skills, MCP, RAG, and Memory. Learn when each appro

Watch on YouTube →
Contributed by Heather

Transcript

Transcript format

00:00There are different ways to give an AI agent the knowledge it needs to complete a task beyond the knowledge that it just has in its training data. So let's look at four of them, skills, MCP, RAG and memory and define which methods are best in different situations.

00:18So let us consider that we've got some kind of web app here and we look at this webpage, and uh-oh, this webpage is throwing error the dreaded 500 internal server error. Okay we need to fix this. Well the goal of an AI agent is to do just that.

00:45We want to resolve this error. Now I think instinctively the answer to getting some agentic help for this 500 error is just to kind of gather as much context as possible? Then throw that into the context window from the actual agent itself.

01:05So in this context window we might store a bunch of runbooks and then maybe we'd also pass it a bunch of dashboards and perhaps also we'd have a little bit of customer history in here as well and just throw it in the context window and then let the AI agent figure out how to resolve this error.

01:30But that can be quite an ineffective means to resolve an error like, this because there's plenty of scope for this AI agent to kind of get lost or to go down dead ends or just act in a generalized way that doesn't really represent how this specific checkout page actually works.

01:49So just throwing context into the fire it might not be the best way to go. Perhaps a better approach would be to use... Skills or MCP or RAG or memory maybe all of the above, but how, well i'm going to take these one at a time as to how we can get this web page resolved with this AI agent and let's start with the first one which is to use agent skills.

02:19Now, an agent skill is really just kind of a set of instructions that we can hand to the agent. Doing one particular kind of task. So sometimes it might also have a bit of code attached as well. Now it might list a procedure, like the steps to follow, along with some judgment about when to follow them, and the agent only pulls the skill in when the task actually calls for it through something called progressive disclosure.

02:47So for this checkout error we've got here, we might give the agent a special skill that we have created. Let's call this the triage skill. And that skill lays out the run book. So maybe it says, first of all, we need to take a look at the error rate.

03:07That's the first thing we need do. And then once we've done that, the skill says the next thing to do is to check on the status of the recent deployments. So these are the steps to follow. But beyond the steps, to take, a good skill can also carry a bit of judgment as well.

03:24Like, when the agent should stop. Poking around on its own and instead it should escalate to maybe a actual human to help with the problem. Now without this triage skill the agent probably wouldn't know to do all of these things, because this information is not sitting in the model's training data anywhere, so a skill gives the agent a clear procedure and maybe a bit of judgment about how to run it.

03:47But, it kind of stops there. The skill can tell the agent to go and check the the error rate but the agent still can't necessarily reach the dashboard to actually read that error rate in the first place. So one way to deal with getting that error rates and stuff like that is to use MCP, that's the model context protocol.

04:16It can connect the agent to the outside world so it can actually go out and do things. Now, the way it works is there is a standard MCP protocol sitting between the agent and whatever it needs to reach. Now the agent itself, that is considered the MCP host and each system it wants to talk to that sits behind an MCP server.

04:45So... This model on its own maybe hasn't got a clue how to say query a particular backend that has a logging stack, but the MCP server for that logging stack does know how to connect to it and it exposes that as something that the agent can then call.

05:01So if we go back to my 500 error here, the skill that's said to check the error rate. Well, with MCP, the agent could reach all of that information so it can get hold of all of the logs by performing an MCP call. It can get hold of the metrics as well by doing the same thing and it can read the error rate for real.

05:27Right so getting the error rate is is solved by MCP. We're calling out to another service but what the agent still doesn't know yet is well it doesn't really have any real knowledge of how this particular set up for this webpage behaves like what's normal or what the dependencies are and what's maybe caused some of these issues before.

05:49So where does that knowledge come from? Well, you probably guessed it. It comes from the other two things on my list here. So let's start with RAG. This is Retrieval Augmented Generation. And the idea is instead of stuffing everything into the context window up front, the agent is just gonna pull in the information that it needs, some sort of relevant piece of information from some outside source, and to only do it when it actually needs it.

06:18So for our checkout error, we might point RAG at a collection of our own documents. So these might be like manuals or dependency maps, stuff like that, and then the agent gets to ask its question and then RAG is going to retrieve the matching pieces by performing something called a semantic search and relevant matching chunks then they get returned back to the agent's context window.

06:46That's RAG. And then... The last one to talk about is talking about memory. And memory at first glance sounds quite a bit like RAG, where the agent pulls in relevant pieces of knowledge when it's needed, but there is a difference between these two things.

07:15And the difference is where the knowledge comes from. So RAG it reads documents which are stored in a vector database. And those documents were put in that vector database by a person, like they were stored there deliberately. But memory is the stuff that the agent has picked up itself and kind of stored for later from things that have happened previously.

07:39So the agent can look back at some kind of memory like previous error situations. Maybe last time this exact error happened the real cause was not something that was documented in the the run book over here and it kind of had to get worked out the hard way.

07:55Well that memory can tell us what that hard way was. And when this pesky 500 error is finally fixed, then the memory can also write back what the fix actually was. So the agent has that for next time. So basically experience is building up here in the agentic memory.

08:17So that is all four and a rough rule of thumb on when to use each one. Well, if it's knowledge that somebody has written down That's RAG. If it's knowledge the agents picked up from experience, that's memory. If its a procedure to follow something repeatable, that is an agent skill.

08:42And if an agent needs to go and actually look something up in the world without using proprietary code, that can be MCP. So tell me, does that reflect how you incorporate knowledge with AI agents? Let me know in the comments.