Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Agentic AI Without Coding Class #2: How an AI Agent Thinks: Goal, Plan, Action, and Check”.
Other ways we can help with Agentic AI.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

MATLAB Agentic AI Course: Building Autonomous AI Agents with MATLAB & Simulink

Midjourney Course: Create Stunning AI Images from Text
★ 4.9

DALL-E Course: Creating Professional AI Images from Text
★ 4.9
Have it built for you
No time to learn Agentic AI? Our team can do the project for you.

MATLAB & Simulink Development — Agentic AI for Simulation Automation and Data Analysis

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Agentic AI classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Hi, and welcome back to Agentic AI Without Coding. This is episode two of Session 1. In the previous episode we told chatbots, automation, and AI agents apart. Now let's peek inside an agent's head: how it moves from a goal, to a plan, to action, and then checks its own results.
A chatbot works in one pass: you ask, it answers, and that's it. An agent is different. An agent works in a loop that keeps repeating until the job is done. The loop has four stages: goal, plan, action, and checking results. If the result isn't right yet, the agent goes back to planning and tries again, or it stops to ask for your help. Let's go through them one by one. Stage one, the goal. This is your starting point: the end result you want, not the steps to get there. Stage two, the plan. The agent breaks the goal into small steps it can work through one at a time. Stage three, action. The agent carries out those steps using tools, such as reading a spreadsheet, looking up data, or writing an email draft. Stage four, checking results. The agent looks at what happened after its action. Is the data complete? Does the result make sense? Notice the loop arrow on the far right. If the result isn't right yet, the agent re-plans and tries again. If it's unsure or finds something important, it stops and asks you. AI developers often describe this pattern as think, act, then observe. The names may differ, but the idea is the same. To picture this easily, take Dimas, the new admin at Sunset Coffee, the coffee business Laras runs in Bandung. One morning Laras says: Dimas, make sure all of today's orders go out. That's the goal. Dimas isn't given detailed steps. Dimas makes the list without being told: check the orders, check the stock, then book a courier. An agent does the same thing: it makes a list of steps from the goal. Then Dimas acts: opening the spreadsheet, contacting the courier, and replying to customers. An agent acts by calling tools, such as Google Sheets, WhatsApp, or email. Finally, Dimas makes sure everything has gone out, then reports to Laras. An agent also compares the results with the goal before reporting. So an agent works like a diligent new employee, only much faster. So what does it mean for an agent to think? Of course, not thinking like a human. In each loop, the AI model reads everything in front of it: the goal, the instructions, the data, and the results of earlier actions. From those inputs, the model decides the next step: use a particular tool, ask you a question, or declare the job done. The result of that step then becomes input for the next loop. That's why the quality of an agent's decisions depends heavily on what you give it. A vague goal and messy data lead to bad decisions, no matter how smart the model is. That's why we look at the goal stage first.
Of the four stages, the goal matters most. Even a smart agent gets confused when the goal is vague. Compare these. A vague goal: handle the orders. A clear goal: all of today's orders are ready to ship before three in the afternoon. An agent won't ask you back unless it's told to. It will guess, and its guess may not match what you had in mind. Second, the finish line. A vague goal has none. A clear goal says when the work counts as done: every order is marked ready to ship, or flagged as needs checking. Third, limits. A good goal also says what the agent must not do: don't change prices, and don't send messages to customers without permission. Fourth, the report. The agent needs to know what form the result should take, such as a five-line summary for Dimas, plus a list of any problems it found. This is what a clear goal looks like when it's written for an agent. The first block is the goal itself: all of today's orders are ready to ship before three in the afternoon. The second block, context. The agent is told who it's helping, what the business is, and where the data lives: orders are in the Orders sheet, and stock is in the Stock sheet. The third block holds key data it will use often: the in-town delivery fee of ten thousand rupiah, free delivery for orders over two hundred thousand rupiah, and the shop's opening hours. The fourth block, limits. The agent must not change prices, and must not send messages to customers without Dimas's approval. The fifth block, the report format. With these five blocks, the agent knows what it's working toward, where it works, and when it has to stop. We'll practice writing blocks like these in more depth in Session 2, on prompting. So a good goal has five signs. It names the end result, not the steps. And it has a finish line you can check, not just a feeling that it's done. It also states the limits, and states when the agent must ask or get permission. This matters, because an agent can't read your mind. Finally, it states the format of the final report. From now on, check every goal you write against these five signs. No goal is perfect on the first try, and that's normal.
Now stage two: the plan. On this screen we give that goal to the Sunset Coffee admin agent. Notice the last sentence: show me your plan before you start. The agent replies with a five-step plan. Read today's orders, match them against stock, check addresses and delivery fees, mark their status, then send a report to Dimas. We didn't write any of these steps. The agent worked them out from the goal. It also asks: shall I start? That's a good habit we should ask of every agent. Because the plan is visible, we can correct it before anything happens. For example, we add: also check the notes column, in case there are special requests. The agent updates its plan and gets to work. Correcting a plan is much cheaper than cleaning up after an action that has already gone wrong. In Session 4, when agents start acting in the browser, this habit of asking for a plan will be very useful. There are four reasons why asking for a plan matters. First, it's transparent. You know exactly what the agent is going to do, with no guessing. One sentence at the end of the goal is enough to ask for it. Second, it's correctable. Logic mistakes are caught before the agent touches any data or sends any messages. Third, the steps are smaller. A big task is split into small parts that are each easy to check. Fourth, it's reusable. A plan that has proven itself can be saved as a work procedure, then turned into standing instructions for the AI assistant we build in Session 3. A good plan is like a shopping list: simple, but it keeps you from forgetting anything important.
Stage three is action, and this is where an agent differs from a chatbot. Here's the agent from before, as it looks in a visual automation app like n8n. Its trigger is a schedule: every day at one in the afternoon. In the middle is the AI Agent node, which holds the goal and limits we wrote earlier. Node is the name for each box on the canvas. Below it is the AI model, the brain. This model does the thinking, makes the plan, and decides which tool to use. Then come the tools. The first tool is the Orders sheet, which the agent may read and whose status it may update. The second tool is the Stock sheet. Look at its label: read only. The agent doesn't need to change stock for this goal, so we limit its permission. The third tool is WhatsApp, for sending messages to customers, but only after getting permission. The fourth tool is Gmail, for sending the report to Dimas. An agent can only do what its tools allow. That's the simplest way to put limits on an agent. We'll build a setup like this ourselves in Session 7. Let's watch the actions from the agent's chat window. Each dashed box is one action, meaning the agent calling a tool. The first action is reading the Orders sheet: there are six orders today. The second action is reading the Stock sheet. There are five bottles of one-liter iced coffee left, eight cold brews, and three hampers. The third action is reading the notes column, as we asked in our correction. There are two special requests. After three actions, the agent pauses and draws a conclusion. Four orders are fine. Putri's order of four hampers is more than the three left in stock. And Joko wants delivery after five in the afternoon. Only then does the agent take an action that changes data: marking four orders as ready to ship. Notice the order: read first, conclude, then change. If the order were reversed, the agent could mark an order ready to ship when there isn't enough stock. From that example, an agent's actions fall into four kinds, ordered from safest. First, reading: spreadsheets, emails, documents, or web pages. If it gets something wrong, nothing breaks. Second, writing drafts: replies, summaries, or reports that haven't been sent yet. Still safe, because you can review them first. Third, changing data, such as updating a status or adding a row. This is where you need to be careful, because mistakes can pile up without anyone noticing. Fourth, sending and paying. A message to a customer or a payment can't be taken back. For this kind of action, the agent must ask for your permission. We look at the risks in more detail in the next episode.
Stage four, checking results. This is the orders sheet after the agent has acted. The status column is filled in: four ready to ship, two needing a check. Putri's order is marked needs checking because it's one hamper short. That matches the earlier conclusion. Joko's order is flagged because of the delivery time request. But when the agent adds up the whole column again, it finds something else: today's total for one-liter iced coffee is six bottles, but only five are left in stock. This is why checking results matters. During the action stage, the agent checked orders one by one. When checking results, it looks at the big picture and finds a mistake that slipped through earlier. We can ask for this kind of check in writing in the instructions, for example: before reporting, add everything up again and compare it with the stock. In the agent's window, that recheck shows up as one extra read action: six iced coffees ordered, five in stock. The agent then corrects its own conclusion and writes the report in the requested format: four ready to ship, plus two problems with suggested fixes. Look at the last line. Messaging customers is a risky action, so the agent asks: approve? It doesn't send right away, because our limits don't allow it. Dimas reads the suggestion and approves it. Only then does the agent send WhatsApp messages to Putri and Joko, followed by the report email to Dimas. One loop is complete. Here's the end result in Dimas's inbox. At the top is the email from the agent, labeled Agent, sent at six minutes past one. It contains exactly the format we asked for: a short summary, the list of orders that are ready, the problems found along with what was done, and one suggestion: make an extra batch of iced coffee this afternoon. Dimas doesn't need to open the spreadsheets one by one. Dimas just reads five lines, then focuses on the two orders that really need a human's attention. To feel the impact, imagine doing this by hand every afternoon. Dimas opens two sheets and matches orders against stock one by one, which takes about forty-five minutes. With the agent, Dimas just reads the report and approves two messages. About five minutes. More importantly, two problems were found before the orders were shipped, not after a customer complained. These numbers are an illustration, and we'll measure the real savings for your business in Session 10.
One more thing: when does the loop stop? There are three possibilities. First, the goal is reached, and everything meets the finish line we set. Second, the agent needs permission or information it doesn't have. Like earlier, it stops and asks Dimas. Third, a limit is reached. For example, a tool keeps failing, or the agent has tried many times without success. In apps like n8n, we can limit how many times an agent is allowed to loop. A good agent knows when to stop. A bad agent keeps trying endlessly, or worse, makes up an answer just to look finished. Let's look at a loop that doesn't go smoothly. On Thursday, the agent tries to send a WhatsApp message to Budi, and it fails: the number isn't registered. The agent doesn't give up, and it doesn't pretend it worked. It goes back to the planning stage and makes a new plan: find Budi's email in the Customers sheet, then send the confirmation by email. Because this is a new way of sending, it asks first. Dimas approves. The agent reads the Customers sheet and finds Budi's email. Then it sends the confirmation by email. Finally, it reports back and marks Budi's WhatsApp number as needing an update, so the same problem doesn't happen again. This is the loop in practice: an action fails, the result is checked, the plan changes, and it tries again. Let's recap that loop. At the goal stage, your role is to write the goal, the limits, and the report format. At the plan stage, the agent makes five steps, and your role is to read and correct them. At the action stage, the agent reads three data sources and updates the status. Your role is to give tools with just enough permission. And at the checking stage, the agent finds the stock shortage that slipped through. Your role is to approve or reject important actions. So an agent doesn't replace you. It moves your role from doing the work to directing and reviewing it. An agent is most useful when you stay at the wheel at the important points. Now it's your turn. Take one task from the notes you made in Episode 1. Write its goal in one sentence, complete with a finish line. Add the limits, and decide when the agent must stop to ask for permission. Then picture a plan of three to five steps, along with the tools it needs. You don't need any app, just paper or a note on your phone. Keep these notes, because in Episode 5 we'll choose the five tasks most worth handing over to AI.
Let's recap. An agent works in a loop: goal, plan, action, and checking results. A clear goal, a plan you can correct, tools with just enough permission, and a check of the results make an agent trustworthy. In the next episode we look at examples of agents in everyday business, along with their limits and risks. See you in episode three.
Try these on your own after watching to lock in what you learned.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →