Week 1 · Sept 10, 2026 · Thursday, 9:00–11:30 am · 280 Brook Street, Room 110
What an AI agent is
Set up an agentic AI tool and run a first policy-data task on your own computer. Analyze life expectancy data, make a chart, and check the results. Form an initial judgment about AI's usefulness across the eightfold path.
Opening
Setup and a first run
- Install Codex or Claude Code using the setup guide, sign in, and open a project folder.
- Run a first policy-data task: read the life expectancy data, calculate comparisons, make a chart, and check the result.
- Learn how to direct a task and review a proposed plan.
Work and discussion
We introduce the eightfold path and use the life expectancy example to vote on where AI could help with policy analysis. We will return to these votes in Week 12. Your own project discussion begins in Week 2.
The shared data task
Weeks 1–3 use the Our World in Data life expectancy data. Keep the data, script, and outputs between classes. In Week 3 you can practice configuration on these files while exploring your own project. Week 4 teaches data collection.
Class format
Start with a short demonstration, then set up the agentic AI tool and run the task yourself. After a break, discuss the eight policy-analysis steps and record the class vote.
What an AI agent is
An agent and a chat assistant
- Underneath it is the same kind of model. The difference is the machine built around it.
- A text-only interaction can give you code to run yourself.
- An agent with file and execution tools can write that code, run it, inspect the output, and revise it.
- Check which tools are available in the interface you are using, then inspect the files and results it produces.
The project folder
- You pick one folder for your project, and the agent works inside it.
- Your data, your scripts, and your outputs are all in there together.
- The project folder organizes the work. Review the tool's permissions to understand which other files and commands it can access.
- The files in the folder are what the agent reads to understand the project.
Condition 1: tool use
- A language model on its own only produces text.
- Tool use gives it real actions: read a file, write a file, run a command, search the web.
- Every time it edits a script or runs
python analysis.py, that is tool use at work. - This is why the agent asks permission before it acts: it is running on your machine.
Condition 2: the agent loop
- A chatbot answers once. An agent works in a loop until the goal is met.
- On the life expectancy chart the loop ran like this:
- it read the CSV and found the column names,
- it wrote code to select the five countries and the years 2000–2023,
- it ran the code and hit an error on the country name column,
- it read the error and rewrote that step,
- it ran again and produced the chart.
- The loop pauses for your approval, and that pause is where your judgment enters.
Condition 3: running the code
- Code that has not run is only a guess.
- The agent runs its own code and reads what breaks.
- It fixes the code and runs it again.
- Because it runs the code, what it hands you is a result rather than a proposal.
The three conditions together
| A model alone | An agent |
|---|---|
| generates a code snippet | writes, runs, tests, and fixes code |
| describes what a script should do | implements it and verifies it |
| suggests an approach | executes it and iterates to a result |
- Take away any one of the three, and the system falls back to a chatbot.
The model can be wrong
- The model is probabilistic. It can make errors, and it can fabricate a number, a source, or a result. This is called hallucination.
- So, three rules for the semester:
- Check the data source. Open the file or the page the number came from.
- Check the intermediate outputs. Keep the script that produced the chart, and rerun it. Do not judge from the chart alone.
- You are responsible for the result. The agent is not.
Installation · do it on the right
GUI or terminal
- Your agent has two forms on your computer. Both run on your machine and work on your own files. The difference is how you talk to it.
- App (GUI): a normal window with a chat pane.
- Strength: it installs like any other app, and everything is a click.
- Weakness: it can only do what the window offers.
- Terminal: the same agent, driven by typed commands.
- Strength: it can do more complex work. Running the agent from a script, on a schedule, or on a server only works here.
- Weakness: the first hour looks unfamiliar.
- Both forms run on the same models and read the same instructions files in your project folder. Only the window around the agent differs.
- Either form works for this course. The steps on the right give the terminal commands first and the app steps after them.
What the terminal is
- The terminal is a text interface to your computer: you type a command, it prints the result.
- On a Mac it is the app called Terminal; on Windows it is PowerShell.
- The terminal version of the agent runs there because the terminal is where programs are run.
- You need very little of it:
cd foldermoves into a folder,lslists what is in the folder.
- Everything else you can ask the agent to type for you.
Errors during installation
- Something will break today, and that is expected.
- When a command the agent runs fails, the agent reads the error and fixes it. You watch and steer.
- When you are stuck yourself, tell the agent in plain words what happened.
- Raise your hand the moment a step fails.
The first run · do it on the right
The same task on your machine
- You watched the agent do the life expectancy analysis this morning. Now you run the same task yourself.
- The dataset and the exact prompt are on the right.
- The point is to watch the loop run on your own screen.
- Watch for the places where the agent makes a choice you did not specify. Each of those is a decision that should have been yours.
The approval prompt
- The first time the agent wants to write a file or run a command, it stops and asks you to approve the action.
- The prompt names the exact action: the file it will write, or the command it will run.
- Read it before you answer. Approving is how the agent gets permission to act on your machine.
Three run modes
- The run mode sets how much the agent does before it asks you:
- Plan mode: the agent writes a plan and changes nothing until you approve or edit the plan.
- Ask-first mode: the agent asks you to approve each action.
- Auto-accept mode: the agent runs the actions without asking.
- The mode names differ by tool:
- Codex has three permission modes: Ask for approval (the default), Approve for me, and Full access. In the terminal, type
/permissionsto change the mode. Ask for a plan in the prompt when you want one before anything runs. - Claude Code in the terminal cycles plan mode, ask-first, and auto-accept with Shift+Tab, and the footer shows the mode you are in.
- Codex has three permission modes: Ask for approval (the default), Approve for me, and Full access. In the terminal, type
- The apps offer the same choice in their own interface:
- In the ChatGPT desktop app and the Codex IDE extension, use the permissions control below the composer.
- In the Claude Code desktop app you pick the permission mode in the selector next to the send button. The modes are Auto, Manual, Accept edits, and Plan.
- Ask-first mode is the default for this course. In the Claude Code desktop app that mode is called Manual. Plan mode is for a task with real choices in it.
- Codex documentation on permission modes →
- Claude Code documentation on plan mode and permission modes →
- Claude Code desktop app: choosing a permission mode →
The demo again in plan mode
- Run the life expectancy task a second time, this time in plan mode.
- The agent reads the file and writes out the steps it intends to take. Nothing has run yet.
- Read the plan and find one choice you would have made differently.
- A wrong plan costs one rewrite. A wrong execution costs an afternoon.
If you finish early
- Ask the agent to change the comparison countries or the time window.
- Inspect the revised script and chart, and see whether the agent's choices still make sense.
Policy discussion
The eightfold path
- Define the problem. What is happening, to whom, and why does it call for a policy response?
- Assemble evidence. What do we know, and what evidence is missing?
- Construct alternatives. What policy options could the decision-maker choose?
- Select criteria. How should we compare those options?
- Project outcomes. What might happen under each option, and what assumptions support that judgment?
- Confront trade-offs. What does each option improve, and what does it give up?
- Decide. Which option does the evidence support?
- Tell the story. What does the intended audience need to understand?
Use these as recurring questions. Projects can involve several steps together and return to earlier steps.
Class vote: where could AI help?
Read in class (10 minutes): Margetts & Dorobantu, "Rethink Government with AI" (Nature, 2019), 3 pages. It lists what governments were using AI for in 2019: detecting fraud and errors, predicting demand for services, personalizing services, and simulating policy options.
- For each use of AI in the article, which of the eight steps is it?
- Which steps have no example in the article? Why might that be?
- The article is from 2019, before language models and agents. Which of its uses could the agent you installed today do, and what has been added since?
Policy question: How could public policy improve life expectancy in the United States?
- Use today's data analysis and chart as examples of where AI may help with assembling evidence and telling the story.
- For each of the eight steps above, vote by a show of hands: Useful, Not useful, or Unsure.
- Discuss the other steps too. Could AI help define the problem, propose policy alternatives, compare their outcomes, or weigh the trade-offs? Give a reason for your vote.
- Record the class count for each choice and a few reasons. Keep your own choices in your class notes.
- In Week 12, vote again on the same question and compare your judgments using examples from the semester's work.
Next class
Before Week 2
- Define a policy problem you want to work on.
- Treat it as the problem your final project will answer. The final project is a policy product, either a decision memo or a web page or app. Whichever form, it follows the eight steps.
- Bring it to class. We discuss it in class.
- Before then, use the agent as much as you can: on the life expectancy data, on your own problem, on anything. Note what worked and what did not.
Short memo
- No memo this week.