Agentic AI · Day 05 · Chapter 01

What is an
Agent?

Not the AI kind yet. The Malayalam-cinema kind.

Before we touch a single API, let's agree on what the word "agent" even means. Hollywood and Kerala got there decades before OpenAI did.

The case file

Agent
CID Moosa, self-appointed secret agent with the Kerala Police (unofficially)
Assignment
Whatever case just walked through the door
Equipment
A bag of gadgets, a sidekick, and unshakeable confidence
Method
Look at the situation, pick a gadget, try it, adjust, repeat
Exhibit A

The agent himself.

Illustration of CID Moosa, secret agent, with his dog
Hat: on. Scarf: non-negotiable. Backup: one very good dog.
The premise of every CID Moosa scene

Given a task.
Given tools.

Moosa never solves a case by "just knowing" the answer. He's handed a problem, handed a toolkit, and left to figure out the rest. Badly, hilariously, but the loop is real.

1
Given a task. Someone hands Moosa a case: find the missing item, catch the culprit, crack the code.
2
Given tools. Gadgets, contacts, a disguise, a getaway vehicle: whatever the job might need.
3
Observes the situation. Moosa looks around before doing anything. What's actually going on here?
4
Decides which tool fits. Not every gadget suits every scene, so he picks one based on what he's seeing.
5
Acts, checks the result, repeats. If it doesn't work, he tries the next thing, until the case closes.
Same loop, new medium

Now swap the spy
for software.

Strip away the comic timing and the mundu, and CID Moosa is running the exact loop we want an AI system to run: task in, tools available, judgement in between, action out, repeated until done.

The agent is the loop. Observe, decide, act, check, repeat, applied to a goal, using whatever tools it's allowed.
Making it precise

What actually
makes it an agent?

A single prompt and response is not an agent. There's no loop, no tools, no memory of what just happened. An agent needs all four pieces below, working together.

The four ingredients

Goal
A task stated once, carried through every step
Tools
Functions it can call: search, a calculator, an API, another agent
Memory
What's happened so far in this run, carried forward
A loop
Observe, decide, act, check. Repeated with some autonomy until the goal is met or it gets stuck
Under the hood

In. Reasoning.
Out.

Zoom into the "decides which tool fits" step and this is what it looks like. The model sits in the middle. Three things sit around it, ready when needed.

In LLM Out Retrieval Tools Memory Query Results Call Response Read Write
Retrieval looks things up. Tools do things. Memory remembers what already happened. The LLM's only job is deciding, at each step, which of these it needs, if any.
The distinction that matters

A chatbot answers.
An agent works.

This is the line we'll keep coming back to all day. It decides whether something belongs in "prompt engineering" or in "agentic AI."

Chatbot

One prompt in, one completion out. No tools, no loop, no memory beyond the conversation. It answers. It doesn't act.

Agent

Given a goal, it plans its own steps, calls tools, checks results, and loops until done, or hands off to a specialist when it's out of its depth.

End of Chapter 01

The loop is simple.
The landscape isn't.

Every framework you've heard of is really this same loop, dressed differently. Next: a fast tour of who's building what.

← Back to startChapter 02: Agentic Frameworks →