There is fiber optic at the intersection
Reading time required
9 minutes
Speed reading only takes 3 minutes
/ Fundamentals of AI Agents /
1
Introduction Preview
An AI Agent is an intelligent system capable of autonomous reasoning, tool invocation, and task execution. Unlike large language models that can only engage in conversation, it can think and perform tasks.
Overall, the core points of AI Agents include the following aspects:
Core components: Model (brain), tools (hands and feet), orchestration layer (scheduler), together forming a task execution closed loop.
Reasoning frameworks: Such as ReAct, CoT, ToT, representing the Agent’s thinking patterns, determining how it thinks, acts, and adjusts until the task is completed.
Tool usage: Agents connect to the real world through tools, mainly including Extension (backend closed-loop calls), Function (frontend control functions), Data Storage (knowledge memory and retrieval).
Knowledge enhancement: Vector embeddings and RAG enable Agents to have a dynamic knowledge base, achieving the ability to “look up information before answering”.
Prompt engineering: Guiding Agents to execute tasks more accurately through structured prompts.
👉 Overall, AI Agents upgrade language models to perceptive, decision-making, and executable digital employees, marking a key form towards Artificial General Intelligence (AGI).
2
What is an Agent
In simple terms, an Agent is an entity that can perceive the environment, reason, and take action. It is not merely a large language model but a comprehensive system that combines models, tools, and scheduling mechanisms. Through this design, Agents can understand task objectives, choose appropriate methods, and ultimately complete tasks like a human assistant.
2.1
Definitions and Differences
An AI Agent is an application that utilizes artificial intelligence technology to autonomously execute specific tasks, also known as intelligent agents. It possesses a certain degree of autonomy, capable of making decisions, learning, and adapting to the environment.
The differences from ordinary large language models (LLMs) are as follows:
| Capability | Ordinary Large Model (LLM) | AI Agent |
|---|---|---|
| Reasoning Ability | Yes | More systematic (e.g., ReAct framework) |
| Tool Usage | No | ✅ Can invoke tools |
| Interaction with Environment | ❌ | ✅ Can execute real tasks and perceive external information |
| State Management | Stateless | Has memory and state tracking |
Analogy: The model is like a brain, while the Agent is more like a “person with hands and feet, who can see and hear”.
2.2
Three Core Components
| Component | Function | Example |
|---|---|---|
| Model | Decision-making, reasoning, generating language content | GPT-4, Gemini-1.5 |
| Tool | Facilitates interaction with the external world, acquiring/processing information | Search API, databases, executors, etc. |
| Orchestration Layer | Determines how to think, whether to use tools, how to iterate until the task is completed, maintaining memory, state, reasoning, and planning | ReAct, LangGraph, CoT, etc. |

3
Reasoning Framework
In the AI Agent system, the reasoning framework is a very core concept. It determines how the agent thinks, decides, plans, invokes tools, and ultimately achieves goals when faced with tasks.
In short, the reasoning framework is the logical template for the Agent’s task execution, defining:
How to understand the task
How to break it down into sub-tasks
Whether to invoke tools and how to do so
How to observe feedback and continue to adjust
How to determine task completion
3.1
ReAct (Reason + Act)
The most basic Agent reasoning architecture.
Process:
🤔 Think (whether tools are needed)
🛠️ Act (invoke tools, such as Search)
👀 Observe (obtain results)
🔁 Loop until the final answer is reached
Representative frameworks: LangChain ReAct Agent, OpenAI Plugin Agent
3.2
CoT (Chain of Thought)
Guides the model’s thinking through explicit “step-by-step” prompts.
Commonly used in mathematics, logic, and multi-step reasoning.
3.3
ToT (Tree of Thought)
Multi-path, multi-branch exploration (similar to a search tree).
Can explore multiple ideas in parallel and select the best path through voting.
Suitable for complex tasks, such as planning, games, and code auto-fixing.
4
Tool Type Comparison
In the AI Agent system, tools play a crucial role. They are the bridge between the model and the real world, determining what the Agent can do and which information sources it can access. Different types of tools vary in invocation methods, applicable scenarios, and flexibility, making comparison and organization necessary.
Common tool types mainly include:
Extension: Backend invocation capabilities, such as APIs and external plugins.
Function: Frontend control functions, suitable for invoking internal logic of the model.
Data Storage: Knowledge memory and retrieval tools for dynamically enhancing the Agent’s knowledge base.
4.1
Extension (Backend Closed-loop Plugin)
Concept
Refers to API plugins integrated into the Agent’s backend, teaching the model to invoke through example prompts.
Features:
Can directly invoke APIs without additional coding;
Can dynamically select the most suitable Extension;
Supports real-time data access.

Case Study: Agent for Booking Flights
Traditional Method: Manually writing code to parse parameters and call APIs, which is complex to maintain.
Extension Method: The Agent automatically selects and invokes APIs through examples and parameter formats.

4.2
Function (Frontend Control Invocation)
Concept
The model generates function call intentions (JSON), with execution occurring in the frontend/client.
Commonly found in payment, medical, approval processes, etc.

Case Study: Recommended Cities for Skiing

4.3
Data Storage (Vector Database + RAG)
Concept
Vector Database: Stores data in embedding form, supporting semantic retrieval.
RAG Workflow:
Document → embedding → stored in Vector DB
User query → embedding → vector retrieval
Top-K relevant documents as context → generate answers

Case Study: Inquiring about the Latest Parenting Policies


5
Related Knowledge Concepts
In the design and implementation of Agents, several key concepts related to large models often come into play. These knowledge points are not unique to Agents, but they provide foundational support for the expansion of Agent capabilities: for example, Embedding allows models to understand and compare semantics, RAG provides external knowledge supplementation, and Prompt Engineering helps better drive model behavior. Understanding these concepts aids in systematically grasping the working principles of Agents.
5.1
Vector Database Embedding
Converts text, images, and other information into vectors (a set of numbers) for the model to compare semantic similarity.
5.2
RAG (Retrieval-Augmented Generation)
Closed-book exam (LLM): Answers based on the model’s existing knowledge.
Open-book exam (RAG): First retrieves external materials, then combines them to generate answers.
5.3
Prompt Engineering
Designing prompts that can guide the model to output expected content is the “art and science of interacting with large models”.
| No Prompt Engineering | With Prompt Engineering |
|---|---|
| “Translate this sentence” → Uncertain output | “Please translate into Simplified Chinese, in a formal tone, retaining proper nouns” → More precise output |
| “Please summarize this paragraph” → Casual style | “Please summarize in three points, each not exceeding 20 characters” → More structured output |
6
Reference Links
[Translation] AI Agent Technology White Paper (Google, 2024) ( https://arthurchiao.art/blog/ai-agent-white-paper-zh/ )