Home › Agentic AI with Bunty › Lesson 2
Goal: tell Bunty what "done" looks like
Agentic AI with Bunty, lesson 2 of 6. simple English notes, free.
The idea
Raj told Bunty "do something nice"… and Bunty switched off all the office lights!
The mistake was not Bunty's. Raj gave a question, not a goal.
An agent needs a clear goal: what to do, by when, and what "done" looks like. Then it knows when to stop.
- Vague: "Increase sales."
- Clear: "Email this week's 20 new leads, and give me the list of replies by Friday."
The code: A goal with a finish line
Save this as bunty_goal.py and run it with python bunty_goal.py:
# A goal tells the agent WHAT to do and what DONE looks like, so it knows when to stop.
leads = ["Asha", "Ravi", "Meena", "John"]
replies = []
def vague_goal():
return "Increase sales" # no finish line: the agent can't tell when it is done
goal = {
"what": "email every new lead",
"done": lambda: len(replies) == len(leads), # the finish line, as a check
}
for name in leads: # the agent works until goal["done"]() is True
if goal["done"]():
break
replies.append(f"{name}: email sent")
print("Vague goal:", vague_goal(), "-> when is it done? Nobody knows.")
print("Clear goal:", goal["what"])
for r in replies:
print(" ", r)
print("Done?", goal["done"]())
Output:
Vague goal: Increase sales -> when is it done? Nobody knows.
Clear goal: email every new lead
Asha: email sent
Ravi: email sent
Meena: email sent
John: email sent
Done? True
The clear goal has a done check. The agent keeps working until done() is True, then stops. The vague goal has no check, so nobody knows when it is finished.
Try it: change the code
- Add two more names to
leads. Does the agent still stop at the right time? - Write a
donecheck for: "get 3 replies by Friday".
Try it yourself
- Take one vague task from your work ("improve the report") and rewrite it as a goal: what, by when, and what done looks like.
- Ask: how would an agent know it has finished?
Remember
A clear goal gives clear work. (Goal saaf, toh kaam saaf.)
← Chatbot vs agent · Tools: Bunty's hands →
All lessons: Agentic AI with Bunty