# AI Agents Kya Hai?

URL: https://aiseason.tech/ai-agents-kya-hai

AI agent aisa software hai jo sirf jawab nahin deta, balke kaam karta hai. Aap usay maqsad dete hain, woh khud steps sochta hai, tools use karta hai (jaise search, database ya email) aur nateeja check kar ke kaam mukammal karta hai. Is page par Roman Urdu mein samjhaya gaya hai ke AI agents kya hain, agentic AI kya hai, yeh chatbot se kaise mukhtalif hain aur Python mein AI agent kaise banaye.

| Fact | Value |
| --- | --- |
| AI agent kya hai? | LLM + tools + memory + loop: aisa program jo maqsad ke liye khud steps le kar kaam karta hai |
| Agentic AI kya hai? | AI ka woh tareeqa jis mein model sirf likhta nahin, plan bana kar action leta hai |
| Chatbot se farq | Chatbot jawab deta hai; agent tools use kar ke kaam poora karta hai |
| Banane ke liye | Basic Python aur kisi LLM ki API key |
| Mashhoor frameworks | LangChain, LangGraph, OpenAI Agents SDK, Google ADK |
| Misal | Customer support agent jo order check kare, refund kare aur ticket update kare |

### AI agents kya hai?

**AI agent ek aisa program hai jis mein language model (LLM) ko tools aur memory di jati hai aur woh loop mein chal kar khud faisla karta hai ke agla qadam kya ho, yahan tak ke kaam mukammal ho jaye.** Seedhi misal: ChatGPT se poochein "Karachi se Lahore ki flight kitne ki hai" to woh andaza batayega. Agent flight ki website check karega, qeematein compare karega aur aap ko sahi jawab ya booking ka option dega.

Yani chatbot **baat** karta hai aur agent **kaam** karta hai. English mein tafseel: [What are AI agents](https://aiseason.tech/what-are-ai-agents).

### AI agent ke 4 hissay

| Hissa | Kaam | Misal |
| --- | --- | --- |
| LLM (dimagh) | Sochta hai aur faisla karta hai | GPT, Claude, Gemini |
| Tools (haath) | Bahar ki duniya mein kaam karte hain | Search, calculator, database, email, API |
| Memory (yaad-dasht) | Pichli baatein aur maloomat yaad rakhti hai | Chat history, user ki pasand |
| Loop (chakkar) | Socho, karo, dekho, phir socho | Jab tak kaam khatam na ho |

Tafseel ke liye: [tool calling](https://aiseason.tech/tool-calling), [agent memory](https://aiseason.tech/ai-agent-memory) aur [design patterns](https://aiseason.tech/ai-agent-design-patterns).

### AI agent kaise kaam karta hai?

1. **Maqsad milta hai.** User kehta hai: "Mere 3000 rupay Indian rupees mein kitne banenge?"
2. **Model sochta hai.** "Mujhe currency convert karne wala tool chahiye."
3. **Tool call hota hai.** Model tool ka naam aur arguments deta hai; aap ka code function chalata hai.
4. **Nateeja wapas jata hai.** Tool ka result model ko milta hai.
5. **Model dobara sochta hai.** Kaam ho gaya to jawab deta hai, warna agla tool use karta hai.

Is chakkar ko **ReAct loop** kehte hain: reason (socho), act (karo), observe (dekho). Yaad rakhein ke model khud kuch nahin chalata; har action aap ka code karta hai. Isi liye aap control aur safety rakh sakte hain.

### Agentic AI kya hai?

**Agentic AI woh approach hai jis mein AI ko sirf content banane ke bajaye maqsad haasil karne ke liye plan banane, tools use karne aur khud faislay lene ki salahiyat di jati hai.** AI agent ek system hai; agentic AI poora tareeqa hai jis se aise systems bante hain, jis mein kai agents mil kar bhi kaam kar sakte hain.

|  | Generative AI | Agentic AI |
| --- | --- | --- |
| Kaam | Content banana: text, image, code | Task mukammal karna |
| Tareeqa | Ek sawal, ek jawab | Kai steps ka loop |
| Tools | Nahin | Haan |
| Misal | Email ka draft likhna | Inbox parh kar jawab likhna aur meeting book karna |

Mazeed: [agentic AI vs generative AI](https://aiseason.tech/agentic-ai-vs-generative-ai) aur [what is agentic AI](https://aiseason.tech/what-is-agentic-ai).

### AI agent aur chatbot mein farq

|  | Chatbot | AI agent |
| --- | --- | --- |
| Kya karta hai | Sawal ka jawab deta hai | Kaam poora karta hai |
| Tools | Aam tor par nahin | Haan: API, database, files |
| Steps | Ek | Kai, khud decide karta hai |
| Live data | Nahin, sirf training ka ilm | Haan, tools ke zariye |
| Misal | "Refund policy kya hai?" ka jawab | Order dhoond kar refund process karna |

### AI agents ki asal zindagi ki misalein

- **Customer support agent**: WhatsApp par sawal ka jawab, order status, shikayat darj karna.
- **Coding agent**: code parhta hai, files badalta hai, tests chalata hai.
- **Research agent**: internet se maloomat dhoond kar report banata hai.
- **Voice agent**: phone uthata hai aur appointment book karta hai. Dekhein: [voice AI agent](https://aiseason.tech/voice-ai-agent).
- **Document agent**: PDFs se sawalon ke jawab deta hai. Dekhein: [RAG](https://aiseason.tech/rag-ai-agents).
- **Study agent**: notes se quiz bana kar student ki kamzori par kaam karta hai.

Project ideas: [15 AI agent projects](https://aiseason.tech/ai-agent-projects).

### AI agent kaise banaye? Python mein asaan misal

Neeche ek chhota agent hai jis ke paas ek tool hai. Is ke liye `pip install openai` chalayein aur apni API key environment variable `OPENAI_API_KEY` mein rakhein.

```python
import json
from openai import OpenAI

client = OpenAI()

# 1. Tool: ek aam Python function
def jama_karo(a: float, b: float) -> dict:
    return {"jawab": a + b}

# 2. Model ko tool ke baare mein batana
TOOLS = [{
    "type": "function",
    "function": {
        "name": "jama_karo",
        "description": "Do numbers ko jama karta hai.",
        "parameters": {
            "type": "object",
            "properties": {"a": {"type": "number"}, "b": {"type": "number"}},
            "required": ["a", "b"],
        },
    },
}]

messages = [{"role": "user", "content": "1250 aur 1750 ko jama karo."}]

# 3. Agent loop: jab tak model tool maangta rahe, chalate raho
for _ in range(5):
    reply = client.chat.completions.create(model="gpt-4o-mini", messages=messages, tools=TOOLS)
    message = reply.choices[0].message
    messages.append(message)

    if not message.tool_calls:        # tool nahin chahiye: jawab tayyar
        print(message.content)
        break

    for call in message.tool_calls:    # tool chalao aur nateeja wapas bhejo
        args = json.loads(call.function.arguments)
        result = jama_karo(**args)
        messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
```

Bas yehi agent ka dil hai: tool ki tareef, loop, aur tool ka nateeja wapas bhejna. Asal projects mein tools zyada hote hain, jaise search ya database. Mukammal tutorial: [How to build an AI agent in Python](https://aiseason.tech/how-to-build-an-ai-agent).

### AI agent banana seekhne ke steps

1. Basic Python: functions, dictionaries, JSON. [Kitna Python chahiye](https://aiseason.tech/python-for-ai-agents).
2. LLM API aur prompt likhna. [Prompt engineering](https://aiseason.tech/prompt-engineering).
3. Tool calling aur agent loop (upar wali misal).
4. RAG: apne documents se jawab.
5. LangGraph jaisa framework. [LangGraph tutorial](https://aiseason.tech/langgraph-tutorial).
6. Security, testing aur deployment. [Agent deploy karein](https://aiseason.tech/deploy-ai-agent).

Poora roadmap Roman Urdu mein: [AI kaise seekhein](https://aiseason.tech/ai-kaise-seekhein).

### Urdu mein live seekhna ho to

AI Season ke bootcamp mein yeh sab kuch live sikhaya jata hai: samjhana Urdu mein, code English mein. 6 weeks, 12 sessions, recordings ke saath. Cohort 02 1st January 2027 se shuru hoga. Early-bird fee PKR 3,000 (30th November 2026 tak), phir PKR 4,500. Tafseel: [AI course Urdu mein](https://aiseason.tech/ai-course-in-urdu) ya [enrol karein](https://aiseason.tech/enroll).

### Frequently asked questions

**AI agents kya hai?**
AI agent aisa program hai jis mein language model ko tools aur memory di jati hai aur woh loop mein chal kar khud steps le kar kaam mukammal karta hai. Chatbot sirf jawab deta hai, agent kaam karta hai.

**Agentic AI kya hai?**
Agentic AI woh tareeqa hai jis mein AI sirf content nahin banata balke maqsad ke liye plan banata hai, tools use karta hai aur nateeja dekh kar agla qadam uthata hai.

**AI agent kaise banaye?**
Python mein ek function ko tool banayein, LLM API ko us tool ki tareef dein, aur loop chalayein: model tool maange to function chalayein aur nateeja wapas bhejein, jab tak model final jawab na de.

**AI agent aur chatbot mein kya farq hai?**
Chatbot ek sawal ka ek jawab deta hai aur aam tor par tools use nahin karta. AI agent tools ke zariye live data leta hai, kai steps khud karta hai aur kaam poora karta hai.

**Kya AI agent banane ke liye coding zaroori hai?**
Custom agents ke liye basic Python zaroori hai. n8n jaise no-code tools se saada agents bina coding ke bhi ban jate hain.

**AI agents seekhne mein kitna waqt lagta hai?**
Basic Python aati ho to ek do hafton mein pehla agent ban jata hai, aur 2 se 3 maheenay ki practice mein aap achay projects bana sakte hain.

**AI agents ka course Urdu mein kahan milega?**
AI Season ek live online AI agents bootcamp hai jo Urdu mein samjhaya jata hai, code English mein. Tafseel aiseason.tech par hai.

---

_Last updated: 2026-11-16. Canonical page: https://aiseason.tech/ai-agents-kya-hai. Source: AI Season (https://aiseason.tech/)._
