← Back to list

Agentic AI: From Generating Answers to Taking Action

Generative AI changed how we interact with computers. You write a prompt, the model produces text, code, or an image, and that is the end…

Rahul Yadav · 2026-10-02 15:33 · 0 claps · 5.7 min read
#agentic-ai #llm #langchain #langgraph #artificial-intelligence
Open on Medium ↗
Wiki topics: LLM · Large Language Models AGT · AI Agents AI · AI · General

Agentic AI: From Generating Answers to Taking Action

Generative AI changed how we interact with computers. You write a prompt, the model produces text, code, or an image, and that is the end of the interaction. This is powerful, but it is also limited. A generative model answers one request at a time and does not pursue a goal on its own. It does not check whether its answer was good, and it does not go off and use tools unless you build that around it.

Agentic AI is the next step. Instead of only responding, an agentic system is given a goal and works toward it: it plans, takes actions, observes the results, and adjusts until the task is done.

What Is Agentic AI?

Agentic AI refers to AI systems that can reason about a goal, decide what to do next, use tools to act, and learn from the outcome of each step. The LLM is still at the center, but it is no longer just a text generator. It acts as the decision-making brain of a larger system.

Suppose you say, “Research the latest developments in MCP and write me a summary.” A plain LLM answers from whatever it already knows, which may be outdated. An agentic system behaves differently. It decides it needs fresh information, searches the web, reads the results, notices that one source is weak, searches again, and only then writes the summary. Nobody told it each step. It chose the steps itself.

Most agents follow a loop that is often described as Reason → Act → Observe → Repeat. The model reasons about what it needs, acts by calling a tool, observes the result, and then reasons again with that new information. The loop continues until the goal is reached or the system decides to stop.

The Core Ingredients of an Agent

Every agentic system is built from a few essential parts.

The LLM provides the reasoning. It interprets the goal, decides the next step, and produces the final response.

Tools give the agent the ability to act. These could be web search, database queries, API calls, code execution, or even MCP servers that expose external capabilities in a standardized way.

Memory lets the agent remember. Short-term memory holds the current conversation and intermediate results, while long-term memory stores information that should persist across sessions.

Planning and control flow decide how the agent moves from step to step: what to do first, when to retry, when to ask for help, and when to stop.

GenAI vs Agentic AI

The easiest way to separate the two is by what they do with a request.

Generative AI is reactive. It waits for a prompt, generates one response, and stops. Agentic AI is proactive and goal-driven. It takes a goal, breaks it into steps, and keeps working until the goal is met.

Generative AI works in a single step: input goes in, output comes out. Agentic AI works in multiple steps with loops, where the output of one step feeds the next.

Generative AI is mostly isolated, relying on its training data and the prompt. Agentic AI is connected, because it can use tools to reach live data, external systems, and real actions.

Generative AI has no self-correction by default. Agentic AI can evaluate its own results, notice failures, and retry with a different approach.

A good way to remember it: generative AI creates, while agentic AI creates and acts. Agentic AI does not replace generative AI. It is built on top of it, using the LLM as the reasoning engine inside a larger loop.

Why Agents Need More Than a Loop

You could write a simple agent as a while loop that calls an LLM, runs a tool, and repeats. This works for demos, but real applications quickly become messy. What if the agent needs to branch depending on a result? What if a step fails and must be retried? What if you want a human to approve a risky action before it runs? What if the process gets interrupted and needs to resume where it left off?

Handling all of this with plain code turns into a tangle of conditions and manual state tracking. This is the problem LangGraph is designed to solve.

Agentic AI in LangGraph

LangGraph is a framework for building stateful, multi-step AI workflows as graphs. Instead of hiding the agent’s logic inside one opaque loop, you describe it explicitly as a structure you can see, control, and debug.

A LangGraph workflow is made of a few key concepts.

State is the shared data that flows through the whole workflow. It holds things like the user’s question, messages so far, retrieved documents, tool results, and any counters you need. Every step reads from the state and writes updates back to it.

Nodes are the individual steps. A node is usually a function that does one job, such as calling the LLM, running a tool, retrieving documents, or evaluating an answer.

Edges connect nodes and define the order in which they run.

Conditional edges are where the agentic behavior really appears. After a node finishes, a decision function inspects the state and chooses which node to go to next. For example, after the LLM responds, the graph checks whether the model requested a tool. If yes, it routes to the tool node. If no, it routes to the end.

Loops come naturally from this. Routing from the tool node back to the LLM node creates the Reason → Act → Observe cycle. The graph keeps looping until the model decides it has enough information to answer.

A Typical Agent as a Graph

Picture the classic tool-using agent. The graph starts at an LLM node, which looks at the conversation and decides what to do. A conditional edge checks the output. If the model asked for a tool, control moves to the tool node, which executes the call and adds the result to the state. An edge then sends control back to the LLM node, which reasons again with the new information. When the model produces a final answer without requesting a tool, the conditional edge sends the flow to the end.

You can extend the same pattern in many directions. Add a node that evaluates whether the retrieved documents are relevant, and route to a query-rewriting node if they are not. Add a retry counter in the state so the agent gives up after a few attempts instead of looping forever. Add a router at the start that sends simple questions straight to the LLM and complex ones through a research workflow.

What LangGraph Adds for Real Systems

Beyond the basic graph, LangGraph provides features that matter once you move past demos.

Persistence and checkpointing save the state after each step, so a workflow can be paused, resumed, or recovered after a failure. This also gives agents memory across conversations.

Human-in-the-loop support lets the graph pause before a sensitive action, such as sending an email or deleting data, and wait for human approval before continuing. This is an important safety mechanism, because agents that can act can also act wrongly.

Multi-agent workflows let you build several specialized agents, such as a researcher, a writer, and a reviewer, and coordinate them in one graph, each handling the part it is best at.

Streaming and observability let you watch the agent work step by step, which makes debugging far easier than tracing through a hidden loop.

Where MCP and RAG Fit In

These pieces work together rather than competing. RAG gives the agent access to knowledge. MCP gives it a standardized way to reach external tools and systems. The LLM provides the reasoning. LangGraph ties them into a controlled workflow where retrieval, tool use, evaluation, and retries all happen in the right order.

Challenges to Keep in Mind

Agents are powerful, but they are not magic. Because they make their own decisions, they can loop unnecessarily, call the wrong tool, or confidently go down a wrong path. Every extra step adds cost and latency. Giving an agent powerful tools also creates real risk, which is why permissions, limits on loop counts, validation, and human approval for sensitive actions are essential. A good agentic system is not the one with the most autonomy, but the one with the right amount of autonomy and clear guardrails.

Final Takeaway

Generative AI generates. Agentic AI pursues goals. It reasons, uses tools, observes results, and adapts until the task is complete. LangGraph gives this behavior structure by turning the agent into a graph of state, nodes, edges, conditional routing, and loops, with persistence and human oversight built in.

The LLM is the brain, tools are the hands and LangGraph is the nervous system that coordinates it all.


메타데이터
post_id
68c782588be7
slug
agentic-ai-from-generating-answers-to-taking-action-68c782588be7
url
https://medium.com/@developer_1901/agentic-ai-from-generating-answers-to-taking-action-68c782588be7
canonical_url
https://medium.com/@developer_1901/agentic-ai-from-generating-answers-to-taking-action-68c782588be7
author_url
https://medium.com/@developer_1901
status
ok
fetched_at
2026-10-03 04:43:48