




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















Introduction to Agentic AI What Is an AI Agent? AI Models vs AI Agents Core Components of an Agentic System How AI Agents Work Goals, Instructions, and Planning Tools and Tool Calling Memory in AI Agents Autonomous Decision-Making Agentic Workflows Single-Agent Systems Multi-Agent Systems Agent Loops Human-in-the-Loop Systems APIs and External Services Retrieval-Augmented Generation Autonomous Task Execution Building a Simple AI Agent Example: Research Agent Example: Customer Support Agent Example: Personal Productivity Agent Example: Lead Generation Workflow Agentic AI Security Common Problems and Limitations Best Practices Testing and Evaluation Future of Agentic AI Mini Projects Key Terms Final Summary
Artificial Intelligence has traditionally been used to answer questions, generate text, create images, analyze information, and perform individual tasks. Modern AI systems can go further. Instead of simply responding to a single instruction, an agentic AI system can be designed to: Understand a goal Break a task into smaller steps Make decisions Use external tools Retrieve information Remember relevant information Execute actions Check results Adjust its approach Continue working toward a goal This approach is commonly called Agentic AI. For example, a traditional chatbot might answer: "Here are some companies that offer web design services." An agentic system could potentially be designed to: Understand the user's requirements. Search for suitable companies. Collect relevant information. Organize the results. Remove duplicates. Analyze the results. Create a report. Present the final information. The important difference is that an agentic system can perform a sequence of actions toward a goal rather than simply generating one response.
An AI agent is a software system that uses an AI model to make decisions and perform tasks according to a goal.
User: Explain HTML forms. AI: HTML forms allow users to enter and submit information... The model provides an answer.
An agent can use the model as a reasoning component while interacting with tools and systems. For example: User: Find the best information about HTML forms and create a study guide. Agent:
A typical agentic system may contain several components.
The model interprets information and helps make decisions. Examples include large language models and other specialized AI models.
2. Instructions Instructions define how the agent should behave. For example: You are a research assistant. Use reliable sources. Do not invent information. Summarize findings clearly. 3. Goal The goal tells the agent what it is trying to accomplish. Example: Find five potential customers for a web design business. 4. Tools Tools allow an agent to interact with external systems. Examples: Web search Databases APIs Calculators Email systems File systems Spreadsheets 5. Memory Memory allows the system to retain relevant information. 6. Planning Planning helps the agent determine what steps should be performed.
A simple agent loop can be represented as: while goal_not_complete: understand_current_state() decide_next_action() execute_action() observe_result() update_state() This is a conceptual representation, not a complete production implementation.
A good agent needs a clear goal. Compare these two instructions:
Find customers.
Find potential small-business customers who may need website development services. Collect company name, website, industry, and publicly available contact information. The second goal provides much more structure.
Planning means deciding which steps are necessary to reach the goal. For example:
Goal: Create a competitor analysis. Plan:
Tools are one of the most important features of agentic systems. An AI model by itself may not be able to perform real-world actions. Tools provide additional capabilities. Examples: Search Tool Database Tool Calculator Tool Email Tool Calendar Tool File Tool API Tool Browser Tool An agent might decide:
User wants:
This stores information that may be useful later. Examples: User preferences Previous decisions Project information Important historical context
Working memory contains information the agent currently needs while completing a task. Memory should be designed carefully because storing unnecessary or sensitive information can create privacy and security problems.
The word autonomous means that a system can perform certain actions without requiring a human to manually control every step. For example: Task: Monitor a data source. Agent: Check data ↓ Detect change ↓ Analyze change ↓ Decide whether it is important
Generate report However, autonomy does not mean that an agent should always operate without supervision. High-impact actions may require human approval. For example: Agent: Draft email ↓ Human approval ↓ Send email This is known as human-in-the-loop.
An agentic workflow is a sequence of tasks in which AI systems can make decisions and perform actions. A simple workflow could be: Input ↓ Analyze ↓ Plan ↓ Search ↓ Process ↓ Verify ↓ Generate Output Traditional automation often follows fixed rules:
Manager Agent ↓ ┌──────────────┼──────────────┐ ↓ ↓ ↓ Research Agent Analysis Agent Writing Agent ↓ ↓ ↓ └──────────────┼──────────────┘ ↓ Final Output Each agent can have a specific responsibility.
A research project might use: Research Agent Finds information. Analysis Agent Compares information. Writing Agent Creates the report. Review Agent Checks the final output. Multi-agent systems can be powerful, but they also introduce additional complexity.
Many agentic systems operate through an iterative loop. A basic loop is: Observe ↓ Reason ↓
Act ↓ Observe ↓ Reason ↓ Act This continues until: The goal is complete. A maximum number of steps is reached. The system encounters an error. Human approval is required. A safety rule stops execution.
An agent should not be allowed to continue indefinitely. A production system may use: Maximum steps = 10 Maximum cost = defined budget Timeout = defined duration These controls reduce runaway behavior.
Human-in-the-loop systems involve people at important decision points. For example: Agent creates proposal ↓ Human reviews proposal ↓ Approved? ↓ ↓ Yes No
Analytics Agents become much more useful when they can safely interact with external systems.
Retrieval-Augmented Generation, commonly called RAG , combines information retrieval with AI generation. Instead of relying only on the model's existing knowledge, the system retrieves relevant information and provides it as context. A basic RAG workflow: User Question ↓ Search/Retrieve Information ↓ Relevant Documents ↓ AI Model ↓ Generated Answer For example, a company could create an internal support assistant that searches company documentation before answering employee questions. RAG can help ground responses in a specific knowledge source.
Autonomous task execution means an agent can perform multiple actions toward a goal. Consider a content workflow. Goal: Create a weekly content report. Step 1: Collect data. Step 2:
Analyze performance. Step 3: Identify successful topics. Step 4: Generate recommendations. Step 5: Create report. Step 6: Send report for approval. The agent coordinates the process instead of requiring a person to manually perform every step.
A simple conceptual agent can be created using four main parts: Agent ├── Instructions ├── Model ├── Tools └── Memory Example pseudocode: agent = Agent( model="AI_MODEL", instructions="You are a research assistant.", tools=[ search_tool, calculator_tool ] ) result = agent.run( "Research HTML forms and create a summary." ) print(result)
Customer Message ↓ Understand Request ↓ Search Knowledge Base ↓ Find Relevant Answer ↓ Check Customer Context ↓ Generate Response ↓ Need Human? ↓ ↓ No Yes ↓ ↓ Reply Escalate The agent can handle simple questions automatically. Complex or sensitive cases can be transferred to a human representative.
A productivity agent can help organize tasks. For example: User: I have three tasks today. Agent:
Task managers Notes Email Documents However, actions such as sending messages or changing appointments may require approval.
An agentic lead-generation workflow could be structured as: Define Ideal Customer ↓ Search Public Business Information ↓ Collect Relevant Leads ↓ Filter Leads ↓ Enrich Available Business Data ↓ Score Leads ↓ Create Spreadsheet ↓ Human Review ↓ Optional Outreach For example, an agent might evaluate: Industry Company size Website quality Public business information Potential service needs Important: An automated lead-generation system should respect applicable privacy, anti-spam, terms-of-service, and data-protection requirements.