Agent Foundations
Agent
01. Model
The LLM powering reasoning and decisions.
02. Tools
External functions or APIs the agent can use.
03. Instructions
Guidelines and guardrails for behavior.
Component Details
Data Tools
Enable agents to retrieve context and information necessary for executing the workflow.
Examples:
- Query transaction databases
- Read PDF documents
- Search the web
Action Tools
Enable agents to interact with systems to take actions such as adding new information to databases, updating records, or sending messages.
Examples:
- Send emails and texts
- Update a CRM record
- Handoff a ticket to a human
Orchestration Tools
Agents themselves can serve as tools for other agents, enabling complex, multi-agent systems.
Examples:
- A "Refund Agent" tool
- A "Research Agent" tool
- A "Writing Agent" tool
Manager Pattern
A central "manager" agent coordinates multiple specialized agents via tool calls.
Decentralized Pattern
Multiple agents operate as peers, handing off tasks to one another based on their specializations.
Guardrails
A layered defense mechanism to ensure agents operate safely and predictably.
Flags off-topic queries.
Detects unsafe inputs like jailbreaks.
Vets output for personal info.
Flags harmful/inappropriate content.
Assess risk of each tool.
Blocklists, regex, length limits.
Ensures brand alignment.
Escalates to a human when needed.
🎓 Learning Center
Key concepts on Agentic AI
What is Agentic AI? â–¶
Agentic AI refers to AI systems, or "agents," that can perform tasks, make decisions, and take actions autonomously, without direct human instruction for each step. Unlike tools that need a prompt to do something (like writing an email), agents work on our behalf to achieve a goal, figuring out the steps themselves.
Analogy: Think of the difference between a simple calculator and an expert human accountant. The calculator (like traditional AI) needs you to input every single calculation. The accountant (the AI agent) understands your high-level goal—like "minimize my taxes"—and independently executes all the necessary steps, from gathering documents to filing forms, without you telling them exactly what to do at each stage.
Key Characteristics of AI Agents â–¶
- Autonomy: They operate independently without constant human intervention.
Example: A marketing agent that adjusts ad spend across platforms in real-time based on performance, without needing a manager's approval for every change. - Adaptability: They learn and modify their behavior based on new data or changing situations.
Example: A supply chain agent that reroutes shipments automatically when it detects a weather disruption or port closure. - Interaction: They interact with their environment, other agents, and users through various interfaces.
Example: A customer service agent that can understand a user's typed query, access their order history from a database, and send a confirmation email. - Goal-Oriented: They are designed to achieve specific objectives, from simple tasks to complex problem-solving.
Example: A personal finance agent whose goal is to save the user $100 per month by analyzing spending and suggesting budget cuts.
How Smart Agents Work (Example: AI Travel Agent) â–¶
- Set a Goal: The agent is given a complex goal, like "plan a week-long family vacation to Hawaii."
- Plan Tasks: It breaks the goal down into smaller, manageable tasks (e.g., book flights, find hotel, plan activities) and prioritizes them.
- Gather Information: The agent collects data by asking questions, accessing databases, or searching online to understand preferences and options.
- Refine and Adapt: As it gathers information, it might change its plan. For example, if a desired activity is only available on a specific day, it will adjust the flight bookings accordingly.
- Deliver/Execute: The agent presents a complete itinerary. If trusted, it can also execute the plan: booking flights, making reservations, and buying tickets.
- Learn from Interaction: Over time, the agent learns your preferences (e.g., you like aisle seats) and improves its future recommendations, making the process more efficient.
Key Takeaway:
Smart agents operate in a continuous loop: Plan → Act → Observe → Refine. This allows them to tackle complex, multi-step problems that change over time.
The 6 Types of AI Agents â–¶
1. Simple Reflex Agents: Act only based on the current situation using predefined rules. They have no memory.
Best for: Simple, repetitive tasks like password resets or answering basic FAQs.
2. Model-Based Agents: Maintain an internal "model" of the world to handle situations that aren't immediately observable. They can plan and predict outcomes.
Best for: Tasks requiring short-term planning, like a robot vacuum mapping a room to clean it efficiently.
3. Goal-Based Agents: Go a step further by having explicit goal information. They choose actions that will help them achieve their goal.
Best for: Problems with a clear objective, like a supply chain agent whose goal is to maintain a certain inventory level.
4. Utility-Based Agents: Choose actions that maximize "utility" or happiness. They can weigh trade-offs between conflicting goals.
Best for: Optimization problems, like a marketing agent allocating a budget to get the highest return on investment.
5. Learning-Based Agents: Can learn from their experiences and improve their performance over time through techniques like reinforcement learning.
Best for: Dynamic environments where the optimal strategy is unknown, like fraud detection or personalized recommendation engines.
6. Hierarchical Agents: A system of agents organized in a hierarchy. High-level agents break down complex problems and delegate tasks to lower-level, specialized agents.
Best for: Extremely complex, multi-domain problems, like managing an entire company's operations from sales to support.
The Pyramid of Trust â–¶
Building trust in AI agents is essential for their adoption. This can be viewed as a pyramid of needs, where foundational needs must be met before moving to higher levels:
- (Base) Safety, Security, & Privacy: Agents must comply with existing policies for data handling and security.
Why it matters: If an agent leaks private data or can be easily hacked, no one will use it, regardless of how effective it is. - Fairness, Quality, & Accuracy: Agents must be designed to avoid bias and deliver high-quality, accurate results.
Why it matters: An agent that produces biased or incorrect results can damage brand reputation and lead to poor business outcomes. - Accountability: There must be structures to hold the agent accountable and explain its decisions when things go wrong.
Why it matters: Without accountability, we can't diagnose mistakes or be confident that the agent will improve over time. - (Top) Transparency: There should be clarity on when and how AI agents are being used, to the extent that it builds (and doesn't hinder) user trust.
Why it matters: Hiding the use of an agent can erode trust if discovered, making users feel deceived. Appropriate transparency builds a stronger human-AI relationship.
✨ Agent Designer
Describe a problem, and let Gemini design a high-level agent architecture for you.