0% found this document useful (0 votes)
38 views17 pages

Tool Use

The document outlines the Agent Development Kit (ADK) and its tools that enable agents to interact with the world by fetching real-time data, executing code, and making API requests. It describes various tool types, including function tools, long-running function tools, built-in tools, and third-party tools, emphasizing the modular design and delegation capabilities of agents. Additionally, it introduces the ToolContext, which allows tools to access the current state of interactions and influence the agent's decision-making process.

Uploaded by

ABOSEDE PETER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views17 pages

Tool Use

The document outlines the Agent Development Kit (ADK) and its tools that enable agents to interact with the world by fetching real-time data, executing code, and making API requests. It describes various tool types, including function tools, long-running function tools, built-in tools, and third-party tools, emphasizing the modular design and delegation capabilities of agents. Additionally, it introduces the ToolContext, which allows tools to access the current state of interactions and influence the agent's decision-making process.

Uploaded by

ABOSEDE PETER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

MASTERING LLM PRESENTS

COFFEE BREAK CONCEPTS

Agent
Development Kit
(ADK) - Tools

Follow us on
What is Tool ?

Agents gain their ability to interact


with the world and perform specific
actions through Tools.
Tools allow agents to fetch real-time
data by
Query database
Make an API Request
execute code
RAG
Calling another Agent

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
ADK Tool Utilization
Process

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
MASTERING LLM PRESENTS
COFFEE BREAK CONCEPTS

Tool Types
Supported in
ADK

Follow us on
@MASTERING-LLM-LARGE-LANGUAGE-MODEL
Function Tools

You define standard Python


functions or methods, and ADK
makes them callable by the agent.
This could be anything from a
simple calculation to a complex
database query or API call.

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
Agent-as-a-Tool
(AgentTool)
A particularly powerful concept
where one agent can invoke another
agent as if it were a standard tool.
This enables modular design, task
delegation, and building
hierarchical agent teams.
When Agent A calls Agent B as a
tool, Agent A receives the result
from Agent B and decides how to
use it in its final response, retaining
overall control.

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
Long Running Function
Tool
ADK also supports Long Running
Function Tool for tasks that take
time or need to yield intermediate
results.

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
Built-in Tools
ADK provides several ready-to-use
tools for common tasks, saving
development time.
Examples include
GoogleSearchTool,
CodeExecutionTool (for
running Python code)
VertexAiSearchTool (for RAG
over custom data stores)
Google Cloud Tools : Specialized
tools for interacting directly with
Google Cloud Platform services,
such as Apigee API Hub, Application
Integration workflows, and various
Google Cloud databases (often via
the MCP Toolbox).
@MASTERING-LLM-LARGE-LANGUAGE-MODEL
Third-Party Tools
Integrate tools from popular
external libraries like LangChain
(using LangchainTool) or CrewAI
(using CrewaiTool) seamlessly into
your ADK agents

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
MCP & OpenAPI Tools
Tools that adhere to the Model
Context Protocol (MCP), an open
standard for how models interact
with external tools and data
sources.
This allows ADK agents to consume
services from any MCP-compliant
server, like the MCP Toolbox for
Databases.
Automatically create tools that can
interact with any REST API
described by an OpenAPI (Swagger)
specification.

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
MASTERING LLM PRESENTS
COFFEE BREAK CONCEPTS

How Tool can access


current state & decide
control flow → Tool
Context

Follow us on
ToolContext
When a tool function is executed by
the framework, it receives a special
ToolContext object .
This context is a bridge, giving the
tool access to the current state of
the interaction. Through
ToolContext, the tool can.
This context allows tools to be more
than just stateless functions; they
can participate in the conversation's
state and access shared resources.

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
What can ToolContext
do?
Read and write to the current
session's state (tool_context.state).
Access services to manage Artifacts
(tool_context.list_artifacts(),
load_artifact(), save_artifact()) and
Memory
(tool_context.search_memory()).
Get information about the specific
tool invocation (function_call_id)
and any prior authentication
(auth_response).
Influence the agent's next steps via
tool_context.actions

@MASTERING-LLM-LARGE-LANGUAGE-MODEL
www.masteringllm.com

LLM Interview
Course
Want to Prepare yourself for an
LLM Interview?
120+ Questions spanning 14 categories
with Real Case Studies
Curated 100+ assessments for each
category
Well-researched real-world interview
questions based on FAANG & Fortune
500 companies
Focus on Visual learning
Certification

Coupon Code - LLM50


Coupon is valid till 30th May 2025
www.masteringllm.com

AgenticRAG with
LlamaIndex
Want to learn why AgenticRAG is
future of RAG?
Master RAG fundamentals through practical
case studies

Understand how to overcome limitations of RAG

Introduction to AgenticRAG & techniques like


Routing Agents, Query planning agents,
Structure planning agents, and React agents
with human in loop.

5 real-time case studies with code


walkthroughs
www.masteringllm.com

Benchmark Your
LLM Knowledge
Advanced GenAI Assessment
(MCQ)
Realistic interview scenarios based on actual
questions and insights from engineers at
Google, NVIDIA, AWS, Microsoft, Meta & More

Developed directly from founders personal


interview experiences at Google and NVIDIA.

Focus on Application, Not Just Theory : Every


question challenges you to think critically and
apply your knowledge to practical situations
involving design choices, trade-offs,
optimization, and problem-solving.

Costs you less than Coffee

You might also like