AI from Scratch8 min read

AI from Scratch #9: When AI Starts Making Its Own Decisions

There's a big difference between asking for directions and handing someone your car keys. AI agents don't just answer questions — they take actions. Here's how.

RM

Raghu Mudumbai

CEO & Chief Scientist, netcausal.ai

Directions vs. Driver

Picture two scenarios.

Scenario A: You're in an unfamiliar city. You open Google Maps and it gives you turn-by-turn directions. "Turn left in 200 feet. Take the highway. Exit at Main Street." You follow each instruction, one at a time.

Scenario B: You hand your friend the keys and say "Get me to the airport. I need to be there by 3." Your friend makes every decision: which route to take, when to merge, whether to detour around traffic, when to stop for gas. You sit back and relax.

In Scenario A, you're the decision-maker. The GPS is just a tool giving you information.

In Scenario B, your friend is the decision-maker. They're an agent — they take in a goal, figure out a plan, and execute it on their own, making decisions along the way.

Most AI you've used so far is like Scenario A. You ask a question, it gives an answer. You type a prompt, it generates text. It's reactive — it waits for you to tell it what to do.

AI agents are like Scenario B. You give them a goal, and they figure out how to accomplish it — planning steps, using tools, and making decisions without you guiding every move.

From Chatbot to Agent

Let's make this concrete. Here's what a regular AI chatbot does:

You: "What's the weather in New York?" AI: "It's 72°F and sunny in New York."

That's it. One question, one answer. The AI doesn't do anything — it just tells you information.

Now here's what an AI agent does:

You: "Plan a weekend trip to New York for me. I like museums, hate tourist traps, and need a hotel under $200/night."

The agent:

  1. Searches for flights and compares prices
  2. Finds hotels in your budget near museum districts
  3. Researches museums and filters out the touristy ones
  4. Checks the weather forecast for the weekend
  5. Builds a day-by-day itinerary with walking routes between locations
  6. Books the flight and hotel (with your permission)

No one told it to do steps 1 through 6. It figured out what steps were needed to accomplish your goal and executed them in a logical order. That's what makes it an agent.

The Four Superpowers of Agents

What separates an AI agent from a regular chatbot? Four key abilities:

1. Planning. Agents can break a big goal into smaller steps. "Plan a trip" becomes: search flights → compare prices → find hotels → check weather → build itinerary. This is like how you'd plan a surprise birthday party — you instinctively break it into tasks without anyone giving you a checklist.

2. Tool use. Agents can use external tools: search the web, run code, read files, query databases, call APIs, send emails. A chatbot can only work with what's in its training data. An agent can go out and get new information or take real actions in the world.

3. Memory. Agents remember what happened earlier in the task. "I already searched for flights and found one for $180. Now I need to find a hotel near the airport." Without memory, it would forget its own progress and start over every step.

4. Reasoning. Agents can think through problems, handle unexpected situations, and adjust their plans. If the preferred hotel is fully booked, the agent doesn't just fail — it looks for alternatives and adjusts the itinerary accordingly.

How Agents Actually Work

Under the hood, AI agents run in a loop:

1. Observe: Look at the current situation
2. Think: Decide what to do next
3. Act: Take an action (search, click, write, calculate)
4. Observe: See the result
5. Repeat until the goal is achieved

This is essentially the same loop from reinforcement learning (Article #4) — but instead of learning through millions of trials, the agent uses the reasoning abilities of a language model (Article #3) to think through each step in real time.

The language model acts as the "brain" of the agent. It reads the current situation, reasons about what to do, generates an action, and then reads the result. This loop continues until the task is done.

Agents in the Real World

AI agents are already being used in ways you might not realize:

Coding assistants. When an AI helps write code, it's not just auto-completing one line. Modern coding agents can understand your entire project, write new features across multiple files, run tests, find bugs, and fix them — all from a single description of what you want built.

Research agents. Give an AI agent a research question and it will search academic papers, read through them, synthesize findings, compare different viewpoints, and write a summary — a process that might take a human researcher days.

Customer service. AI agents handle customer support by understanding the problem, looking up account information, checking policies, and resolving issues — escalating to a human only when needed.

Personal assistants. AI agents can manage your email, schedule meetings, set reminders, order food, and coordinate logistics — not by following rigid rules, but by understanding context and making judgment calls.

The Trust Problem

Here's the big question: how much autonomy should we give AI agents?

There's a spectrum:

  • Low autonomy: The agent suggests actions, but you approve every one. ("I found three hotels. Should I book this one?")
  • Medium autonomy: The agent takes routine actions on its own but asks for approval on big decisions. ("I booked the hotel, but the flight has a layover — should I pay $50 more for a direct flight?")
  • High autonomy: The agent handles everything and just reports back when it's done. ("Your trip is booked. Here's the full itinerary.")

Right now, most AI agents operate at low-to-medium autonomy. We're still building trust — and for good reason. An agent that books the wrong flight or sends an embarrassing email is a problem. The more consequential the action, the more we want a human in the loop.

This is like the difference between handing your friend the car keys for a five-minute drive to the store versus a cross-country road trip. The more that's at stake, the more trust (and checkpoints) you need.

The Difference from Automation

You might be thinking: "Isn't this just automation? Bots have been doing stuff automatically for years."

There's a key difference. Traditional automation follows rigid scripts: "IF email contains 'refund' THEN send refund form." It can't handle anything it wasn't specifically programmed for.

AI agents are flexible. They can handle situations they've never seen before because they can reason about them. If a customer asks for a refund in a way the script doesn't cover, a traditional bot breaks. An AI agent understands the intent and figures out the right response.

Think of it as the difference between a vending machine and a personal chef. The vending machine gives you exactly what's programmed. The chef understands your request, adapts to what's available, and creates something appropriate — even if you ask for something they've never made before.

Try It Yourself

Plan a surprise birthday party for a friend. Don't ask anyone for step-by-step instructions — just figure it out.

You'll notice yourself naturally:

  • Breaking the goal into steps (venue, food, guests, decorations, timing)
  • Using tools (texting friends, searching restaurants, checking prices)
  • Remembering what you've already done (already invited Jake, still need to text Maria)
  • Adapting when things go wrong (the restaurant is booked, find a backup)

Congratulations — you just acted as an agent. You took a high-level goal and autonomously figured out how to achieve it, making decisions and using tools along the way. AI agents do exactly this, just digitally.

The Big Takeaway

AI agents are AI systems that don't just answer questions — they take actions to accomplish goals. They can plan multi-step tasks, use external tools, remember their progress, and adapt when things don't go as expected.

The shift from chatbots to agents is one of the biggest leaps in AI right now. Instead of AI being a tool you use step by step, it becomes a collaborator that can handle entire workflows on your behalf — with the right level of trust and oversight.

What's Next

In our final article, Article #10, we'll tackle the question everyone's asking: will AI take your job? We'll separate the hype from reality, look at what's actually changing, and talk about the skills that matter most in a world where AI can do more and more. Spoiler: the answer is more nuanced — and more optimistic — than the headlines suggest.


This is part of the AI from Scratch series — making AI and machine learning understandable for everyone, no PhD required. Follow along on Medium or at netcausal.ai/blog.

ai-from-scratchai-agentsbeginnersmachine-learningartificial-intelligence
Share

Stay ahead of the curve

Get insights on causal AI, network infrastructure, and enterprise technology delivered to your inbox.

No spam. Unsubscribe anytime.