AI Agent
LLMs autonomously plan and use tools to complete tasks
AI Agent is a system that leverages LLM reasoning capabilities to autonomously perform complex tasks. The core loop is Observe → Think → Act → Observe results. When a user says "create this month's sales report," the Agent autonomously performs DB queries → data analysis → chart creation → document writing across multiple steps. Frameworks include ReAct (Reasoning + Acting), Plan-and-Execute, and Tree-of-Thought, with Claude Code, Devin, and AutoGPT as representatives.
Key Concepts
User presents high-level goal ("fix this bug", "create a report")
Agent analyzes goal and creates execution plan (Task Decomposition)
Select and call tools needed for first step of plan (Function Calling)
Observe tool execution results and decide next action
Modify plan as needed (errors, new information discovered, etc.)
Report final results to user when all steps are complete
Pros
- ✓ Automates complex multi-step tasks
- ✓ Extends capabilities through tool combinations
- ✓ Minimizes user intervention
- ✓ Can autonomously self-correct on failure
Cons
- ✗ Risk of faulty plans based on hallucination
- ✗ Error amplification in tool call chains
- ✗ Cost — many LLM calls
- ✗ Security — risk of excessive permission grants