Velamuvi AIAcademy

Lesson 4 of 7 · What Is an Agent?

What Agents Can and Cannot Do

A realistic look at AI agents: what they do well, why errors compound, cost and speed limits, risks like prompt injection, and how to design around them.

  • 5 min read
  • Beginner
  • Reviewed
In this lesson you will learn
  • Name the kinds of tasks agents handle well today
  • Explain why small errors add up over long tasks
  • Describe the cost, speed and security limits of agents
  • Design tasks so agents are more likely to succeed

Where agents shine

Agents do best on tasks with these features:

  • Clear goal, checkable result: tests that pass, a file that opens, a number that can be verified.
  • Good tools and fast feedback: each action returns useful information.
  • Mistakes that can be undone: drafts, code in a branch, read-only searches.
  • Moderate length: a few to a few dozen steps.

Coding is the standout example: an agent can run the tests after every change, so it gets instant, honest feedback on whether it's on track.

Why long tasks are hard

Every step carries a small chance of going wrong: a misread result, a wrong argument, a poor choice. If every step must succeed, those chances multiply:

Try it yourselfPython
# If each step of a task succeeds with probability p, and every step must succeed,
# the whole task succeeds with probability p x p x ... = p ** steps.
print("Steps   99% per step   95% per step   90% per step")
for steps in [1, 5, 10, 20, 50]:
    row = "   ".join(f"{p ** steps:>12.0%}" for p in [0.99, 0.95, 0.90])
    print(f"{steps:>5}   {row}")

An agent that's right 95% of the time per step finishes a 10-step task correctly only about 60% of the time, and a 50-step task less than one time in ten. This is why agents work best when steps can be checked and corrected along the way, rather than having to be perfect.

Other limits

LimitWhat it meansHow to design around it
CostEach step is a model call, and the history growsFewer steps, smaller models for simple steps, budgets
SpeedMany calls take seconds to minutesUse agents where waiting is acceptable; show progress
UnpredictabilityThe same task may take different pathsLogging, tests, evaluation on many runs
SecurityText the agent reads can contain instructionsLimit tools and permissions; approve risky actions
JudgementAgents can be confidently wrongKeep a person responsible for important decisions

Common mistakes

Practice exercise

Work out how reliable a long agent task is when every step must succeed.

Your solutionPython
per_step = 0.97     # the agent gets each step right 97% of the time
steps = 15          # the task needs 15 steps, all correct

# Print the chance that the whole task succeeds, as a whole-number percentage:
# Task success: 12%
Knowledge check

An agent gets each step right 95% of the time. Roughly how often will it complete a 10-step task with every step correct?

Summary

  • Agents work best on tasks with clear goals, checkable results, good tools and undoable mistakes.
  • Errors compound: per-step reliability multiplies over the length of a task.
  • Agents also face limits of cost, speed, unpredictability, security and judgement.
  • Design around them: shorter tasks, checks, budgets, limited permissions and human approval.

Next: how to give a model tools.

Finished reading? Tick it off to track your progress.