π Introduction
Artificial Intelligence has evolved rapidly—from rule-based systems to machine learning, and then to generative AI.
Now, we are entering a new era:
π Agentic AI
Unlike traditional AI systems that simply respond to inputs, Agentic AI focuses on autonomous action and goal completion.
π§ What is Agentic AI?
Agentic AI refers to artificial intelligence systems that can:
- Set goals
- Plan actions
- Execute tasks
- Adapt based on feedback
π All with minimal human intervention
π Key Idea
π
“Generative AI = Thinks”
π
“Agentic AI = Thinks + Acts”
⚙️ Core Characteristics
- ✅ Autonomy (works independently)
- ✅ Goal-oriented behavior
- ✅ Adaptability (learns over time)
- ✅ Proactive decision-making
- ✅ Tool usage (APIs, databases, apps)
π How Agentic AI Works (Simplified Loop)
Perceive → Reason → Plan → Act → Learn
π This continuous loop allows AI agents to improve and adapt automatically
π― Conclusion
Agentic AI represents a shift from passive AI tools to active digital workers, capable of handling complex, multi-step tasks.
Perceive → Reason → Plan → Act → Learn
π 1. Define the Goal (Agent Behavior)
# Define the goal for the agent
goal = "Find cheapest flight and book ticket"
print("Goal:", goal)
π️ 2. Perception (Collect Data)
# Perceive environment (simulate data gathering)
def perceive():
data = {
"flights": [
{"price": 500, "airline": "A"},
{"price": 300, "airline": "B"},
{"price": 400, "airline": "C"}
]
}
print("Perception: Collected flight data")
return data
π§ 3. Reasoning (Analyze Data)
# Reasoning step (analyze options)
def reason(data):
cheapest = min(data["flights"], key=lambda x: x["price"])
print("Reasoning: Cheapest flight selected →", cheapest)
return cheapest
π§± 4. Planning
# Plan actions
def plan(flight):
steps = [
"Check availability",
"Reserve seat",
"Make payment"
]
print("Planning: Steps created →", steps)
return steps
⚡ 5. Action (Execute Task)
# Execute actions
def act(steps, flight):
for step in steps:
print(f"Executing: {step}")
print(f"✅ Flight booked with {flight['airline']} for ${flight['price']}")
π 6. Learning (Feedback Loop)
# Learning from feedback
def learn(success=True):
if success:
print("Learning: Strategy successful ✅")
else:
print("Learning: Adjust strategy ❌")
π 7. Full Agentic Loop (Core System)
def agentic_ai():
data = perceive() # Perceive
best_option = reason(data) # Reason
steps = plan(best_option) # Plan
act(steps, best_option) # Act
learn(success=True) # Learn
# Run the agent
agentic_ai()
π️ π§ What This Code Represents
| Step | Real Agentic AI Equivalent |
|---|---|
| perceive() | Data collection (APIs, tools) |
| reason() | LLM / decision engine |
| plan() | Task breakdown |
| act() | API calls / automation |
| learn() | Feedback / reinforcement learning |
No comments:
Post a Comment