Skip to content

Getting started with adk #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

andycandy
Copy link
Collaborator

Related Issue

Closes #708

Description

This PR adds the first ADK example notebook (Getting_started_with_ADK.ipynb) to the examples/google-adk/ directory set up in #709.

Purpose

  • Introduces basic ADK usage for stateful workflows involving Gemini.
  • Demonstrates core components (Agent, Tool, State, Runner) in action.
  • Serves as the initial example for the google-adk section.

What's in the notebook (Getting_started_with_ADK.ipynb)

It walks through a simple 'Stateful Echo Agent'. The agent echoes input but uses an ADK FunctionTool (and ToolContext) to update its status (START -> PROCESSING -> END) in the SessionState. So, it shows the core LlmAgent (with Gemini), Tool, State, and Runner working together in a basic way.

When reviewing, could you check if:

  • The basic ADK setup and the state-tracking workflow make sense?
  • Is it clear enough for someone new to ADK?
  • Does it fit the general style of the cookbook examples?

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels Apr 14, 2025
@andycandy
Copy link
Collaborator Author

@Giom-V Could you please review this?

@Giom-V Giom-V self-assigned this Apr 23, 2025
Copy link
Collaborator

@Giom-V Giom-V left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @andycandy. Thanks for this guide as I'm curious about ADK but did not have the time to actually try it yet.

I think it's a good intro to ADK, but TBH I think the main issue is that it's not clear what ADK brings that classic function calling cannot do. But it's not an easy question to answer so we can keep it as it is now.

"source": [
"from google.colab import userdata\n",
"import os\n",
"from dotenv import load_dotenv\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure you really need dotenv in this case. What does it bring you?

Copy link
Collaborator Author

@andycandy andycandy Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't explain what it does, the adk as you can see, can access the gemini models, right? But if you pay attention we never gave it any API keys, it's not a mistake, but it's just how ADK is supposed to work, you load your API in the environment with a specific variable name, and ADK picks up API key from there. TBH I wasn't also a fan of this, google-genai handles this much more gracefully

@Giom-V
Copy link
Collaborator

Giom-V commented Apr 23, 2025

You should also add a link in the examples/ README

@andycandy
Copy link
Collaborator Author

Hello @andycandy. Thanks for this guide as I'm curious about ADK but did not have the time to actually try it yet.

I think it's a good intro to ADK, but TBH I think the main issue is that it's not clear what ADK brings that classic function calling cannot do. But it's not an easy question to answer so we can keep it as it is now.

Hey @Giom-V, really glad you came to check this. A few days ago, I proposed a notebook (#715) that focuses specifically on demonstrating how ADK improves on classic function calling.

While there are many advantages, the core idea I wanted to highlight in that proposal was ADK's ability to handle actions asynchronously. The workflow I outlined shows how ADK can orchestrate multiple tool calls without blocking, making it especially powerful in more dynamic or multi-step application flows.
Here is the copy of workflow image I drafted

Image

@Giom-V
Copy link
Collaborator

Giom-V commented Apr 23, 2025

Hey @Giom-V, really glad you came to check this. A few days ago, I proposed a notebook (#715) that focuses specifically on demonstrating how ADK improves on classic function calling.

Nice, I'll check it tomorrow!

@andycandy andycandy requested a review from Giom-V April 24, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Integrating google-adk in examples folder for showcasing demos
2 participants