Module 1 · Lesson 6 · 13 min read

Limits of agents and their use cases

Agent Limits and Use Cases

Introduction

Agents are powerful tools, but they are not magic. In this lesson we look at the most important limits of today's agents, including hallucination, limited context, cost and security risks, then determine when an agent is a suitable choice and build a practical decision checklist.

Learning objectives

  • List five main limits of today's agents and explain the effect of each
  • Explain the phenomenon of error compounding in multi-step tasks
  • Identify the conditions that make an agent suitable for a task
  • Apply a decision checklist to a real project before starting to build

A realistic view

Now that we know what an agent is and how it works, we need a balanced view: where agents actually succeed, where they fail, and how to decide responsibly. Enthusiasm for a technology is no substitute for good engineering, and an agent that works in a demo may collapse in front of real users.

Limits of today's agents

1. Hallucination and reasoning errors

The model may invent information or draw a wrong conclusion with confidence. In an agent the effect is multiplied because an error in the second step is built upon in the following steps; this is called error compounding.

2. Limited context

Every model has a limited context window. In long tasks tool results pile up until they exceed it, and the agent loses important information. We address this in the memory module.

3. Cost and latency

Every cycle of the loop is a call to the model. An agent that needs 15 cycles is much slower and more expensive than a single call. In the article "Building effective agents", Anthropic notes that agentic systems often trade latency and cost for better performance, and you must decide when this trade-off is worth it.

4. Difficulty of testing

Because the path is not fixed, the agent may behave differently for the same input. Testing needs statistical evaluation over a set of cases, not a single test.

5. Security

An agent that reads external content (a web page, an email) is exposed to indirect prompt injection: malicious text inside the content that tries to steer the agent into doing something the user did not ask for. Greshake and colleagues described this risk in 2023, and we cover it in detail in the evaluation and security module.

ApproveRejectThe agent proposesProposed ActionHuman reviewApprove / RejectExecuteReview the planRevise
Human in the loop: the agent proposes the sensitive action, and the human approves, rejects or edits it, then it is executed or reviewed.

Where do agents succeed?

Agents are suitable when three conditions come together: the task has multiple steps, the path is not known in advance, and the result can be verified. Examples:

  • Coding assistance: reading code, editing it, running tests, and fixing based on the results. The tests here are objective feedback.
  • Research and information gathering: searching several sources and summarizing them with references.
  • Technical support: diagnosing a problem through successive questions and queries to internal systems, handing hard cases over to a staff member.
  • Data analysis: reading a file, proposing an analysis, running it and reviewing the result.

A practical example: a decision checklist before building

A student team wants to build a "course registration agent" that chooses courses and registers them automatically. Let us apply the decision questions:

QuestionAnswerEffect
Are the steps known in advance?PartlyYou can start with a workflow with a single decision step
Can the result be verified?Yes, through the prerequisite rulesGood
Is the action reversible?Registration may take a limited seatHuman confirmation is required
Is the cost acceptable?The number of students is largeThe number of cycles must be limited

The following code turns these questions into a simple assessment tool that helps you discuss; it is not a scientific standard:

python
QUESTIONS = {
    "multi_step":       ("Does the task need several successive steps?", 2),
    "unknown_path":     ("Does the path change depending on the results?", 3),
    "verifiable":       ("Can the correctness of the result be verified?", 2),
    "reversible":       ("Are the actions reversible?", 1),
    "cost_ok":          ("Is the extra cost acceptable?", 1),
}

def assess(answers):
    score = sum(w for k, (_, w) in QUESTIONS.items() if answers.get(k))
    notes = []
    if not answers.get("reversible"):
        notes.append("Add human approval before irreversible actions")
    if not answers.get("verifiable"):
        notes.append("Design a verification method before building")
    if score >= 6:
        verdict = "An agent is suitable"
    elif score >= 3:
        verdict = "Start with a workflow with a decision step"
    else:
        verdict = "A fixed workflow is enough"
    return verdict, score, notes

print(assess({"multi_step": True, "unknown_path": False,
              "verifiable": True, "reversible": False, "cost_ok": True}))

The result for the registration project: "Start with a workflow with a decision step", with a note to add human approval. This is a more mature engineering decision than building a fully autonomous agent from day one.

Summary

The main limits of today's agents are hallucination and error compounding, the limited context window, cost and latency, the difficulty of testing, and security risks such as indirect prompt injection. Agents succeed when the task has multiple steps, its path is not known in advance and its result can be verified. Irreversible actions need human approval. Starting with the simplest solution and adding complexity after measuring is the sound engineering approach.

Terms

TermEnglishDefinition
Error compoundingError CompoundingLater steps being built on an error in an earlier step, magnifying its effect
Context windowContext WindowThe maximum number of tokens the model can process in a single call
Indirect prompt injectionIndirect Prompt InjectionMalicious instructions hidden in external content that the agent reads
Human in the loopHuman-in-the-loopInvolving a human to approve or correct at specific points
LatencyLatencyThe time between the request and the user getting the result

Review questions

  1. What is meant by error compounding, and why is it more dangerous in agents than in a chatbot?
  2. Name the three conditions that make a task suitable for an agent.
  3. Why is programming with automated tests a suitable environment for agents?
  4. Apply the decision checklist to an agent idea of your choice and discuss the result.

References