AgentsAuthors: Julia Wiesinger, Patrick Marlow and Vladimir VuskovicAgents2September 2024AcknowledgementsReviewers and ContributorsEvan HuangEmily XueOlcan SercinogluSebastian RiedelSatinder BavejaAntonio GulliAnant NawalgariaCurators and EditorsAntonio GulliAnant NawalgariaGrace Mollison Technical WriterJoey HaymakerDesignerMichael Lanning Introduction 4What is an agent? 5 The model 6 The tools 7 The orchestration layer 7 Agents vs. models 8 Cognitive architectures: How agents operate 8Tools: Our keys to the outside world 12 Extensions 13 Sample Extensions 15 Functions 18 Use cases 21 Function sample code 24 Data stores 27 Implementation and application 28 Tools recap 32Enhancing model performance with targeted learning 33Agent quick start with LangChain 35Production applications with Vertex AI agents 38Summary 40Endnotes 42Table of contentsAgents4September 2024IntroductionHumans are fantastic at messy pattern recognition tasks. However, they often rely on tools - like books, Google Search, or a calculator - to supplement their prior knowledge before arriving at a conclusion. Just like humans, Generative AI models can be trained to use tools to access real-time information or suggest a real-world action. For example, a model can leverage a database retrieval tool to access specific information, like a customer's purchase history, so it can generate tailored shopping recommendations. Alternatively, based on a user's query, a model can make various API calls to send an email response to a colleague or complete a financial transaction on your behalf. To do so, the model must not only have access to a set of external tools, it needs the ability to plan and execute any task in a self-directed fashion. This combination of reasoning, logic, and access to external information that are all connected to a Generative AI model invokes the concept of an agent, or a program that extends beyond the standalone capabilities of a Generative AI model. This whitepaper dives into all these and associated aspects in more detail.This combination of reasoning, logic, and access to external information that are all connected to a Generative AI model invokes the concept of an agent.Agents5September 2024What is an agent?In its most fundamental form, a Generative AI agent can be defined as an application that attempts to achieve a goal by observing the world and acting upon it using the tools that it has at its disposal. Agents are autonomous and can act independently of human intervention, especially when provided with proper goals or objectives they are meant to achieve. Agents can also be proactive in their approach to reaching their goals. Even in the absence of explicit instruction sets from a human, an agent can reason about what it should do next to achieve its ultimate goal. While the notion of agents in AI is quite general and powerful, this whitepaper focuses...