Home Knowledge Base is a system built around a large language model that does not just answer a question but pursues a goal by taking actions in a loop. Where a plain chatbot maps one prompt to one reply, an agent runs a cycle: it reasons about what to do next, calls a tool to actually do it, observes the result, and repeats — continuing until the task is finished. This loop, plus the tools the model can reach, is what turns a fluent text predictor into something that can search the web, run code, query a database, or operate other software on your behalf. Agents are the fastest-moving frontier in applied AI, and the reason "chat" is giving way to "do it for me."\n\n```svg\n\n \n AI Agents — an LLM That Acts in a Loop\n not just answering — the model reasons, calls a tool, reads the result, and repeats until the goal is met\n \n GOAL\n what to achieve\n \n LLM — reason & plan\n decide the next step\n \n ACTION\n emit a tool call\n \n TOOLS\n search · code · database · APIs\n \n \n \n \n \n \n \n \n \n observation — feed the tool result back in, then loop\n \n FINAL ANSWER\n when the goal is met\n \n \n done?\n \n Function calling — a structured call\n The model does not run tools; it emits JSON that a\n harness executes, then returns the result as text.\n \n {\n "tool": "web_search",\n "args": { "query": "Q3 GPU revenue" }\n }\n \n What turns a chatbot into an agent\n \n Tools\n reach past text — act on the world\n \n Memory\n short-term scratchpad + long-term store\n \n Planning\n decompose, reflect, retry on failure\n \n Autonomy\n 1 call → workflow → self-directed loop\n\n```\n\n
<svg viewBox="0 0 760 470" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">
  <rect x="0" y="0" width="760" height="470" fill="#0d1117"/>
  <text x="380" y="28" fill="#e6edf3" font-size="21" font-weight="700" text-anchor="middle">AI Agents — Observe, Reason, Act, Repeat</text>
  <text x="380" y="48" fill="#8b98a5" font-size="12" text-anchor="middle">an LLM in a loop: perceive environment, decide next action, execute tools, observe result, iterate until done</text>

  <!-- === TOP: Agent loop === -->
  <rect x="25" y="62" width="710" height="150" rx="6" fill="#080d14" stroke="#233043" stroke-width="1.2"/>
  <text x="380" y="82" fill="#e6edf3" font-size="11" text-anchor="middle" font-weight="600">The ReAct Loop (Reasoning + Acting)</text>

  <!-- Central LLM brain -->
  <rect x="290" y="95" width="130" height="50" rx="8" fill="#1a1520" stroke="#a78bfa" stroke-width="1.3"/>
  <text x="355" y="117" fill="#c4b5fd" font-size="10" text-anchor="middle" font-weight="600">LLM (Brain)</text>
  <text x="355" y="132" fill="#6b7684" font-size="8" text-anchor="middle">reason → choose action</text>

  <!-- Loop arrows around the LLM -->
  <!-- Left: Observation in -->
  <rect x="55" y="102" width="85" height="35" rx="4" fill="#14261f" stroke="#34d399" stroke-width="0.9"/>
  <text x="97" y="120" fill="#6ee7b7" font-size="8.5" text-anchor="middle">Observation</text>
  <text x="97" y="132" fill="#6b7684" font-size="7" text-anchor="middle">tool result / env</text>
  <path d="M143,119 L286,115" fill="none" stroke="#34d399" stroke-width="0.8"/>
  <polygon points="284,112 290,115 284,118" fill="#34d399"/>

  <!-- Right: Action out -->
  <path d="M423,120 L530,120" fill="none" stroke="#60a5fa" stroke-width="0.8"/>
  <polygon points="528,117 534,120 528,123" fill="#60a5fa"/>
  <rect x="537" y="102" width="85" height="35" rx="4" fill="#0f1a2a" stroke="#60a5fa" stroke-width="0.9"/>
  <text x="579" y="120" fill="#93c5fd" font-size="8.5" text-anchor="middle">Action</text>
  <text x="579" y="132" fill="#6b7684" font-size="7" text-anchor="middle">tool call / respond</text>

  <!-- Tools below -->
  <path d="M579,140 L579,155" fill="none" stroke="#60a5fa" stroke-width="0.7"/>
  <polygon points="576,153 579,159 582,153" fill="#60a5fa"/>

  <rect x="460" y="160" width="55" height="24" rx="3" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.7"/>
  <text x="487" y="175" fill="#fbbf24" font-size="7.5" text-anchor="middle">Search</text>
  <rect x="520" y="160" width="55" height="24" rx="3" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.7"/>
  <text x="547" y="175" fill="#fbbf24" font-size="7.5" text-anchor="middle">Code</text>
  <rect x="580" y="160" width="55" height="24" rx="3" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.7"/>
  <text x="607" y="175" fill="#fbbf24" font-size="7.5" text-anchor="middle">API</text>
  <rect x="640" y="160" width="55" height="24" rx="3" fill="#2a1a0a" stroke="#f59e0b" stroke-width="0.7"/>
  <text x="667" y="175" fill="#fbbf24" font-size="7.5" text-anchor="middle">DB</text>

  <!-- Feedback loop back to observation -->
  <path d="M580,186 C580,200 97,200 97,140" fill="none" stroke="#34d399" stroke-width="0.7" stroke-dasharray="3,2"/>
  <text x="340" y="200" fill="#34d399" font-size="8" text-anchor="middle">tool result feeds back as next observation</text>

  <!-- Stop condition -->
  <rect x="55" y="155" width="85" height="24" rx="3" fill="#0b1220" stroke="#f87171" stroke-width="0.7"/>
  <text x="97" y="170" fill="#f87171" font-size="8" text-anchor="middle">Stop? (budget/done)</text>

  <!-- === MIDDLE LEFT: Architecture patterns === -->
  <rect x="25" y="220" width="345" height="115" rx="6" fill="#0b1220" stroke="#233043" stroke-width="1"/>
  <text x="197" y="238" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Agent Architectures</text>

  <text x="45" y="258" fill="#60a5fa" font-size="9" font-weight="600">ReAct</text>
  <text x="105" y="258" fill="#8b98a5" font-size="8.5">reason + act interleaved (most common)</text>
  <text x="45" y="276" fill="#34d399" font-size="9" font-weight="600">Plan-then-Execute</text>
  <text x="175" y="276" fill="#8b98a5" font-size="8.5">planner → worker agents</text>
  <text x="45" y="294" fill="#fbbf24" font-size="9" font-weight="600">Reflexion</text>
  <text x="115" y="294" fill="#8b98a5" font-size="8.5">self-critique and retry on failure</text>
  <text x="45" y="312" fill="#c4b5fd" font-size="9" font-weight="600">Multi-Agent</text>
  <text x="130" y="312" fill="#8b98a5" font-size="8.5">roles (coder, reviewer, PM) coordinate</text>
  <text x="45" y="326" fill="#f87171" font-size="9" font-weight="600">Graph/DAG</text>
  <text x="120" y="326" fill="#8b98a5" font-size="8.5">explicit state machine with transitions</text>

  <!-- === MIDDLE RIGHT: Tool calling mechanism === -->
  <rect x="385" y="220" width="350" height="115" rx="6" fill="#0b1220" stroke="#233043" stroke-width="1"/>
  <text x="560" y="238" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Tool Calling (Function Calling)</text>

  <text x="405" y="258" fill="#8b98a5" font-size="8.5">LLM outputs structured JSON tool calls:</text>
  <text x="405" y="276" fill="#60a5fa" font-size="8.5">{"name": "search", "args": {"q": "..."}}</text>
  <text x="405" y="296" fill="#8b98a5" font-size="8.5">Runtime validates, executes, returns result</text>
  <text x="405" y="314" fill="#fbbf24" font-size="8.5">Sandboxed: allowlist, rate limit, timeout</text>
  <text x="405" y="332" fill="#6b7684" font-size="8">MCP (Model Context Protocol) standardizes this</text>

  <!-- === BOTTOM: Frameworks === -->
  <rect x="25" y="345" width="710" height="62" rx="5" fill="#0b1220" stroke="#233043" stroke-width="1"/>
  <text x="380" y="363" fill="#e6edf3" font-size="10" text-anchor="middle" font-weight="600">Agent Frameworks</text>

  <text x="90" y="385" fill="#c4b5fd" font-size="9.5" text-anchor="middle" font-weight="600">LangGraph</text>
  <text x="90" y="399" fill="#8b98a5" font-size="8" text-anchor="middle">state machine graphs</text>

  <text x="220" y="385" fill="#fbbf24" font-size="9.5" text-anchor="middle" font-weight="600">CrewAI</text>
  <text x="220" y="399" fill="#8b98a5" font-size="8" text-anchor="middle">role-based crews</text>

  <text x="350" y="385" fill="#34d399" font-size="9.5" text-anchor="middle" font-weight="600">AutoGen</text>
  <text x="350" y="399" fill="#8b98a5" font-size="8" text-anchor="middle">multi-agent chat</text>

  <text x="480" y="385" fill="#60a5fa" font-size="9.5" text-anchor="middle" font-weight="600">OpenAI Assistants</text>
  <text x="480" y="399" fill="#8b98a5" font-size="8" text-anchor="middle">hosted state + tools</text>

  <text x="630" y="385" fill="#f87171" font-size="9.5" text-anchor="middle" font-weight="600">Claude Code</text>
  <text x="630" y="399" fill="#8b98a5" font-size="8" text-anchor="middle">terminal + file agent</text>

  <!-- Key insight -->
  <rect x="25" y="415" width="710" height="22" rx="3" fill="#0b1220" stroke="#233043" stroke-width="0.8"/>
  <text x="380" y="430" fill="#fbbf24" font-size="9" text-anchor="middle">The hard problems: knowing when to stop, recovering from errors, not hallucinating tool args, staying within budget.</text>

  <text x="380" y="460" fill="#6b7684" font-size="11" text-anchor="middle">Agents turn LLMs from Q&amp;A engines into autonomous workers — the gap is reliability, not capability.</text>
</svg>
``` AI agent** is a system built around a large language model that does not just answer a question but pursues a goal by taking actions in a loop. Where a plain chatbot maps one prompt to one reply, an agent runs a cycle: it reasons about what to do next, calls a tool to actually do it, observes the result, and repeats — continuing until the task is finished. This loop, plus the tools the model can reach, is what turns a fluent text predictor into something that can search the web, run code, query a database, or operate other software on your behalf. Agents are the fastest-moving frontier in applied AI, and the reason "chat" is giving way to "do it for me."\n\n```svg\n<svg viewBox="0 0 820 494" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,Segoe UI,Roboto,sans-serif">\n  <rect x="0" y="0" width="820" height="494" fill="#0d1117"/>\n  <text x="410" y="34" fill="#e6edf3" font-size="22" font-weight="700" text-anchor="middle">AI Agents — an LLM That Acts in a Loop</text>\n  <text x="410" y="58" fill="#8b98a5" font-size="13" text-anchor="middle">not just answering — the model reasons, calls a tool, reads the result, and repeats until the goal is met</text>\n  <rect x="40" y="98" width="110" height="60" rx="8" fill="#0f1c17" stroke="#34d399" stroke-width="1.6"/>\n  <text x="95" y="125" fill="#6ee7b7" font-size="13" font-weight="700" text-anchor="middle">GOAL</text>\n  <text x="95" y="143" fill="#8b98a5" font-size="12" text-anchor="middle">what to achieve</text>\n  <rect x="190" y="98" width="170" height="60" rx="8" fill="#2a1420" stroke="#fbbf24" stroke-width="1.6"/>\n  <text x="275" y="124" fill="#fcd34d" font-size="13" font-weight="700" text-anchor="middle">LLM — reason &amp; plan</text>\n  <text x="275" y="142" fill="#8b98a5" font-size="12" text-anchor="middle">decide the next step</text>\n  <rect x="400" y="98" width="150" height="60" rx="8" fill="#101826" stroke="#38bdf8" stroke-width="1.6"/>\n  <text x="475" y="124" fill="#7dd3fc" font-size="13" font-weight="700" text-anchor="middle">ACTION</text>\n  <text x="475" y="142" fill="#8b98a5" font-size="12" text-anchor="middle">emit a tool call</text>\n  <rect x="590" y="98" width="190" height="60" rx="8" fill="#1a1226" stroke="#c084fc" stroke-width="1.6"/>\n  <text x="685" y="122" fill="#d8b4fe" font-size="13" font-weight="700" text-anchor="middle">TOOLS</text>\n  <text x="685" y="139" fill="#8b98a5" font-size="12" text-anchor="middle">search · code · database · APIs</text>\n  <line x1="150" y1="128.0" x2="190" y2="128.0" stroke="#3f5169" stroke-width="2.0"/>\n  <path d="M182 132 L190 128 L182 124" stroke="#3f5169" stroke-width="2.0" fill="none"/>\n  <line x1="360" y1="128.0" x2="400" y2="128.0" stroke="#3f5169" stroke-width="2.0"/>\n  <path d="M392 132 L400 128 L392 124" stroke="#3f5169" stroke-width="2.0" fill="none"/>\n  <line x1="550" y1="128.0" x2="590" y2="128.0" stroke="#3f5169" stroke-width="2.0"/>\n  <path d="M582 132 L590 128 L582 124" stroke="#3f5169" stroke-width="2.0" fill="none"/>\n  <path d="M685 158 L685 214 L275 214" stroke="#6ee7b7" stroke-width="1.7" fill="none"/>\n  <line x1="295" y1="214" x2="275" y2="158" stroke="#6ee7b7" stroke-width="1.7"/>\n  <path d="M281 165 L275 158 L274 167" stroke="#6ee7b7" stroke-width="1.7" fill="none"/>\n  <text x="500" y="207" fill="#6ee7b7" font-size="12" text-anchor="middle">observation — feed the tool result back in, then loop</text>\n  <rect x="70" y="238" width="150" height="46" rx="8" fill="#0f1c17" stroke="#34d399" stroke-width="1.6"/>\n  <text x="145" y="258" fill="#6ee7b7" font-size="12.5" font-weight="700" text-anchor="middle">FINAL ANSWER</text>\n  <text x="145" y="275" fill="#8b98a5" font-size="12" text-anchor="middle">when the goal is met</text>\n  <line x1="232" y1="158" x2="150" y2="238" stroke="#fbbf24" stroke-width="1.7"/>\n  <path d="M153 230 L150 238 L158 235" stroke="#fbbf24" stroke-width="1.7" fill="none"/>\n  <text x="150" y="180" fill="#fcd34d" font-size="12" text-anchor="middle">done?</text>\n  <rect x="40" y="306" width="372" height="168" rx="8" fill="#0b1220" stroke="#233043" stroke-width="1.2"/>\n  <text x="58" y="332" fill="#cbd5e1" font-size="13" font-weight="700">Function calling — a structured call</text>\n  <text x="58" y="351" fill="#8b98a5" font-size="12">The model does not run tools; it emits JSON that a</text>\n  <text x="58" y="365" fill="#8b98a5" font-size="12">harness executes, then returns the result as text.</text>\n  <rect x="58" y="376" width="336" height="82" rx="6" fill="#0d1117" stroke="#233043" stroke-width="1"/>\n  <text x="72" y="396" fill="#9fb4c6" font-size="13" font-family="ui-monospace,monospace">{</text>\n  <text x="72" y="414" fill="#7dd3fc" font-size="13" font-family="ui-monospace,monospace">  "tool": "web_search",</text>\n  <text x="72" y="432" fill="#7dd3fc" font-size="13" font-family="ui-monospace,monospace">  "args": { "query": "Q3 GPU revenue" }</text>\n  <text x="72" y="450" fill="#9fb4c6" font-size="13" font-family="ui-monospace,monospace">}</text>\n  <rect x="432" y="306" width="348" height="168" rx="8" fill="#0b1220" stroke="#233043" stroke-width="1.2"/>\n  <text x="450" y="332" fill="#cbd5e1" font-size="13" font-weight="700">What turns a chatbot into an agent</text>\n  <rect x="450" y="342" width="86" height="22" rx="4" fill="#151b23" stroke="#c084fc" stroke-width="1.1"/>\n  <text x="493" y="357" fill="#c084fc" font-size="12" font-weight="700" text-anchor="middle">Tools</text>\n  <text x="548" y="357" fill="#9fb4c6" font-size="12">reach past text — act on the world</text>\n  <rect x="450" y="371" width="86" height="22" rx="4" fill="#151b23" stroke="#38bdf8" stroke-width="1.1"/>\n  <text x="493" y="386" fill="#38bdf8" font-size="12" font-weight="700" text-anchor="middle">Memory</text>\n  <text x="548" y="386" fill="#9fb4c6" font-size="12">short-term scratchpad + long-term store</text>\n  <rect x="450" y="400" width="86" height="22" rx="4" fill="#151b23" stroke="#fbbf24" stroke-width="1.1"/>\n  <text x="493" y="415" fill="#fbbf24" font-size="12" font-weight="700" text-anchor="middle">Planning</text>\n  <text x="548" y="415" fill="#9fb4c6" font-size="12">decompose, reflect, retry on failure</text>\n  <rect x="450" y="429" width="86" height="22" rx="4" fill="#151b23" stroke="#34d399" stroke-width="1.1"/>\n  <text x="493" y="444" fill="#34d399" font-size="12" font-weight="700" text-anchor="middle">Autonomy</text>\n  <text x="548" y="444" fill="#9fb4c6" font-size="12">1 call → workflow → self-directed loop</text>\n</svg>\n```\n\n**The core mechanism is an observe–reason–act loop.** The agent is given a goal, the model reasons about the next step, it emits an action (a tool call), the environment runs that action and returns a result, and the result is fed back into the model's context for the next turn. This interleaving of reasoning and acting — popularized as ReAct — is what lets the model course-correct: it can react to what a tool actually returned instead of committing to a plan blindly. The loop ends when the model decides the goal is met and emits a final answer.\n\n**Tool use and function calling are how an agent touches the world.** The model itself only generates text, so it "acts" by emitting a structured call — typically JSON naming a tool and its arguments. A surrounding harness executes that call (running a search, a code snippet, an API request), then returns the output as a new observation. Function calling is the model-side mechanism; tool use is the general capability. Standards like the Model Context Protocol (MCP) now aim to make these tool interfaces portable across models and applications.\n\n**Memory and planning separate a toy from a workhorse.** Short-term memory is the context window itself — a scratchpad of the conversation and recent observations — while long-term memory offloads facts to an external store (often a vector database) that the agent retrieves from as needed. Planning adds structure on top of the raw loop: decomposing a big goal into subtasks, reflecting on failures, and retrying. More capable agents plan, criticize their own work, and sometimes delegate subtasks to specialized sub-agents in a multi-agent setup.\n\n**Autonomy is a spectrum, and more is not always better.** At one end is a single tool call inside an otherwise normal chat; in the middle is a fixed multi-step workflow; at the far end is a self-directed agent that decides its own steps until done. Greater autonomy unlocks harder tasks but sacrifices predictability and control, which is why side-effecting actions (sending email, spending money, changing files) are usually gated behind confirmation or guardrails.\n\n**The hard problems are reliability, cost, and safety.** Errors compound over long horizons — a wrong step early can derail everything after it — and every turn is another LLM call, so agents are slower and more expensive than a single response. Tools fail, environments change, and evaluating open-ended agent behavior is genuinely hard. Much of real-world agent engineering is about constraining the loop: good tools, retries, verification steps, human approval for risky actions, and tight scoping of what the agent is allowed to do.\n\n| Piece | Role | Failure mode it guards against |\n|---|---|---|\n| Reason/plan step | choose the next action | aimless or redundant work |\n| Tool call (function calling) | act on the world | hallucinating instead of checking |\n| Observation | feed results back in | acting on stale assumptions |\n| Memory (short + long) | carry context across steps | forgetting earlier findings |\n| Guardrails / approval | gate risky actions | irreversible mistakes |\n\nRead agents through an *action-loop* lens rather than a *smarter-chatbot* lens: the leap is not that the model knows more, but that it is placed inside a loop where it can decide what to do next, do it with a real tool, and react to the outcome. Capability then comes as much from the tools, memory, and control structure around the model as from the model itself — which is why building a good agent is mostly about engineering a reliable loop, not just prompting a smarter one.\n
agenttooluse toolstool calling

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.