YUNOVA · AI Agents
Module 1: What an AI agent is
Chatbot, assistant, agent: the difference
Key points
- Chatbot मुख्य रूप से बातचीत करता है: आप सवाल पूछते हैं और वह text में जवाब देता है।
- Assistant आपके कहने पर छोटे काम करता है, जैसे reminder लगाना या email का draft लिखना, पर हर कदम आप ही तय करते हैं।
- AI agent एक goal लेकर खुद कदम तय करता है, tools चलाता है और नतीजा देखकर अगला कदम चुनता है।
- फ़र्क autonomy का है: agent के पास tools, memory और एक loop होता है जो काम पूरा होने तक चलता है।
The loop: think, act, observe
Key points
- Agent एक loop में काम करता है: think (सोचना), act (tool चलाना), observe (नतीजा देखना)।
- Think में model तय करता है कि goal के लिए अगला कदम क्या हो और कौन-सा tool चाहिए।
- Act में tool सच में चलता है, जैसे search, calculator या API call; observe में उसका result model को वापस मिलता है।
- Loop तब रुकता है जब goal पूरा हो जाए या कोई तय सीमा (जैसे अधिकतम steps) पहुँच जाए।
What an agent can and cannot do today
Key points
- आज के agents तय tools से जानकारी ढूँढना, data भरना, email या report बनाना जैसे दोहराए जाने वाले काम अच्छे से कर लेते हैं।
- Agents गलत तथ्य बना सकते हैं (hallucination) और लंबे, कई कदम वाले कामों में भटक सकते हैं।
- Agent वही कर सकता है जिसके tools और permissions उसे दिए गए हों; बाकी दुनिया तक उसकी पहुँच नहीं होती।
- पैसे, कानूनी या ज़रूरी फ़ैसलों में human review रखना आज भी ज़रूरी है।
Agent frameworks and where they fit
Key points
- No-code tools जैसे n8n में आप blocks जोड़कर agent बनाते हैं; शुरुआत और छोटे automation के लिए यह तेज़ है।
- Code frameworks जैसे LangChain, LangGraph, CrewAI या OpenAI/Claude के SDK ज़्यादा control और custom logic देते हैं।
- Framework चुनते समय देखें: काम कितना जटिल है, आपको coding आती है या नहीं, और production में कितना control चाहिए।
- हर framework के नीचे वही मूल बातें हैं: model, tools, memory और loop।
A simple agent, traced step by step
Key points
- एक simple agent में चार हिस्से होते हैं: model, tools की list, बातचीत का history और loop।
- हर step पर model या तो सीधा जवाब देता है या tool call माँगता है; आपका code tool चलाकर result वापस भेजता है।
- हर step को print या log करने से आप देख पाते हैं कि agent ने क्या सोचा, कौन-सा tool चलाया और क्या मिला।
- Loop में अधिकतम steps की सीमा रखें ताकि agent अटक कर अनंत बार न चले।