Knowledge: Agents
AI agents in knowledge work: from retrieval to action
An agent goes beyond a knowledge system that answers questions: it searches on its own, calls tools and prepares work outputs. This explains the mechanics behind that, the Model Context Protocol as the standard for connecting tools, the points where a person should approve, and the failures where agents fail in practice.

Short answer
An AI agent in knowledge work is a language model that works in a loop: it plans a step, calls an approved tool, such as a document search, reads the result and decides the next step. That turns an answer into a piece of work. It only becomes reliable with narrow tools, limited rights, approval points and logging.
Definition
AI agent: An AI agent is a system in which a language model works on a task in a loop: it plans a step, calls an approved tool for it, reads the result and decides the next step, until the goal or a stop condition is reached. Unlike a fixed process, the agent only chooses its route at runtime.
In the glossary: AI agent, Model Context Protocol, Agentic harness, Human in the loop, Prompt injection, API, Context engineering, Query decomposition, Retrieval, Workflow automation
01
What is the difference between an AI agent, a chatbot and a fixed workflow?
A chatbot answers a message and waits. A fixed workflow calls a language model at predetermined points in a programmed sequence. An AI agent receives a goal and decides its own route: it chooses tools, reads results and decides the next step. That makes it more flexible, and harder to predict.
Anthropic's guide to building agents (Anthropic, 2024) distinguishes two designs: workflows, where language models and tools are orchestrated through predetermined code paths, and agents, where the model directs its own process and tool use. The guide's recommendation is pragmatic: find the simplest solution and add complexity only when it is needed. Often a single model call with good retrieval of matching passages is enough.
Three designs compared
| Criterion | Chat assistant | Workflow with a model | AI agent |
|---|---|---|---|
| Who determines the route | The person, message by message | The code, fixed in advance | The model, at runtime |
| Tools | None or few | At fixed points | Freely chosen from an approved set |
| Predictability | High per reply | High | Lower, the same input can take a different route |
| Testability | Read the reply | Test the sequence like software | Log and assess the route and the outcome |
| Fits | Single questions | Stable processes with one fuzzy point | Tasks with changing intermediate steps |
How agents fit into the larger picture of capturing, finding and applying knowledge is covered in Knowledge management with AI.
02
How does the agent loop work?
The agent loop repeats four steps: the model plans its next step from the goal and the history so far, calls a tool, reads the result back into context, and decides whether the goal is met. The loop ends with an answer, a question back to a person, or a fixed stop condition such as a maximum number of steps.
- 01Goal and contextBrief, rules, tool list
- 02PlanChoose the next step
- 03Call a toolStructured call
- 04Read the resultBack into context
- 05DecideContinue, ask, or finish
The basic pattern goes back to research. ReAct (Yao et al., ICLR 2023) interleaves reasoning steps and actions: the reasoning steps help the model form and adjust a plan, the actions connect it to external sources. According to the paper, even a simple Wikipedia interface reduced hallucination and error propagation compared with pure step-by-step reasoning. Toolformer (Schick et al., arXiv 2023) showed that a model can learn to decide for itself when to call which interface with which arguments.
Every round adds the call and its result to the context. After many steps, early instructions compete with long tool outputs for the model's attention. Building an agent therefore also means setting stop conditions, trimming or summarising older results, and carefully choosing what the model actually sees. This discipline is called context engineering and is covered in more depth in Context engineering: why it matters.
03
What is a tool for an AI agent, and how does the model call it?
A tool is a described function with a name, a description and an input schema. The model sees these descriptions and, when it needs a tool, generates a structured call with matching values. The surrounding software executes the call, not the model. The result goes back into the context as text or structured data.
{
"name": "search_documents",
"description": "Searches approved internal documents and returns passages with their source. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string", "description": "Search query in natural language" },
"collection": { "type": "string", "enum": ["manual", "policies", "minutes"] },
"max_results": { "type": "integer", "minimum": 1, "maximum": 10 }
},
"required": ["query"],
"additionalProperties": false
}
}The description is part of the context, and therefore part of the control. A tool called "database" with a free-text query field tempts the model into calls nobody anticipated. A tool called "search_documents" with a fixed value range only allows what is intended. The OWASP Top 10 for LLM Applications (OWASP, 2025) recommend exactly that: narrowly scoped tools instead of open-ended functions such as free shell commands.
Errors are part of the interface too: the MCP specification returns execution errors, such as a date in the wrong format, to the model as a result, so it can correct the call. Uninformative error messages produce loops.
04
What is the Model Context Protocol, and where does it come from?
The Model Context Protocol (MCP) is an open protocol through which AI applications connect to tools, data and templates from external systems in a uniform way. Anthropic published it on 25 November 2024 and handed it to the Agentic AI Foundation, under the Linux Foundation, in December 2025. Messages follow JSON-RPC 2.0 between host, client and server.
Anthropic introduced MCP as an open standard meant to replace fragmented, one-off connections between AI applications and data sources with a single protocol (Anthropic, 2024). On 9 December 2025, the Linux Foundation announced the formation of the Agentic AI Foundation, whose founding projects include MCP as a contribution from Anthropic (Linux Foundation, 2025). The specification is released in dated versions and names the Language Server Protocol as its model, which brought programming languages into development environments in a uniform way.
| Building block | Role |
|---|---|
| Host | The AI application that establishes connections, for example an assistant or a development environment |
| Client | The connection component inside the host, one per server |
| Server | The service that provides a system's context and capabilities |
| Resources | Context and data for use by a person or the model |
| Prompts | Templates for messages and workflows |
| Tools | Functions the model can have executed |
| Transports | Standardised options are local processes over standard input and output (stdio) and Streamable HTTP |
| Authorisation | Optional, based on OAuth 2.1 for HTTP; for stdio, credentials come from the environment |
ReAct
Interleaving reasoning steps and actions published as a pattern for agents.
Toolformer
A model learns to decide for itself on interface calls.
Model Context Protocol
Anthropic publishes MCP with a specification and development libraries.
Agentic AI Foundation
The Linux Foundation brings MCP into a vendor-neutral foundation.
Today
The protocol does not mandate security, it describes security as a task for the implementation. Per the specification, tools stand for arbitrary code execution, hosts should obtain explicit user consent before every tool call, and descriptions of tool behaviour count as untrusted unless they come from a trusted server. API, MCP or CLI sets out when MCP pays off compared with a direct interface.
05
What is agentic retrieval (Agentic RAG), and when does it pay off?
Agentic retrieval leaves it to the model whether, what for and how often to search. Instead of one search before the answer, the agent rephrases queries, breaks compound questions apart, checks whether the passages found are sufficient, and searches again if needed. This pays off for questions spanning several sources, but costs extra model calls and response time.
Classic RAG searches once and then answers with whatever it found. If the first search fails, the answer fails too. Self-RAG (Asai et al., ICLR 2024) trained a model to retrieve on demand and to assess the passages it found itself, using special reflection tokens, instead of always including a fixed number of passages. The survey by Singh et al. (arXiv 2025) organises agentic retrieval along four design patterns: reflection, planning, tool use and multi-agent collaboration.
Classic and agentic retrieval
| Criterion | Classic RAG | Agentic retrieval |
|---|---|---|
| Search steps | One, before the answer | As many as needed, controlled by the model |
| Query | The question is searched directly | The question is rephrased or broken into sub-questions |
| Checking the results | No separate stage | The model assesses whether the passages are sufficient |
| Model calls and latency | Low and predictable | Higher and variable |
| Strength | Simple questions against a store | Questions spanning several sources and intermediate conclusions |
| Risk | A missed passage goes unnoticed | Search loops, drifting off topic, harder to trace |
A middle path is often more effective than full autonomy: a fixed pipeline, extended by exactly one agentic stage, such as breaking a question into sub-questions. Query decomposition and the advanced RAG toolkit shows which technique fixes which failure. How retrieved passages get cited in the answer is described in Retrieval-augmented generation explained.
06
Where should approval points sit in an AI agent?
Approval points belong before any step that acts outward, cannot be undone, or changes rights: sending messages, changing or deleting records, placing orders. An agent can carry out reading and preparatory steps on its own. What matters is that approval is enforced in code, not left dependent on whether the model asks permission.
| Action class | Example | Approval |
|---|---|---|
| Reading within one's own permission scope | Searching a manual, summarising a log | No confirmation needed, logged |
| Creating a draft | A draft reply, a compilation, a draft ticket | No confirmation needed, the result goes for review |
| Effect outside the system | Sending a message, publishing a document | Human confirmation before execution |
| Not reversible | Deleting, ordering, booking | Confirmation, plus narrow domain limits built into the tool |
| Rights and configuration | Granting access, changing rules | Not through the agent |
The MCP specification recommends that a person can always decline tool calls, with a clear display of which tools the model may use, visible indicators on every call, and confirmation dialogues. The OWASP Top 10 for LLM Applications (OWASP, 2025) trace the risk of excessive agency to three causes: too many functions, rights that are too broad, and too much autonomy for consequential actions. Among their countermeasures is enforcing authorisation in the downstream systems, rather than leaving it to the model's decision.
In practice, that means an agent acts with the rights of the person it works for, not with a blanket account that sees everything. How document-level access rights carry through into search and the answer is described in Access control in AI knowledge systems.
07
What failure modes are typical for AI agents?
Typical failure modes are loops, where the agent calls the same tool repeatedly; choosing the wrong tool or the wrong parameters; rights that reach too far; instructions smuggled in through content the agent reads; and silent partial success. Agents rarely crash. They deliver plausible but incomplete or wrong results, which only a check reveals.
| Failure mode | How it shows up | Countermeasure |
|---|---|---|
| Loop | The same search or call in round after round | A step limit, detecting repeated calls, clear error messages from tools |
| Tool misuse | The wrong tool, invented parameters, a call outside its intended purpose | Few, narrowly described tools, schema validation of every call |
| Excessive agency | The agent can change more than the task requires | Minimal rights per tool, approval before any outward effect |
| Injected instructions | A document or email the agent reads contains commands that it follows | Treat content as data, limit rights, require confirmation for sensitive actions |
| Context overload | Early instructions get lost among long tool outputs | Trim results, summarise intermediate states |
| Silent partial success | The result looks complete, but part of the task is missing | A final check against the task, spot checks, repeated test runs |
Injected instructions deserve particular attention because agents read content from outside sources. Greshake et al. (arXiv 2023) described indirect prompt injection: attackers place instructions in data that a model later retrieves, exploiting the fact that LLM-integrated applications blur the line between data and instructions. Defence and mitigation are covered in AI security: prompt injection and data leakage.
08
How do you measure whether an AI agent works reliably?
An agent's reliability is measured across repeated runs of the same task, not a single successful case. Both the final result and the route are assessed: which tools were called with which values, how many steps were needed, and where the agent stopped. Added to that are the effort and time per completed task, and a human spot check.
The τ-bench benchmark (Yao et al., arXiv 2024) introduced the pass^k metric for this: it measures how often an agent solves the same task in all k repetitions. The difference from a simple success rate matters for operations. An agent that solves a task in eight out of ten runs looks convincing in a demo and still gets one in five transactions wrong in daily use.
Checklist
Before an agent goes into operation
For the team approving an agent. The list stores nothing.
How answers are checked for faithfulness to source and relevance is covered in more depth in Checking AI answers.
09
Which assumptions about AI agents lead in the wrong direction?
Several assumptions lead in the wrong direction: that an agent is inherently better than a fixed process, that a standard protocol makes integrations secure, that more tools mean more capability, that the model can decide on permissions, and that one successful run proves reliability. Each of these can be checked against research or the specification.
Common assumptions about agents
Only for suitable tasks.
For stable processes, a fixed workflow is cheaper, faster and easier to test. Anthropic recommends starting with the simplest solution and adding complexity only when needed.
No.
The protocol standardises the connection. Per the specification, it cannot enforce security principles itself; consent, access control and vetting servers remain the implementation's responsibility.
Often the opposite.
Every tool description occupies context, similar tools cause mix-ups, and every extra function increases the agency that OWASP lists as its own risk.
Wrong.
A model can be influenced by the content it reads. Permissions belong in the systems a tool calls, not in an instruction to the model.
Not supported.
The τ-bench results show how sharply the success rate drops once the same task must succeed repeatedly. Reliability only shows up over many runs.
10
How do you introduce an AI agent into knowledge work step by step?
An agent is introduced in stages: first check whether a simpler solution solves the task, then run an agent with a few reading tools and a complete log, then add preparatory steps whose result a person approves. Steps without confirmation only become an option once logs and repeated tests show they succeed reliably.
Decision path
Workflow, agent, or agent with approval?
Three questions that show where a project should start.
All questions and results as a list
- Does the task follow the same steps in the same order most of the time?
- Yes, Result: Fixed process first
- No, continue with: Should the result act on something outside the system, such as sending, changing or ordering?
- Should the result act on something outside the system, such as sending, changing or ordering?
- Yes, continue with: Can a person quickly check the prepared result before it takes effect?
- No, only reading and preparing, Result: A reading agent
- Can a person quickly check the prepared result before it takes effect?
- Yes, Result: An agent with approval points
- No, Result: Recut the task
- Result: Fixed process firstWorth discussing: which single step actually needs language understanding. Often a workflow with exactly one model call at that point is enough.
- Result: A reading agentWorth discussing: which sources the agent may search, whose rights it works with, and how its intermediate steps are logged.
- Result: An agent with approval pointsWorth discussing: which action classes need confirmation, where approval sits in the existing interface, and how repeated test runs demonstrate reliability.
- Result: Recut the taskWorth discussing: how the task can be broken into checkable sub-steps. An effect nobody can check beforehand is a poor starting point for an agent.
Which tasks in an organisation suit agents, and what permissions and logging look like in implementation, is described in AI agents for organisations. A purpose-built agentic pipeline from the R&D Lab is shown in Event Scout.
iiterate Technologies GmbH develops AI applications and custom software from architecture through implementation to operation, on client infrastructure or in EU hosting, with a focus on RAG, local language models and connecting to existing systems (Services).
Read more on iiterate.de
More depth in Signals
- Signal API, MCP or CLI Three levels of connection, and when MCP pays off over a direct interface.
- Signal Extending agentic harnesses Skills, hooks and connectors as levers, and as an agent's attack surface.
- Signal Context engineering: why it matters Four failure patterns in an agent's context, and the practices against them.
- Signal Query decomposition and advanced RAG Which retrieval technique fixes which failure, and when none of them is needed.
- Signal RPA versus AI agents Where rule-based automation is more reliable than an agent.
- Signal No-code agent builders and their limits What platforms deliver quickly, and where governance, evaluation and cost begin.
Implementation and examples
- Consulting AI agents for organisations Tasks, tool access, permissions and approvals in implementation.
- Consulting AI security Protection against prompt injection and data leakage in language-model applications.
- Consulting Process automation with n8n and AI Fixed processes with targeted model steps as an alternative to an agent.
- R&D Lab Event Scout: an agentic pipeline Searches event sources, extracts dates, scores them and writes to a dashboard.
More in Knowledge
- Knowledge Knowledge management with AI The overview of where agents fit into the knowledge lifecycle.
- Knowledge Retrieval-augmented generation explained The retrieval pipeline that agentic retrieval builds on.
- Knowledge Access control in AI knowledge systems Carrying document-level rights through search and the answer.
- Glossary Model Context Protocol in the glossary The short definition, with links to related terms.
Frequently asked questions
Do you need MCP to build an AI agent?
No. An agent can also use tools through direct function calls on a model interface. MCP shows its strength when several applications or agents need to use the same systems, because one server then serves many clients. For a single, stable integration, a direct connection is often simpler and uses less context.
Can AI agents work with locally run language models?
Yes. Open models capable of structured tool calls can run on an organisation's own hardware, as can tools and MCP servers. On long, branching tasks, models differ markedly in reliability. Repeated test runs on real tasks should therefore come before choosing a model. What running locally requires is described in Local language models.
How many tools should an agent have?
As few as the task requires. Every tool description takes up space in the context, and similar tools raise the risk of mix-ups. It works well to cut tools to the task, for example one search per knowledge area rather than general database access, and to remove unused tools from the set.
What is a multi-agent system, and do you need one?
In a multi-agent system, several specialised agents share a task, for example one researches and one checks. This can structure complex tasks, but it multiplies model calls, handoff points and possible errors. For most knowledge-work tasks, a single agent with well-cut tools is a sufficient starting point.
How do you prevent an agent from giving confidential documents to the wrong people?
By having the agent act with the rights of the person it acts for, so that search only returns documents that person is allowed to see. Filtering belongs in the search and data layer, not in an instruction to the model. How rights carry through the pipeline is explained in the guide to access control in AI knowledge systems.
How much more effort is an agent compared with a simple RAG query?
Considerably, because an agent executes several model calls per task with growing context. How many depends on the task, the tools and the model, and varies between runs. What is informative is therefore the effort per completed task across many test runs, measured in model calls, tokens and duration, not the effort of a single query.
Read on
Related topics
Sources
- 01 Model Context Protocol: Specification Model Context Protocol, 2026 · modelcontextprotocol.io
- 02 Introducing the Model Context Protocol Anthropic, 2024 · anthropic.com
- 03 Linux Foundation Announces the Formation of the Agentic AI Foundation (AAIF) Linux Foundation, 2025 · linuxfoundation.org
- 04 JSON-RPC 2.0 Specification JSON-RPC Working Group, 2013 · jsonrpc.org
- 05 Building Effective AI Agents Anthropic, 2024 · anthropic.com
- 06 ReAct: Synergizing Reasoning and Acting in Language Models arXiv (ICLR 2023), 2022 · arxiv.org
- 07 Toolformer: Language Models Can Teach Themselves to Use Tools arXiv, 2023 · arxiv.org
- 08 Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection arXiv (ICLR 2024), 2023 · arxiv.org
- 09 Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG arXiv, 2025 · arxiv.org
- 10 LLM06:2025 Excessive Agency OWASP Gen AI Security Project, 2025 · genai.owasp.org
- 11 Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection arXiv, 2023 · arxiv.org
- 12 τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains arXiv, 2024 · arxiv.org
Let us talk about your project
Whether it is a prototype, an internal tool or an AI application: describe briefly what you are building or want to take into production.