![]() |
VOOZH | about |
Google’s Agent Development Kit (ADK) is a useful framework for creating autonomous AI agents. Unlike simple chatbot frameworks, ADK allows developers to build agents that can interact with text, images and PDFs, while maintaining session memory and handling multi-modal inputs.
We’ll build a StudyBuddy, an AI tutor that can answer questions, analyze PDFs, describe images and provide explanations with examples. The agent will be interactive and session-based, allowing users to ask multiple questions in a single session. Let's build our agent:
We need to install the necessary packages for our model such as google-adk, google-genai, PyPDF2, pillow.
We need to import the necessary libraries for our agent such as LlmAgent, Runner, InMemorySessionService, types.
We need to setup the our API key for agent, we will be using Gemini API key.
Here:
We will:
Runner acts as a bridge between the user and the agent. Handles asynchronous queries and ensures responses are properly formatted.
Starts the session and begins the interactive AI tutor loop.
a. Text Question:
b. Image:
Used sample can be downloaded from here.
c. PDF:
Used sample can be downloaded from here.
The complete code can be downloaded from here.