Skip to main content
Machine-assisted translation of the Hebrew original, awaiting the lecturer's review.

Session 1 — What is an agent

Session 1 of 13TheoryStudy guide5 min read

A study guide for a lecture that has already been given. It does not replace the slides.

Goals​

  • Define an agent without needing a language model.
  • Tell who chooses the next action: a person, a fixed workflow, or a model.
  • See why a good result on one input is not a rule.

Definition​

An agent is a system that observes its environment and chooses actions to make progress toward a goal. A robot vacuum goes around an obstacle and returns to charge when the battery is low. There is no language model in this example, and there is an agent.

In an agent based on a language model the division of work is different:

PartRole
GoalWhat counts as done
ContextWhat the model sees right now
ModelProposes the next action
Code and toolsCarry out only an allowed action
ObservationGoes back to the model

The important point is that the choice can change after an observation. If the order of actions is fixed in advance, it is a work plan, even if a model sits at every step.

Example: dividing jobs​

Two identical workers. Each job runs once, without splitting. The basic rule sends the next job to the less loaded worker. A tie goes to the first worker.

Deterministic demo. No model is called here.

5Finish time
4Best for this input
4Lower bound
Worker 1 · load 5
Worker 2 · load 2

The rule finishes at 5, but there is a split that finishes at 4. An improvement on one input doesn't prove the rule is always better.

In case A, sorting from longest to shortest shortens the finish time from 5 to 4. In case B both rules finish at 7, and there is a split that finishes at 6. So you cannot conclude from the first case that the new rule is always better.

The agent can propose the rule change and choose which test to run. The split itself is computed by ordinary code. If the test of the new version stops on a timeout, there is no report that it passed.

What may be changed​

Editing a candidate plan can be allowed. Deleting an acceptance test is not allowed, because it improves a number without improving the plan. Publishing a change requires approval. These three decisions are enforced by the code, not by a sentence in the system instructions.

Short exercise​

Pick a task you did this month. Write one action a tool could carry out, two possible results, and what would change after each one. Then write an action the system must block without approval.

Check your understanding​

In case B both rules finish at 7, and the best split finishes at 6. What may you conclude?

Pick an answer to see the explanation. There is no grade here.

Reading​

  • Wooldridge and Jennings, Intelligent Agents: Theory and Practice, 1995.
  • Yao et al., ReAct, ICLR 2023. arXiv:2210.03629
  • Anthropic, Building effective agents, 2024.

Summary​

Found a mistake on this page? Email the lecturer

Accessibility settings

These settings change how this site looks on this device only. They are saved in this browser.

Text

Colour

Light and dark mode are in the top bar, next to search.

Reading and navigation