AI Agent

وكيل الذكاء الاصطناعي

Intermediateai-ml1 min read
agentautonomous agentAI agent loopagentic AI

Definition

An LLM that can take actions in the world — calling tools, searching the web, writing files, and making decisions across multiple steps to complete a goal.

نموذج لغوي كبير يمكنه اتخاذ إجراءات في العالم الحقيقي — استدعاء الأدوات والبحث في الويب وكتابة الملفات واتخاذ القرارات عبر خطوات متعددة لإنجاز هدف.

Why It Matters

Agents are the shift from 'AI that answers questions' to 'AI that completes tasks'. They are why tools like Claude Code, Cursor, and GitHub Copilot Workspace feel different from a chatbot — they actually do work, not just describe work. Understanding agents is essential for building the next generation of AI products.

الوكلاء هم التحول من 'ذكاء اصطناعي يُجيب على الأسئلة' إلى 'ذكاء اصطناعي ينجز المهام'. هذا هو السبب الذي يجعل أدوات مثل Claude Code وCursor وGitHub Copilot Workspace تبدو مختلفة عن روبوت الدردشة — فهي تُنجز العمل فعلاً لا مجرد وصفه. فهم الوكلاء ضروري لبناء الجيل القادم من منتجات الذكاء الاصطناعي.

Full Definition

An AI agent is an LLM that operates in a loop: it receives a goal, reasons about what actions to take, calls tools (functions it has access to), observes the results, and continues reasoning and acting until the goal is complete. Unlike a single prompt-response interaction, an agent can take dozens of steps autonomously. Examples: a coding agent that reads your codebase, identifies bugs, writes fixes, runs tests, and commits the result. Or a research agent that searches the web, reads articles, extracts key facts, and writes a summary report.
وكيل الذكاء الاصطناعي هو نموذج لغوي كبير يعمل في حلقة: يتلقى هدفاً ويتفكر في الإجراءات التي يجب اتخاذها ويستدعي الأدوات (الدوال التي يملك صلاحية الوصول إليها) ويُلاحظ النتائج ويستمر في التفكير والتصرف حتى اكتمال الهدف. على عكس تفاعل التعليمة والاستجابة الفردية، يمكن للوكيل اتخاذ عشرات الخطوات باستقلالية. أمثلة: وكيل برمجي يقرأ قاعدة كودك ويحدد الأخطاء ويكتب الإصلاحات ويُشغّل الاختبارات ويُودع النتيجة. أو وكيل بحثي يبحث في الويب ويقرأ المقالات ويستخرج الحقائق الرئيسية ويكتب تقرير ملخص.

Example Usage

You build a customer support agent: (1) User submits a complaint. (2) Agent calls tool: `search_knowledge_base('refund policy')`. (3) Agent reads the policy. (4) Agent calls tool: `get_order_status(order_id)`. (5) Agent reads the order. (6) Agent decides: order eligible for refund. (7) Agent calls tool: `initiate_refund(order_id)`. (8) Agent replies to user: 'Your refund has been initiated.' — 6 steps, zero human involvement.

تبني وكيل دعم عملاء: (1) يُقدّم المستخدم شكوى. (2) يستدعي الوكيل أداة: `search_knowledge_base('سياسة الاسترداد')`. (3) يقرأ الوكيل السياسة. (4) يستدعي الوكيل أداة: `get_order_status(order_id)`. (5) يقرأ الوكيل الطلب. (6) يقرر الوكيل: الطلب مؤهل للاسترداد. (7) يستدعي الوكيل أداة: `initiate_refund(order_id)`. (8) يردّ الوكيل على المستخدم: 'جارٍ معالجة استردادك.' — 6 خطوات، صفر تدخل بشري.

Knowledge Graph

Avoid these mistakes when using AI Agent:

1

Building agents without guardrails — an agent with filesystem write access that hallucinates can delete production files

2

Not limiting the number of agent steps — an agent in an infinite loop will run until it hits your API cost limit

3

Giving an agent too many tools — 3–5 focused tools outperforms 20 general tools in reliability

Sign in to unlock guided AI explanations from AI Teacher.

Generate a Prompt

Copy this prompt and use it directly with any AI model — no setup needed.

Ready-to-Use Prompt
Help me build a project using AI Agent.

Explain:
1. What is AI Agent and why it matters
2. The core architecture and required tools
3. Step-by-step implementation plan
4. Common mistakes to avoid: Building agents without guardrails — an agent with filesystem write access that hallucinates can delete production files, Not limiting the number of agent steps — an agent in an infinite loop will run until it hits your API cost limit, Giving an agent too many tools — 3–5 focused tools outperforms 20 general tools in reliability
5. Best practices and production tips

Official Resources