Introduction to Reasoning › Reasoning in Your Personal Assistant

Michael BrenndoerferJune 21, 20252 min read
AI Agent HandbookAll chapters
Part 4 of 15Reasoning - Teaching the Agent to Think
Chapter 9Introduction to Reasoning › Reasoning in Your Personal Assistant
Reading section 9 of 14 · Reasoning in Your Personal Assistant · 2 minSection 9 of 14 · 2 min

Book contents

Section 9 of 14 · 2 min read

Introduction to Reasoning › Reasoning in Your Personal AssistantOne section · Sections in this chapter9 / 14 ↓

Let's see how reasoning fits into the personal assistant we're building. Imagine a user asks:

I have a meeting at 2 PM that usually runs 90 minutes. I need to leave for the airport by 4:30 PM, and it takes 20 minutes to get back to my office after the meeting. Will I have time to stop by the office before heading to the airport?

Without reasoning, the agent might give a simple yes or no. With reasoning:

Example (GPT-5)

In[2]:
Code
from openai import OpenAI

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

response = client.chat.completions.create(
    model="gpt-5",
    messages=[
        {
            "role": "system",
            "content": "You are a helpful personal assistant that thinks through scheduling questions carefully.",
        },
        {
            "role": "user",
            "content": """I have a meeting at 2 PM that usually runs 90 minutes. I need to leave for the airport by 4:30 PM, and it takes 20 minutes to get back to my office after the meeting. Will I have time to stop by the office before heading to the airport?

Let's work through the timeline step by step.""",
        },
    ],
)

print(response.choices[0].message.content)

The agent might respond:

Let me work through your timeline step by step:

1. Meeting start: 2:00 PM
2. Meeting duration: 90 minutes (1.5 hours)
3. Meeting end: 2:00 PM + 1:30 = 3:30 PM
4. Travel time to office: 20 minutes
5. Arrival at office: 3:30 PM + 0:20 = 3:50 PM
6. Departure deadline for airport: 4:30 PM
7. Available time at office: 4:30 PM - 3:50 PM = 40 minutes

Yes, you'll have time to stop by the office. You'll have approximately 40 minutes at the office before you need to leave for the airport. However, this assumes the meeting ends exactly on time. If there's a risk of the meeting running over, you might want to plan for a shorter office stop or skip it to ensure you make your airport departure time.

This response is far more useful than a simple "yes." The reasoning shows the user exactly how much time they'll have and even includes a practical consideration about meetings running over.