Chatbots answer questions; agents carry out tasks in other software on your behalf. Here is how that works under the hood, what METR's research shows about how long agents can keep going, and why OWASP singles out prompt injection and excessive agency as risks.
A chatbot answers. An agent acts. Software that can send, edit, buy, or delete raises practical questions, and this guide looks at three: how long an agent can keep at a task, what it is allowed to touch, and what happens when it gets something wrong.
From answering to acting
Anthropic, one of the companies building agents, notes that the word "agent" can be defined in several ways. In a December 19, 2024, engineering essay, it calls the basic building block an "augmented LLM," a large language model enhanced with retrieval, tools, and memory. It then separates two designs. Workflows, in its wording, are systems where models and tools are "orchestrated through predefined code paths." Agents are systems where the model dynamically directs its own process and tool use. The company has since noted that much of the tooling it describes has changed.
A workflow is a recipe a developer wrote in advance: summarize this inbox, draft replies, stop. An agent is handed a goal and chooses the steps itself, which makes it flexible and harder to predict.
The mechanism underneath is called tool calling or function calling. OpenAI's developer guide describes it as "a multi-step conversation" between an application and a model: the application lists the tools available, the model replies with a request to use one, the application runs that code and sends the result back, and the model either answers or asks for another tool. Google's Gemini documentation and OpenAI's guide both make the key point: the model does not execute the function itself; the application must run it and return the result.
In function calling, then, the model writes a structured request, and the application carries it out. Anthropic's essay describes agents as typically just models using tools based on feedback from their environment in a loop, with the model deciding what to ask for next.
The plumbing: tools and protocols
One way to connect an agent to other systems is the Model Context Protocol, an open protocol whose specification describes it as a standardized way to connect language-model applications with external data sources and tools. Its current specification, dated July 28, 2026, defines hosts (the AI applications), clients (connectors inside them), and servers (services that offer data and capabilities), which talk to each other using JSON-RPC 2.0 messages.
The specification says it takes some inspiration from the Language Server Protocol, which standardizes support for programming languages across many development tools. In a similar way, it says, the protocol standardizes how to add context and tools to AI applications. It is one open protocol, not the only route: the function calling described in the OpenAI and Google guides works without it.
Question one: how long a task can it sustain?
Can an agent keep going through many steps without losing the thread? The research group METR has tried to measure this. In a preprint first posted on arXiv in March 2025, which the arXiv record lists with a NeurIPS 2025 conference reference, it timed people with relevant expertise on software and research tasks, then asked how long a task, measured in human time, an AI model can complete with a 50% success rate. METR calls this the model's time horizon.
The headline finding was a trend: by METR's estimate, the frontier time horizon had been doubling approximately every 7 months since 2019. The arXiv abstract estimated that Claude 3.7 Sonnet, a frontier model at the time, had a 50% time horizon of around 50 minutes. A companion METR blog post said models had almost 100% success on tasks that take a person less than 4 minutes, but succeeded less than 10% of the time on tasks that take a person more than about 4 hours.
METR updated its estimates on January 29, 2026, using a larger task suite and new evaluation software. The suite grew from 170 to 228 tasks, and tasks estimated to take people 8 hours or more rose from 14 to 31. For the full period, METR combined the new estimates with its earlier ones for pre-2023 models and found a doubling time of about 196 days, essentially the same 7 months. Measured only from 2023, the doubling time was 130.8 days, a little over 4 months.
METR states the limits itself. It evaluated models only on software and research tasks, and its paper notes that time horizons can differ by a large factor depending on the task domain. Only 5 of the 31 long tasks have measured human times; the rest are estimates. The trend is somewhat sensitive to which tasks are included, and even the new suite has relatively few tasks the latest models cannot do.
A 50% success rate is also a coin flip. METR's original blog post said the best models of early 2025 could only reliably complete tasks of up to a few minutes long.
Question two: what is it allowed to touch?
The OWASP Top 10 for LLM Applications 2025, from the nonprofit Open Worldwide Application Security Project, gives this problem a name: "Excessive Agency." It describes a weakness that lets damaging actions happen in response to unexpected, ambiguous, or manipulated model outputs, whatever caused the model to malfunction.
OWASP traces excessive agency to three root causes. Excessive functionality means the agent has access to tools it does not need. Excessive permissions means those tools can do more in other systems than the job requires, such as write access where read access would do. Excessive autonomy means high-impact actions go ahead without anyone checking them first. Its recommended fixes: give the agent only the tools it needs, grant the narrowest permissions, require a person to approve high-impact actions, and run actions under the specific user's identity rather than a powerful shared account.
The Model Context Protocol specification makes a similar point. It says tools represent arbitrary code execution and must be treated with caution, that tool descriptions should be considered untrusted unless they come from a trusted server, and that hosts must obtain explicit user consent before invoking any tool. It adds that the protocol cannot enforce these principles itself; implementers should build consent, authorization, and access controls into their applications.
Question three: how does it fail?
Anthropic's essay warns that agents bring higher costs and the potential for compounding errors. It recommends extensive testing in sandboxed environments with guardrails, and describes human checkpoints and stopping conditions, such as a maximum number of iterations.
The risk OWASP lists first is prompt injection, which it defines as a vulnerability in which prompts alter a model's behavior or output in unintended ways. In a direct injection, a user's own input does it, deliberately or by accident. In an indirect injection, the instruction is placed in content the model reads from outside, such as a web page or a file. The US National Institute of Standards and Technology describes the same split in its Generative AI Profile, NIST AI 600-1, published in July 2024, and notes that security researchers have demonstrated indirect prompt injections stealing proprietary data or running malicious code on a machine.
Indirect injection is the version that follows an agent around. An agent that reads email, browses the web, or opens documents is constantly taking in text written by strangers. Suppose a hidden line in that text tells the agent to forward the latest invoice to an outside address: a poorly guarded agent may treat it as an instruction rather than as data.
An agent that reads email, browses the web, or opens documents is constantly taking in text written by strangers.
OWASP says that, given how these models work, it is unclear whether there are fool-proof methods of preventing prompt injection. Its mitigations limit the damage instead: constrain the model's behavior, check outputs with ordinary code, label untrusted content, enforce least privilege, require human approval for high-risk actions, and test with simulated attacks. This is where the second and third questions meet. OWASP says the impact of a successful injection depends largely on the business context and on the agency the model has been given.
What to ask before you hand over a task
The three questions become a short check before letting an agent act for you. How long and varied is the task, compared with the tasks METR measured? What accounts, files, and payment methods can the agent reach, and can that access be narrowed? Which actions will it take without asking, and can deleting, sending, or paying require your approval? And what will it read along the way that someone else wrote? The first question comes from METR's benchmark; the others follow OWASP's guidance on excessive agency and prompt injection.
What we don't know yet
Whether METR's time-horizon trend holds, and whether it carries over from software tasks to other kinds of work, is an open question its authors flag themselves. No framework cited here claims prompt injection is solved. Until one does, OWASP's answer is to limit the damage: narrow what an agent can do, and require a person's approval for high-risk actions.
Sources
- Measuring AI Ability to Complete Long Software TasksMETR (arXiv:2503.14499), March 18, 2025 · Primary source
- Measuring AI Ability to Complete Long TasksMETR, March 19, 2025 · Primary source
- Time Horizon 1.1METR, January 29, 2026 · Primary source
- LLM01:2025 Prompt Injection (OWASP Top 10 for LLM Applications 2025)OWASP Gen AI Security Project · Primary source
- LLM06:2025 Excessive Agency (OWASP Top 10 for LLM Applications 2025)OWASP Gen AI Security Project · Primary source
- NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence ProfileNational Institute of Standards and Technology, July 26, 2024 · Primary source
- Specification (version 2026-07-28)Model Context Protocol, July 28, 2026 · Primary source
- Building Effective AgentsAnthropic, December 19, 2024 · Primary source
- Function callingOpenAI (API documentation) · Primary source
- Function calling with the Gemini APIGoogle (Gemini API documentation) · Primary source
- About the OWASP FoundationOWASP Foundation · Primary source
Corrections and updates
No corrections have been made to this article. How we handle corrections
Sources last checked .

