AI Agents

AI Agent Fundamentals: Decision-Mak in g Loops, Tools, and Agentic vs. Procedural Reasoning

Agents make autonomous decisions by reasoning, planning, and calling tools. Understand the perception-decision-action loop and when to use agents vs. deterministic workflows.

SS
Soham Sharma
AI Engineer, Botmartz · July 17, 2026 · 1 min read
Read Time
1 min
Failure Modes
5
Code Snippets
3
Runnable Notebook
1
AI Agent Fundamentals: Decision-Making Loops, Tools, and Agentic vs. Procedural Reasoning

An agent is a system that perceives its environment, reasons about it, and acts. Unlike procedural workflows (fixed sequences), agents decide what action to take based on the current state. An LLM-based agent takes user input, reasons about what tool to call, executes the tool, and iterates until reaching a goal. Understanding the perception-decision-action loop is the foundation of agent architecture.

The Agent Loop

User Input

↓ [Perception] → Read environment, history, available tools ↓ [Reasoning] → LLM decides: "I should call tool X with args Y" ↓ [Action] → Execute tool, get result ↓ [Evaluation] → Check if goal is reached ↓ Loop until done

Agentic vs. Procedural Reasoning

Procedural: Fixed sequence of steps (deterministic).

Step 1: Get user input

Step 2: Call search API Step 3: Format results Step 4: Return

Agentic: Flexible, decision-driven.

Agent reasons: "User wants information about X. I should search for it."

Agent calls search. Agent examines results and decides: "I need more specific info. I'll refine the search." Agent calls search again with refined query. Agent formats and returns.

Agents handle variable, unpredictable tasks. Procedural workflows handle fixed, well-defined tasks.

Conclusion

Agents are autonomous systems that reason and act. The perception-decision-action loop is the core abstraction. Understanding when to use agents (complex, variable tasks) vs. procedural workflows (simple, fixed tasks) guides architecture decisions. Next: we'll explore specific agent patterns—ReAct, tool use, and prompt design.

Closing Takeaways

Measure retrieval precision and recall in isolation before touching the model.
Chunk along document structure, not arbitrary character counts.
Combine vector and keyword search — hybrid retrieval beats either alone.
Treat evaluation as continuous infrastructure, not a launch-week report.
Try It Yourself
A runnable Google Colab notebook with the eval harness and hybrid search code from this post.
#Agents#AI#LLMs#Reasoning#Tools
0 views
SS
Soham Sharma
AI Engineer at Botmartz, building enterprise RAG and agent systems in production. Contributing to open-source libraries.

Discussion (0)

No approved comments yet. Be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *

More Engineering Insights
TensorFlow>-
Soham Sharma · 8 min read
GeneralPlaywright E2E Test Post
Integration Bot · 5 min read