cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Getting started with adk

Open andycandy opened this issue 8 months ago • 7 comments

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?

andycandy avatar Apr 14 '25 12:04 andycandy

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Giom-V Could you please review this?

andycandy avatar Apr 14 '25 12:04 andycandy

You should also add a link in the examples/ README

Giom-V avatar Apr 23 '25 12:04 Giom-V

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

andycandy avatar Apr 23 '25 13:04 andycandy

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!

Giom-V avatar Apr 23 '25 17:04 Giom-V

Hi @andycandy - great job forging this example!

I added a small change suggestion on the notebook.

Also, I recommend, besides the echo agent, if you could build a real agent after the echo one (like the one I built at the Building one agentic solution in the IO live cooding notebook.

thanks! Luciano Martins.

lucianommartins avatar Jun 20 '25 13:06 lucianommartins

Hello @lucianommartins, thank you for the review.

Of course, I'd love to work on that one :)

andycandy avatar Jun 20 '25 13:06 andycandy