Agentic AI & Reasoning
For the first few years of the LLM boom, AI models were treated as passive chatbots: you write a prompt, and the model instantly outputs a response. Today, the frontier has shifted toward Agentic AI. Instead of answering statically, agentic systems act as autonomous software entities that can plan, use external tools, inspect their own output, and run in loops to solve multi-step problems.
Tool Use & Function Calling
LLMs are notoriously bad at precise math (like multiplying two 8-digit numbers) and cannot fetch live data or interact with the physical world because they are just word-prediction engines.
Tool Use (or Function Calling) overcomes this limitation by letting the host application expose specific capabilities. The model is provided with a list of available tools, described in plain text. For example:
Available Tool: calculate_weather(location, date)
- Returns the temperature forecast for a location.
If the user asks: "Should I wear a coat in Chicago tomorrow?", the LLM recognizes it cannot answer from memory. Instead of guessing, it outputs a structured instruction:
{
"call": "calculate_weather",
"arguments": { "location": "Chicago", "date": "tomorrow" }
}
The host application intercepts this JSON, runs the actual weather API, receives the result (e.g., "Chicago: 41°F, Rain"), and appends it to the model's chat history. The LLM reads the result and finishes its response: "Yes, you should wear a coat. Chicago will be 41°F and raining tomorrow."
Reasoning Loops: ReAct and Reflection
To solve complex tasks, agents use structured loops rather than generating answers in a single pass.
1. The ReAct (Reason + Act) Loop
ReAct forces the model to document its thinking before taking actions. The loop proceeds as follows:
- Thought: The model explains its plan (e.g., "I need to find the population of France, then multiply it by 0.12").
- Action: The model calls a search engine or calculator tool.
- Observation: The model reads the tool's output and updates its plan, looping back to Thought until the task is complete.
2. Reflection and Self-Correction
If a model writes a block of code, it may contain a bug. A reflection agent doesn't send the code to the user immediately. Instead, it runs the code in an isolated environment, catches any error logs, feeds those errors back to itself, and rewrites the code to fix the bug. This cyclic feedback loop dramatically boosts task success rates.
What Makes an Agent Safe Enough to Ship
An agent is more than a prompt with tools. The product around it needs boundaries:
- Scoped tools: Each tool should do one clear thing with the least permission needed.
- Typed arguments: The host application validates tool inputs before execution.
- Approval gates: Irreversible actions such as sending emails, charging cards, deleting data, or changing permissions should require confirmation.
- State and memory rules: The system should decide what is saved, what expires, and what the model may read later.
- Trace logs: Operators need to see prompts, tool calls, observations, errors, and final answers when debugging failures.
The model can decide which tool to request, but the application must decide whether that request is allowed. Instructions are not access control.
System 1 vs. System 2 Thinking in AI
Cognitive psychologist Daniel Kahneman famously split human thinking into two modes:
- System 1 (Fast): Fast, intuitive, automatic actions (e.g., answering "2+2=?", reading a familiar road sign).
- System 2 (Slow): Slow, deliberate, logical reasoning (e.g., solving "17 × 24", filling out a tax form).
Standard LLMs operate mostly like System 1. They output the next token immediately without much opportunity to plan, test, or revise. If they start a sentence poorly, they cannot truly rewind the generation path.
Modern System 2 Reasoning Models spend extra inference-time compute before producing a final answer. Current reasoning systems point toward the same design shift: models are being trained and served to plan, use tools, check intermediate work, and keep going across longer workflows. Some expose controllable reasoning effort; others keep the reasoning internal while returning a concise answer.
Sources
- ReAct: Synergizing Reasoning and Acting in Language Models — Yao et al.
- Toolformer: Language Models Can Teach Themselves to Use Tools — Schick et al.
- Reflexion: Language Agents with Verbal Reinforcement Learning — Shinn et al.
- Learning to Reason with LLMs — OpenAI
- DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning — Nature