Module 2 · Building Agents · scripted
The Conversation with the Computer
Overview
So far, a human has performed every action. Replace the human with a computer, and notice that nothing about the conversation changes shape: most agents spend their lives in a conversation with a computer. A tool call is a message asking the computer to act; the result is the computer's reply, describing what changed in the world. In this lesson, we look at how these conversations begin — a person saying "go," or no person at all — and see that the agent is still just driving a flipped interaction.
Most agents talk to computers
The agents we have built so far steer a human. Swap the human out for a computer, and watch what — surprisingly — does not change.
The discussion the LLM has with the computer is the same shape as the one it had with the cook: it asks the computer to take an action; the computer takes the action; the computer replies with an updated state of the world. The way the LLM asks is by using a tool — a tool call is a message to the computer that causes an action to take place. The result of the tool call comes back as a description of what changed.
The participants
A human says "go"
A conversation like this is often kicked off by a person stating a goal — and then stepping out of the loop:
You have the following tools available for use:
- search_email( query )
- read_email( id )
Task: Look through my email and find any updates related to my Molde, Norway trip.
search_email(query="Molde")3 matches: [12] "Hotel Alexandra – booking confirmed",
[47] "SAS – schedule change for your flight",
[51] "Fwd: fjord kayaking?"read_email(id=47)"Your SAS flight WF562 Oslo–Molde on 24 Aug now departs 14:05
(previously 11:20). Your connection from Amsterdam is unaffected."One update matters: your Oslo–Molde flight on 24 Aug now departs at 14:05 instead of 11:20 — you'll land about three hours later. The hotel booking is confirmed, and the kayaking thread has no changes. You may want to warn whoever is meeting you.
Nobody says "go"
The kickoff doesn't need a human at all. The first message of the conversation can be composed automatically — an email arriving with a certain subject line, a sensor crossing a threshold, a timer firing:
[Automated trigger] New email received matching rule "airline schedule change". New email: id=88.
You have the following tools available for use:
- read_email( id )
- get_calendar( date )
- update_event( id, changes )
- send_message( to, text )
Task: Keep the calendar consistent with all bookings.
read_email(id=88)"SAS: flight WF562 Oslo–Molde on 24 Aug now departs 14:05, arriving
15:10."get_calendar(date="2026-08-24")[e3] 11:20–12:25 "Flight WF562 OSL→MOL"; [e4] 13:00 "Pickup at Årø
airport — Bjørn"update_event(id="e3", changes="14:05–15:10")Event e3 updated: 14:05–15:10.send_message(to="Bjørn", text="Flight WF562 on 24 Aug now lands 15:10
— pickup moved to 15:15 at Årø. Sorry for the change!")Message delivered to Bjørn.Calendar updated and Bjørn notified. All bookings and calendar entries are consistent again.
- In Example 1 a human stated the goal; in Example 2 a rule did. What else differs between the two conversations? What is identical?
- In Example 2, where did the agent learn about the pickup problem — the email, or its own tool use?
Still a flipped interaction
Step back and recognize the pattern. This is the cooking conversation with one participant swapped out. The LLM leads; it takes one action at a time; each action elicits new information about the world; and the answer to each action conditions the next one. The only change: the participant performing the actions and reporting back is now the computer itself, with no human intermediary carrying messages between them.
The same pattern, two participants
The human's role has moved: from performing every action to stating the goal — or writing the rule that states it automatically. What remains constant is the machinery underneath: a conversation, a trajectory, and an LLM writing the messages that steer it.
Sketch, in one page, a computer-in-the-loop agent for your research domain: what event or person kicks off the conversation, three to five tools with parameters (name · description · parameters, as precise as the GRILLVENN), and — hardest — what conversation state means "done."