Every AI Agent Concept, Explained in Plain Language
An AI agent is a model in a loop with tools. It gets a goal, picks a tool, sees the result, and repeats until the goal is met. Every other term describes one of four things: what it can do (tools), what it knows (context and memory), how it is directed (prompts and skills), or how it is checked (evals).
The base concept: model, tools, loop
A language model on its own does one thing: given text, produce more text. It cannot read your files, call an API, or check whether its answer was right.
An agent is that model wrapped in a loop with tools. A tool is a function the model can request by name with arguments, such as read a file or send an HTTP request. The runtime executes it and hands the result back. The model sees the result and decides the next step. That cycle repeats until it decides the goal is met.
That is the entire base concept, and it explains why agents feel qualitatively different from chatbots. The model gets to observe consequences. A chatbot guesses what a file contains. An agent reads it and knows.
The agent harness is the code around the model: the loop, the tool implementations, the permission checks, and whatever manages the context. It is usually smaller than people expect.
Tool call
A structured request from the model, in JSON, naming a tool and its arguments. The model does not execute anything itself. It emits an intention and the harness decides whether to honor it, which is exactly where permission checks belong.
What the agent knows: context and memory
The context window is everything the model can see on a given request: the system prompt, the conversation so far, tool results, and any retrieved documents. It is finite, it is bought fresh on every request, and it is the single biggest constraint in agent design. Almost every technique below exists to manage it.
Session memory is just the conversation staying in the window. It ends when the session does.
Persistent memory is facts written to a store and reloaded later: user preferences, project conventions, decisions. Small, curated, and durable.
Retrieval is search over a large corpus that returns only the passages relevant to the current question. This is the mechanism that scales, because it does not require the knowledge to fit in the window, only the answer.
The common mistake is treating these as competitors. They stack. Session memory holds what just happened, persistent memory holds what should always be true, and retrieval covers everything else.
Chunk and embedding
A chunk is a passage of a document, sized to be independently meaningful. An embedding is a numeric vector representing the chunk's meaning, which lets the system find passages by similarity rather than by exact keyword. Retrieval means embedding the query, finding the nearest chunks, and putting those in the context window.
RAG
Retrieval augmented generation: retrieve relevant chunks first, then generate an answer using them. The name describes the order of operations. Its value is that facts come from your material rather than from the model's parameters, which is also what makes answers checkable.
How the agent is directed: prompts, skills, and MCP
The system prompt is standing instruction: role, constraints, tool policy, output format. It is sent on every request, which is why it should carry policy rather than knowledge.
A skill is a packaged set of instructions for a specific kind of task, loaded when that task comes up rather than carried permanently. Deployment steps, a review checklist, a house style for API design. The distinction that matters is timing: a system prompt is always present, a skill is present when relevant. That makes skills the cheaper place for anything conditional.
MCP, the Model Context Protocol, is a standard way to connect an agent to external tools and data sources. Before it, every integration was bespoke to one agent. With it, a server exposing your database or ticket system can be used by any client that speaks the protocol. It standardizes the connection, not the behavior. A badly designed MCP server is still a badly designed tool.
Orchestration is coordinating multiple agents on one job, usually by splitting scope and defining what crosses the boundary between them.
How you know it works: evals and cost
An eval is a fixed set of tasks with a way to score the output. Twenty real tasks from your logs and a human judgment is a valid eval. Without one, every prompt change is a guess, and agents are unusually good at appearing to improve while getting worse on cases you stopped watching.
Token cost is the operational constraint everyone meets eventually. You pay per token in and per token out, on every request, including the system prompt and every tool result still sitting in the conversation. This is why context management is not tidiness, it is the bill.
The structural fix is to stop regenerating what has already been established. RDK indexes files from local vaults, docs, and code as encrypted private chunks that an agent searches before it queries a model. Token spend drops 80 to 90 percent because the answer is retrieved instead of regenerated. In practice the lookups stack: private vault retrieval answers 40 to 65 percent of queries, the public network adds 15 to 20 percent, and the model handles the remaining 5 to 10 percent as fallback.
Autonomy and the human veto
Agents are described as autonomous, but every production system keeps a human veto on side effects. The useful question is not how autonomous the agent is, it is which actions run unattended and which require approval. That line, not the model, determines how much you can safely delegate.
Frequently asked questions
- What is the difference between an AI agent and a chatbot?
- A chatbot produces text from text. An agent runs in a loop with tools, so it can act on the world and observe the result: read a file, run a command, call an API, then decide what to do next based on what came back. The difference is feedback. An agent finds out whether it was right.
- What is the difference between memory and retrieval?
- Memory is a small curated set of facts an agent reloads every time, such as preferences and conventions. Retrieval is search over a large corpus that returns only the passages relevant to the current question. Memory does not scale past a few thousand tokens. Retrieval scales because the corpus never has to fit in the context window.
- What does MCP actually do?
- MCP standardizes how an agent connects to external tools and data. A server exposes capabilities once, and any client speaking the protocol can use them, instead of every agent needing a bespoke integration. It defines the connection layer only. Tool design, permissions, and quality remain your responsibility.
- What is the hardest part of building an agent?
- Context management. The loop is simple and the tools are straightforward, but deciding what enters the window each turn determines both output quality and cost. Most agent failures trace back to the model either missing information it needed or drowning in information it did not.