<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omar Azim on Medium]]></title>
        <description><![CDATA[Stories by Omar Azim on Medium]]></description>
        <link>https://medium.com/@omarazim754?source=rss-827936c89b0a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_dfXaRk6QgYAchSQ</url>
            <title>Stories by Omar Azim on Medium</title>
            <link>https://medium.com/@omarazim754?source=rss-827936c89b0a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 02:03:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omarazim754/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Built a Simple Tool-Calling AI Agent]]></title>
            <link>https://medium.com/@omarazim754/how-i-built-a-simple-tool-calling-ai-agent-c8bc49148da5?source=rss-827936c89b0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8bc49148da5</guid>
            <dc:creator><![CDATA[Omar Azim]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 09:22:58 GMT</pubDate>
            <atom:updated>2026-10-24T09:22:58.911Z</atom:updated>
            <content:encoded><![CDATA[<img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8bc49148da5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Makes an AI System “Agentic?”]]></title>
            <link>https://medium.com/@omarazim754/what-makes-an-ai-system-agentic-740408bbd423?source=rss-827936c89b0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/740408bbd423</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Omar Azim]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 19:45:46 GMT</pubDate>
            <atom:updated>2026-10-28T17:54:41.727Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine you ask an AI to plan you a little cozy trip over the weekend. A normal chatbot might suggest destinations, hotels, and fun things you can do, but of course, it still depends on you to provide more instructions and information to get the “perfect trip.”</p><p>Now imagine an AI that starts making decisions for you. It decides what information it needs, searches for the best flights, tourist attractions, and the most exquisite restaurants out there.</p><p>But then something goes wrong.</p><p>Maybe it misunderstands your travel dates and starts looking at flights for the wrong weekend. Then it uses those same dates to suggest hotels and tourist attractions. One small mistake has suddenly spread into multiple parts of the plan without you guiding every step.</p><p>Then you start to wonder: the same technology that once simply answered questions is now beginning to take <strong>action</strong> toward larger goals.</p><p>These systems are often described as <strong>‘agentic,’</strong> but the term is used so often that its meaning can become unclear. Is an AI an <em>agent</em> just because it can use tools? Does it need to think and plan independently? How much autonomy does it really need?</p><p>This article explores where that line actually lies.</p><h3>Defining Agentic AI</h3><p>So, what does <em>agentic</em> really mean?</p><p>In basic terms, an agentic AI system is designed to work toward a certain goal or task rather than only responding to a single prompt. It can take in information, reason about what should happen next, make decisions, and use tools to take action.</p><p>These tools can include:</p><ul><li>Web search</li><li>APIs</li><li>Databases</li><li>Files</li><li>Code execution</li><li>Other external tools</li></ul><p>For example, instead of simply asking an AI, “What’s the cheapest flight I can buy?”, an agent could decide that it needs to search multiple websites, compare results, and continue based on the information it gathers.</p><p>The important part is autonomy.</p><p>An agent doesn’t <em>need</em> to be completely independent, but it has more control over how it reaches a goal. Some agents do a lot of careful planning, while others react more directly to new information.</p><p>This shows that “agentic” isn’t really about one single feature. It’s more about how much the system can decide and act for itself while working toward an objective.</p><h3>Chatbot vs AI Agent</h3><p>The easiest way to understand agentic AI is to compare it with something we already use all the time: chatbots.</p><p>Traditional chatbots usually wait for the user to ask a question, give a response, and then wait for the next instruction. The user still decides what happens next.</p><p>An AI agent works differently.</p><p>Instead of responding one step at a time, it can be given a larger goal, such as editing a codebase or conducting in-depth research, and decide what steps or actions might help it reach that goal.</p><p>Going back to the trip example, a chatbot might recommend a few restaurants when asked. An agent, on the other hand, could decide to compare prices, check dates, look for better options, and continue based on what it finds.</p><p>But the line between the two isn’t always obvious.</p><p>Modern chatbots like Claude or ChatGPT can browse the web, use tools, and access external information, so simply having those capabilities does not automatically make a system <em>agentic</em>.</p><p>What matters more is how much freedom the system has to decide when and how to use those tools, what steps to take next, and how independently it can work toward a goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsZ6cdyOw2wWRBVX2kOnOw.png" /><figcaption><strong>Figure 1.</strong> A chatbot waits for user instructions at each step, while an AI agent can choose actions and use tools independently to work toward a larger goal.</figcaption></figure><h3>How an AI Agent Actually Works</h3><p>Imagine I ask an AI agent to plan me a trip to Paris under $2,000. It cannot reliably do that from its training data alone because things like flight prices constantly change, so it would need to access current information using external tools. An example of a tool could be a search engine, which gives the agent the ability to search for information on the web and use it to create a useful plan.</p><p>Before an agent can take action, it needs to know what tools are available in order to carry out the user’s command, along with descriptions of what each tool does. It can then decide which tool is the most helpful for the task and proceed with it. For example, in our Paris trip, the agent might choose a flight-search tool to look for affordable flights before it can create and manage the rest of the budget. The model doesn’t actually search for the flights itself; it only decides which tool should be called, while the application runs it.</p><p>A similar idea appears in the <a href="https://arxiv.org/abs/2210.03629?/">ReAct research paper</a>, which combines reasoning with actions so that a model can interact with an environment, observe what happens, and then use that information when deciding its next move. The researchers reported that ReAct improved absolute success rates by 34 percentage points on ALFWorld and 10 percentage points on WebShop compared with the imitation and reinforcement-learning methods evaluated in the paper. This gives evidence that combining reasoning with interaction can improve an agent’s ability to complete multi-step tasks.</p><p>Once the model chooses a tool, it can generate a <a href="https://developers.openai.com/api/docs/guides/function-calling">structured tool call</a> containing the information needed to run it. For example, it might request a flight search with Paris as the destination, a departure date, and a maximum budget. The application then takes that request and actually runs the flight-search tool, which may access an API, search service, or database. When the tool returns information such as prices, airlines, and departure times, those results are sent back to the model. The model can then use the new information to decide what the most logical next move is, such as searching for a hotel, looking for cheaper flights, or adjusting the budget.</p><p>{<br> “type”: “function”,<br> “name”: “search_flights”,<br> “description”: “Search for available flights within a user’s budget.”,<br> “parameters”: {<br> “type”: “object”,<br> “properties”: {<br> “destination”: {<br> “type”: “string”<br> },<br> “departure_date”: {<br> “type”: “string”<br> },<br> “max_budget”: {<br> “type”: “number”<br> }<br> },<br> “required”: [<br> “destination”,<br> “departure_date”,<br> “max_budget”<br> ],<br> “additionalProperties”: false<br> },<br> “strict”: true<br>}</p><p>This is different from the tool call itself. Before the model can request search_flights, the application defines a schema describing the tool, the type of data each parameter accepts, and which fields are required. With strict schema enforcement, arguments that do not match this structure can be rejected instead of being passed directly to the tool.</p><p>{<br> “name”: “search_flights”,<br> “arguments”: {<br> “destination”: “Paris”,<br> “departure_date”: “2026–11–06”,<br> “max_budget”: 2000<br> }<br>}</p><p>This does not contain the flight results themselves. Instead, it tells the application which tool to run so that the application can execute the search and return the results to the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNH7xL0X4oIo4XZ88lGI8Q.png" /><figcaption><strong>Figure 2.</strong> A simplified tool-calling loop showing how an agent chooses tools, receives results, and continues until the goal is complete.</figcaption></figure><p>After receiving the tool result, the model can compare the new information with the original goal and its current plan. If the task isn’t complete, it can figure out what is still missing and choose the next sensible action. For example, after finding a flight to Paris, it may realize that it still needs to check hotel prices, calculate the remaining budget, or compare different options. It can then call another tool, receive its result, and make further decisions until a complete trip plan is created. This process may happen multiple times, with the agent repeatedly choosing actions, using tools, checking results, and adjusting its plan.</p><p>Goal → Plan a trip to Paris under $2,000</p><p>Action → search_flights(…)<br>Observation → Flight options are returned</p><p>Action → search_hotels(…)<br>Observation → Hotel options are returned</p><p>Action → calculate_budget(…)<br>Observation → The total stays under $2,000</p><p>Final → Create the complete trip plan</p><p>The loop ends when the model decides it has enough information to complete the user’s goal, or when something such as a usage limit, an error, or a human approval step stops the process.</p><p>After the agent has gone through several steps, it needs a way to keep track of whatever happened in the chat and its <em>context. </em>The information it is currently using is kept inside the model’s context window and can be used for decision making and planning. This can include such things as vital information about the user, important dates, etc. Using our trip example, the model may have to remember user instructions, flight prices and hotel results.</p><p>However, this space is limited, so if too much information builds up, some information may need to be summarized or removed, which can cause a lot of issues. Using our trip example, the agent might suddenly forget which hotel it selected, what the budget was, or even what task it was working on. Some agent systems also use external memory such as databases or external memory stores. This helps the agent to actually remember things and do more tasks efficiently, keep track of long tasks and make better decisions later.</p><p>Context windows are measured in tokens rather than messages. Their size depends on the model; for example, GPT-6.1 Sol supports a context window of about 1.05 million tokens. A large window still does not mean an agent should keep everything it has ever seen. Long tool outputs, documents, and conversation history can fill the context with irrelevant information and increase cost. Agent systems can deal with this by trimming older information, compressing it into summaries, or storing information externally and retrieving only the relevant pieces when they are needed. In retrieval-based memory, the stored information is searched first and the most relevant results are inserted back into the model’s context before its next decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DLw5eR1FSn-RwVpAZh7goQ.png" /><figcaption><strong>Figure 3.</strong> The context window holds the information an agent is actively using, while external memory stores information that can be retrieved later for longer tasks.</figcaption></figure><h3>Measuring Autonomy in an AI Agent</h3><p>If agentic AI exists on a spectrum, then there needs to be a practical way to measure where a system sits on it. I think four questions are especially useful: <strong>Who chooses the next action? Who chooses which tool to use? How many steps can the system take without human approval? Who decides when the task is complete?</strong></p><p>At the low end, a normal tool-using assistant may be able to search the web or call a function, but the user still directs most of the process. A system becomes more agentic when the model starts choosing its own tools, deciding what information is missing, and continuing through several steps without waiting for another prompt.</p><p>Real systems show that autonomy can also be limited intentionally. Claude Code, for example, can inspect a codebase, choose tools, run commands, and continue through a coding task, but by default it asks for permission before many actions that modify files or the system. ChatGPT agent can also perform multi-step actions across websites and connected services, while requiring confirmation for higher-impact actions. In the OpenAI Agents SDK, the runtime can repeatedly execute tool calls and handoffs until the model reaches a final answer, while the developer still controls which tools exist, where state is stored, and which actions require approval.</p><p>This is why I would not measure autonomy with a single yes-or-no label. I would measure it through <strong>control-flow ownership, tool choice, step limits, stopping decisions, and approval boundaries</strong>. Two systems may use the same model and tools but still have very different levels of agency depending on who controls those decisions.</p><h3>Where Agentic AI Is Today</h3><p>Agentic AI is already being heavily tested on software engineering and coding tasks. One example is <a href="https://www.swebench.com/verified">SWE-bench Verified</a>, a benchmark designed to evaluate AI systems on real GitHub software issues. It contains 500 human-validated software-engineering tasks. When SWE-bench Verified was introduced, GPT-4o achieved <a href="https://openai.com/index/introducing-swe-bench-verified/">33.2%</a> on the benchmark using the best-performing open-source scaffold tested by OpenAI. Later, Anthropic reported that an upgraded Claude 3.5 Sonnet reached <a href="https://www.anthropic.com/research/swe-bench-sonnet">49%</a> on the same benchmark, showing how quickly coding-agent performance was improving. By 2026, OpenAI reported that frontier scores had risen from <a href="https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/">74.9% to 80.9%</a> in just six months. However, OpenAI also warned that SWE-bench Verified had become increasingly contaminated by training-data exposure and recommended moving to newer benchmarks instead. This shows both how quickly agentic coding systems are improving and how difficult it is to measure that progress reliably. Instead of only checking whether a model can answer a question, it measures whether a system can inspect a codebase and actually solve a real task. This gives us a much clearer idea of how capable current agents are at multi-step, real-world work.</p><p>Companies building modern AI systems are also creating infrastructure specifically for AI agents and tool-using systems. For example, OpenAI provides tools that allow models to interact with external systems, services, files, APIs, and the web, while continuing across multiple steps toward a user’s goal. However, developers still need to control things like permissions, tool execution, approval steps, and safety boundaries.</p><p>But current agents are still far from perfect. Giving a model more tools and autonomy also gives it more opportunities to fail, such as choosing the wrong tool, using bad arguments, or allowing one mistake to affect later decisions. As tasks become longer, these errors can compound and influence later actions. This is why agentic systems may still need evaluation, limitations, restrictions, and approval steps, especially when their actions can affect important things such as money, data, accounts, or code.</p><h3>Why More Autonomy Is Not Always Better</h3><p>If agentic systems can do so much <strong>more</strong> than a normal chatbot, it raises an obvious question:</p><p>Why shouldn’t <em>every</em> AI system be agentic?</p><p>More autonomy can be extremely useful, but it also gives the system more opportunities to make mistakes.</p><p>An agent might misunderstand the user’s instructions, choose the wrong tool, or make a bad decision early on in the task.</p><p>Those mistakes can also stack on top of each other. For a simple hypothetical example, imagine an agent has a 90% chance of making the correct decision at each step. Across five dependent steps, the chance that every step is correct would be about 59% (0.9 × 0.9 × 0.9 × 0.9 × 0.9). This does not mean real agents always have a 90% success rate, but it shows why even relatively small error rates can become much more important as tasks get longer.</p><p>The reliability problem also appears in real benchmarks. In <a href="https://arxiv.org/abs/2406.12045?/">τ-bench</a>, researchers tested language-model agents in realistic tasks where they had to talk with users, follow policies, and use API tools. Even state-of-the-art function-calling agents such as GPT-4o succeeded on fewer than half of the tasks tested, and in the retail domain the probability of succeeding consistently across eight repeated trials fell below 25%. This matters because an agent that succeeds once is not necessarily reliable enough to be trusted repeatedly in a real system.</p><p>Another problem appears when agents read information from the outside world. A website, document, email, or tool result could contain a prompt injection: instructions designed to make the agent ignore its original task or take an unintended action. This becomes more dangerous when the agent can access sensitive tools. Developers can reduce the risk by restricting which tools an agent can use, validating structured data passed between tools, sandboxing execution, and requiring human approval before sensitive actions. These defenses reduce the risk, but they do not completely remove it.</p><p>Going back to our trip example, imagine the agent misunderstands your travel dates and searches for the wrong flight. It could then use that same incorrect information to find hotels, plan tourist attractions, and organize the rest of the trip.</p><p>One small mistake near the beginning can affect several decisions afterward, potentially wasting a lot of time and money.</p><p>Agentic systems can require more computation and more tool calls, which can increase <a href="https://openai.com/index/gpt-5-6-frontier-intelligence-efficiency/">latency and cost.</a> They can also be <a href="https://www.anthropic.com/research/building-effective-agents?/">less predictable than fixed workflows</a> because the model dynamically decides what actions to take.</p><p>If a task already has a clear and predictable set of steps, a <a href="https://www.anthropic.com/engineering/building-effective-agents">fixed workflow</a> could actually be more reliable. In those cases, giving an AI more freedom may just add unnecessary complexity.</p><p>More autonomy is powerful, but that doesn’t always mean it is necessary.</p><h3>W<strong>here the Line Between Assistant and Agent Lies</strong></h3><p>After researching this, I don’t think there is <strong>one</strong> feature that suddenly turns an AI system into an agent.</p><p>A chatbot can use tools, remember information, or even create a plan without necessarily deciding for itself how to pursue a larger goal. Those abilities can make a system more capable, but they don’t automatically make it <em>agentic</em>.</p><p>For example, if you have to tell the AI exactly when to use search, what to search for, and what to do with the results, then the system is still mostly reacting to instructions. More agentic behavior starts when the system can recognize that information is missing and decide for itself:</p><p><em>“I need more information. I should search for it.”</em></p><p>The biggest difference to me is <strong>autonomy</strong>. Having tools, memory, or a plan can help, but what matters more is whether the system can work toward a specific goal, decide what step to take next, take action, observe the result, and adjust without the user controlling every single step.</p><p>Because of that, I think agentic AI makes more sense as a <strong>spectrum</strong> than a simple yes-or-no label. A system does not suddenly cross one exact line and become an agent. Instead, the more control it has over deciding how to reach its goal, the more <em>agentic</em> it becomes.</p><p>The benchmark results also make me think autonomy should not be measured separately from reliability. τ-bench shows that an agent can successfully complete a task once while still failing to do it consistently across repeated attempts. That means giving a system more control should only make sense when its reliability increases alongside its autonomy.</p><p>One way to judge where a system sits on this spectrum is by looking at how much control and autonomy it has. How far can an AI agent proceed with a task without human supervision or approval? For example, imagine an AI system being used for day trading. One system might suggest trades but wait for a human to approve each one, which could become painfully slow if multiple trades are taking place. Another system might analyze the market, choose trades based on its analysis, execute them, and react to the results itself.</p><p>The second system would be more <em>agentic</em> because it handles most of the process independently without constant human supervision or approval. However, being more autonomous does <strong>not</strong> necessarily mean it will make safe or accurate trades. It could still take actions it was never supposed to take. For example, if you told the agent to only trade crypto, left it running, and later found out that it had started trading stocks instead, it would still be highly autonomous — but it would also be doing the wrong thing.</p><p>The point is that the level of agentic behavior depends on <strong>how much control the system has over the path toward the goal</strong>, rather than simply whether it successfully completes the task.</p><p>That’s why I don’t think the question is simply whether an AI <em>is</em> or <em>isn’t</em> an agent. It’s more about <strong>how much control it has over the process</strong>.</p><p>Two systems could have access to the exact same tools, memory, and information but still behave very differently. One might wait for the user to guide every step, while the other could choose its next action, react to the result, and continue with much less guidance. Even though their capabilities might look similar on paper, their level of autonomy is completely different.</p><p>The more autonomy we give a system, the more independently it can operate — but that also means we need to be more careful about what decisions we allow it to make on its own.</p><p>A counterargument is that autonomy alone may not be enough to define an agent. A system could make many decisions independently but still follow a very restricted workflow, while another system might need human approval yet perform much more complex reasoning. I still think autonomy is the most useful way to judge how agentic a system is, but I would change my mind if researchers developed a better measure that consistently explained the difference between agents and normal AI systems.</p><p>I also think future AI systems will become more autonomous, but human approval will remain important for high-risk actions involving things like money, private data, accounts, or irreversible changes. The challenge will not simply be making agents more independent, but deciding where that independence should stop.</p><h3>Conclusion</h3><p>Looking back at our trip example, the difference isn’t simply that an agent can search the web, execute code, or use more tools. What makes agentic AI interesting is that the system can decide what to do next, act on that decision, observe what happens, and adjust its approach as it goes.</p><p>That can make AI much more useful for larger and more complicated tasks, but giving a system more freedom also gives it <strong>more opportunities to make decisions we might not expect</strong>.</p><p>So maybe the real question isn’t <strong>how agentic AI can become</strong>.</p><p>It’s this:</p><p><strong>How much control can we give AI before we’re no longer the ones in control?</strong></p><h3>Sources</h3><p><strong>OpenAI — Function Calling</strong><br><a href="https://developers.openai.com/api/docs/guides/function-calling">https://developers.openai.com/api/docs/guides/function-calling</a></p><p><strong>Yao et al. — ReAct: Synergizing Reasoning and Acting in Language Models</strong><br><a href="https://arxiv.org/abs/2210.03629">https://arxiv.org/abs/2210.03629</a></p><p><strong>SWE-bench — SWE-bench Verified</strong><br><a href="https://www.swebench.com/verified">https://www.swebench.com/verified</a></p><p><strong>OpenAI — Introducing SWE-bench Verified</strong><br><a href="https://openai.com/index/introducing-swe-bench-verified/">https://openai.com/index/introducing-swe-bench-verified/</a></p><p><strong>Anthropic — Raising the Bar on SWE-bench Verified with Claude 3.5 Sonnet</strong><br><a href="https://www.anthropic.com/research/swe-bench-sonnet">https://www.anthropic.com/research/swe-bench-sonnet</a></p><p><strong>OpenAI — Why We No Longer Evaluate SWE-bench Verified</strong><br><a href="https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/">https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/</a></p><p><strong>Sierra — τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains</strong><br><a href="https://arxiv.org/abs/2406.12045">https://arxiv.org/abs/2406.12045</a></p><p><strong>Anthropic — Building Effective Agents</strong><br><a href="https://www.anthropic.com/engineering/building-effective-agents">https://www.anthropic.com/engineering/building-effective-agents</a></p><p><strong>OpenAI — Observability and Usage for Agents</strong><br><a href="https://developers.openai.com/api/docs/guides/agents-api/observability">https://developers.openai.com/api/docs/guides/agents-api/observability</a></p><p><strong>OpenAI — Safety in Building Agents</strong><br><a href="https://developers.openai.com/api/docs/guides/agent-builder-safety">https://developers.openai.com/api/docs/guides/agent-builder-safety</a></p><h3>About the Author</h3><p>Omar Azim is a student developer exploring artificial intelligence, AI agents, and intelligent systems. He’s especially interested in how models use tools, memory, reasoning, and autonomy to complete real-world tasks. He builds and writes about AI systems to better understand how they work in practice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=740408bbd423" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>