Coding Now – Best AI & Full Stack Courses in Delhi NCR | 100% Placement
Limited Offer: Get 50% OFF on AI & Full Stack Courses
📞 Call Now: +91 9667708830
Back to Agentic AI Notes
Topic #102

What Is an AI Agent?

An AI agent is a system that uses an LLM to decide, within defined constraints, which actions to take toward a goal — typically by selecting and calling tools, observing results, and deciding what to do next. Exact definitions vary somewhat across frameworks and papers, but this decision-loop behavior is the common thread.

The Minimum Ingredients of an Agent

ComponentRole
A goal or taskWhat the agent is trying to accomplish
An LLMMakes decisions about what to do next, given the current state
Tools/actionsThe concrete things the agent can actually do — search, query a database, call an API
ObservationReading back the result of an action to inform the next decision
A stopping conditionKnowing when the goal is met, or when to give up/escalate

Remove the tools and the observation loop, and you just have a chatbot — see Agent vs Chatbot.

Simplified Example (Conceptual, Not a Specific Framework)

goal = "Find today's USD to INR exchange rate and convert 500 USD"

while not done:
    decision = llm.decide_next_action(goal, history)

    if decision.action == "call_tool":
        result = run_tool(decision.tool_name, decision.arguments)  # validated first
        history.append(result)
    elif decision.action == "final_answer":
        return decision.answer

This is the essential shape of an agent loop — see Agent Loop for the fuller version, including validation and error handling.

Practical Use Case

A data-analyst agent given access to a SQL-query tool: it can decide to run a query, look at the result, realize it needs a follow-up query to answer the full question, run that too, and only then produce a final answer — a task that a single fixed prompt-response can't handle because the exact queries needed depend on what the first query returns.

Common Mistakes

  • Treating "has an LLM in it somewhere" as sufficient to call something an agent — the decision loop and tool use are the defining traits, not just LLM usage
  • Assuming an agent always needs multiple tools or complex logic — a single-tool agent that can decide whether to call that tool is still agentic, as opposed to a system that always calls it unconditionally (that's closer to a fixed workflow)

Interview Relevance

"Define an AI agent in one sentence" is a common opener — the strongest answers mention the LLM-driven decision loop and tool/action selection specifically, not just "AI that does things automatically."

Practice Question

List the five minimum ingredients of an agent (from the table above) for a system designed to book a meeting by checking a calendar and sending an invite.

Related Notes

Want to go beyond the notes?

Join CodingNow's Agentic AI course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available
💬 Talk to Advisor
1
WhatsApp

Latest from Our Blog

Insights on AI, Data Science, Full Stack & Career

View All Articles →