Agentic AI & Reasoning
For the first few years of the LLM boom, AI models were treated like passive chatbots: write a prompt, get an instant answer. Now the frontier has shifted toward Agentic AI. Instead of one static answer, agentic systems can plan, use tools, inspect their output, and loop through multi-step work.
Tool use and function calling
LLMs are famously bad at exact math, like multiplying two 8-digit numbers, and they cannot fetch live data or touch the physical world by themselves. They are 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 should realize memory is not enough. Instead of guessing, it emits a structured instruction:
{
"call": "calculate_weather",
"arguments": { "location": "Chicago", "date": "tomorrow" }
}
The host app intercepts the JSON, calls the real weather API, gets the result, and adds it back to the chat history. The LLM reads the result and finishes: "Yes, you should wear a coat. Chicago will be 41°F and raining tomorrow."
Reasoning loops: ReAct and reflection
For complex tasks, agents use structured loops instead of one-shot answers.
1. ReAct: reason, then act
ReAct makes the model reason before taking action. The loop goes like this:
- Thought: The model states a plan, like "find France's population, then multiply by 0.12."
- Action: The model calls a search engine, calculator, or other tool.
- Observation: The model reads the tool output, updates the plan, and loops until the task is done.
2. Reflection and self-correction
If a model writes code, the first draft may be buggy. A reflection agent does not ship it immediately. It runs the code in an isolated environment, reads errors, feeds those errors back into the model, and rewrites the code. That feedback loop boosts task success.
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, like answering "2+2=?" or reading a familiar road sign.
- System 2 (Slow): Slow, deliberate reasoning, like solving "17 x 24" or filling out a tax form.
Standard LLMs mostly act like System 1. They output the next token immediately, with limited room to plan, test, or revise. If the answer starts badly, they cannot truly rewind.
Modern System 2 Reasoning Models spend extra inference-time compute before giving the final answer. Current reasoning systems point to the same shift: models plan, use tools, check intermediate work, and keep going across longer workflows. Some expose controllable reasoning effort; others keep it internal and return 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