<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gayathri Mangalarapu</title>
    <description>The latest articles on DEV Community by Gayathri Mangalarapu (@gayathri_mangalarapu).</description>
    <link>https://dev.to/gayathri_mangalarapu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3551065%2F25842a0d-d02b-42d2-a3ef-2c9d1f08486d.png</url>
      <title>DEV Community: Gayathri Mangalarapu</title>
      <link>https://dev.to/gayathri_mangalarapu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gayathri_mangalarapu"/>
    <language>en</language>
    <item>
      <title>Agentic AI: How LLMs Really Work Behind the Scenes</title>
      <dc:creator>Gayathri Mangalarapu</dc:creator>
      <pubDate>Tue, 07 Oct 2025 16:48:57 +0000</pubDate>
      <link>https://dev.to/gayathri_mangalarapu/agentic-ai-how-llms-really-work-behind-the-scenes-31ap</link>
      <guid>https://dev.to/gayathri_mangalarapu/agentic-ai-how-llms-really-work-behind-the-scenes-31ap</guid>
      <description>&lt;p&gt;Ever wondered what really happens when you upload a PDF (or any file) into ChatGPT?&lt;/p&gt;

&lt;p&gt;At first glance, it seems like ChatGPT just magically “reads” your file. But the truth is more fascinating — it involves Agents, Tools, and Agentic AI.&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what exactly are AI Agents?
&lt;/h2&gt;

&lt;p&gt;An AI agent is basically a system that can think, plan, and act — kind of like a human.&lt;/p&gt;

&lt;p&gt;You can think of it like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LLM (Large Language Model)&lt;/strong&gt; – the &lt;em&gt;brain&lt;/em&gt;, doing all the &lt;em&gt;reasoning and planning&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt; – the &lt;em&gt;body&lt;/em&gt;, actually doing things, &lt;em&gt;actions&lt;/em&gt; and interacting with the environment&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Agent → uses Tools → performs Actions&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Google Assistant&lt;/strong&gt;&lt;br&gt;
Say you ask Google Assistant:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Schedule a meeting with the marketing team tomorrow.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here’s what happens behind the scenes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent figures out what you want (schedule a meeting).&lt;/li&gt;
&lt;li&gt;It decides which tool to use — your calendar app.&lt;/li&gt;
&lt;li&gt;Checks for conflicts, finds a time that works, and creates the event.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Essentially, the assistant &lt;em&gt;thinks, plans, and acts,&lt;/em&gt; just like a ChatGPT agent does when handling your PDFs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tools: The Agent’s Body
&lt;/h2&gt;

&lt;p&gt;If the LLM is the brain, then Tools are the hands that let the agent actually do things(actions) in the world.&lt;/p&gt;

&lt;p&gt;These tools are external functions or APIs that the agent calls to get stuff done — from reading PDFs to fetching data from the web or querying databases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are tools needed?&lt;/strong&gt;&lt;br&gt;
Because an LLM can only read and write text.&lt;br&gt;
It can’t see images, open your PDFs, or connect to external systems on its own.&lt;/p&gt;

&lt;p&gt;That’s where tools act as translators — bridging the gap between the model and the world.&lt;/p&gt;

&lt;p&gt;Common examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDF Parser&lt;/li&gt;
&lt;li&gt;Web Search&lt;/li&gt;
&lt;li&gt;Calculator&lt;/li&gt;
&lt;li&gt;Image Captioning&lt;/li&gt;
&lt;li&gt;Database Connector&lt;/li&gt;
&lt;li&gt;Calendar&lt;/li&gt;
&lt;li&gt;Weather API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example: Checking Weather Using a Weather API&lt;/strong&gt;&lt;br&gt;
Imagine you ask ChatGPT:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“What’s the weather like in Paris this weekend?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here’s what happens behind the scenes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent realizes it needs real-time weather data&lt;/li&gt;
&lt;li&gt;It decides to use a Weather API tool&lt;/li&gt;
&lt;li&gt;The tool fetches the data&lt;/li&gt;
&lt;li&gt;The agent passes it to the LLM&lt;/li&gt;
&lt;li&gt;The LLM summarizes it in natural language&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Behind the Scenes (Code Example):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Tool: Weather API
&lt;/span&gt;    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;call_weather_api&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;forecast&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;agent_query_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Thought: Understand the user request
&lt;/span&gt;    &lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract_location&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Action: Use tool
&lt;/span&gt;    &lt;span class="n"&gt;forecast&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Observation: Summarize and respond
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The weather in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; will be &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;forecast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;agent_query_weather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s the weather in Paris this weekend?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“It’ll be sunny in Paris this weekend, around 23°C with light winds — perfect for outdoor plans!”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key: The &lt;em&gt;agent orchestrates&lt;/em&gt; the tools — the LLM doesn’t do everything alone.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  System Prompts: Guiding the Agent
&lt;/h2&gt;

&lt;p&gt;Every agent starts with a system prompt — it instructs the model on how it should behave.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: System prompt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“You are a friendly and helpful assistant. Provide concise and accurate responses.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;System prompts define tone, style, and behavior, so the AI feels more human-like.&lt;/p&gt;

&lt;p&gt;They can also specify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent behaviour&lt;/strong&gt; - how it behaves&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Available Tools&lt;/strong&gt; - what it can use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision-making rules&lt;/strong&gt; - what constraints it follows while answering&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Actual Workflow:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  TAO Cycle — Thought → Action → Observation
&lt;/h2&gt;

&lt;p&gt;Here’s a quick visual of how an Agent thinks and acts in loops:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frj2t6t032ilje31557ao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frj2t6t032ilje31557ao.png" alt="![Agentic AI flowchart — showing how an LLM interacts with tools, reasoning, and memory](https://your-image-link.com/flowchart.png)&amp;lt;br&amp;gt;
" width="659" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Thought&lt;/strong&gt;&lt;br&gt;
The agent plans its next move — analyzing context, goals, and priorities&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Techniques:&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Chain-of-Thought (CoT):&lt;/strong&gt; step-by-step reasoning&lt;br&gt;
&lt;strong&gt;ReAct:&lt;/strong&gt; reasoning + action combined&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Action&lt;/strong&gt;&lt;br&gt;
The agent executes tasks: calls tools, fetches data, interacts with the environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Observation&lt;/strong&gt;&lt;br&gt;
The agent reflects on what happened, learns from it, and decides the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo40qzc27y76ep47tbav3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo40qzc27y76ep47tbav3.png" alt="How Agentic AI works" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Planning a Trip to Paris&lt;/strong&gt;&lt;br&gt;
You ask:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Plan a 3-day trip to Paris based on my interests.”&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Thought: Figure out which attractions match your preferences
Action: Call tools like weather APIs, mapping tools, hotel searches
Observation: Check availability, update itinerary, suggest adjustments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent repeats this loop until you get a complete, optimized plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP: Smooth Tool Integration&lt;/strong&gt;&lt;br&gt;
MCP (Model Context Protocol) makes tool usage safe, efficient, and structured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides a predictable way to access tools&lt;/li&gt;
&lt;li&gt;Prevents misuse or chaotic tool calls&lt;/li&gt;
&lt;li&gt;Enables complex workflows like summarization, data extraction, and API orchestration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as the protocol that makes multiple tools work together seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Agentic AI Matters?
&lt;/h2&gt;

&lt;p&gt;Agentic AI turns passive models into proactive collaborators.&lt;/p&gt;

&lt;p&gt;Agents can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scan emails, extract info, and generate reports&lt;/li&gt;
&lt;li&gt;Coordinate multiple tools to achieve multi-step goals&lt;/li&gt;
&lt;li&gt;Think, plan, act, and learn continuously&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example: Generating a Company Report&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose you ask ChatGPT to create a report from multiple PDFs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent reads each file via the tools&lt;/li&gt;
&lt;li&gt;Summarizes each section&lt;/li&gt;
&lt;li&gt;Integrates insights&lt;/li&gt;
&lt;li&gt;Delivers a coherent report&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this happens without you telling it step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Research Takeaway&lt;/strong&gt;&lt;br&gt;
During my exploration of how Agentic AI works behind ChatGPT, I found that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every file upload triggers an agent workflow, not just a text parser.&lt;/li&gt;
&lt;li&gt;Tool orchestration (PDF reader, summarizer, retriever) is what actually powers “understanding.”&lt;/li&gt;
&lt;li&gt;ReAct and Chain-of-Thought reasoning make the process human-like.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not just reading — it’s &lt;strong&gt;thinking + acting&lt;/strong&gt; intelligently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bottom Line&lt;/strong&gt;&lt;br&gt;
Uploading a PDF into ChatGPT might look simple.&lt;br&gt;
But behind the scenes, an agent is _reasoning, planning, calling tools, observing results, and iterating _intelligently.&lt;/p&gt;

&lt;p&gt;This is Agentic AI — intelligence that doesn’t just respond, it &lt;strong&gt;acts&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We’re stepping into an era where AI won’t just assist — it will &lt;em&gt;collaborate.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Your Turn!&lt;/strong&gt;&lt;br&gt;
Have you tried building your own AI agent or integrating tools into ChatGPT?&lt;br&gt;
What’s the most exciting use case you’ve seen?&lt;/p&gt;

&lt;p&gt;Drop your thoughts in the comments — I’d love to hear them!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agenticai</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
