Google ADKgoogle-adk 2.8 · Python 3.10+
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
28 small wins to finish your pathNext lesson

What you are going to build

ADK is Google's toolkit for building agents in code. This course builds one support agent with it, a piece at a time, and every piece runs on your machine without a cloud project or an API key.

An agent here is an object with a model, an instruction and a list of tools. ADK runs the loop around it: send the question to the model, run whatever tool it asks for, send the result back, and repeat until there is an answer. Everything else in the toolkit is a way of shaping that loop.

The agent by the end

It looks up orders, keeps what it learns in the conversation's own state, hands billing questions to a second agent, and refuses an expensive refund until a person has approved it. Here is the first version of it, running.

The agent, and one question put to it. The two helpers it uses, run and show, are the ones you write yourself in lessons 3 and 4, so they are left out here.

Example
agent = LlmAgent(
    name="support",
    model=PretendModel(replies=[call("lookup_order", order_id="A17"),
                                say("Your order shipped on 3 March.")]),
    instruction="Help customers with their orders.",
    tools=[lookup_order],
)

async for event in run(agent, "Where is order A17?"):
    show(event)

Three lines of output for one question: the model asked for a tool, ADK ran the function, and the model answered from the result. That is the whole loop, and the rest of this course is what you can do to it.

What you will have built

PieceWhat it does
ToolsOrdinary Python functions the model can choose to call
A stand-in modelTwenty lines, so every lesson runs without a key
Sub agentsA second agent that takes over billing questions
Workflow agentsSteps in a fixed order, in parallel, or in a loop
Session stateWhat the agent knows while the conversation is going
MemoryWhat it still knows next time
CallbacksCode that runs before and after each step

What you need before you start

One install, and nothing else.

bash
pip install google-adk
Needed for this course?When you do need it
Python 3.10 or laterYesNow
A Gemini API keyNoLesson 23, when you swap in a real model
A Google Cloud projectNoOnly if you deploy, which this course names rather than teaches
A .env fileNoLesson 23. It holds the key, and it goes next to your agent

The reason a key is not needed is lesson 4, where you write a twenty line stand-in model. ADK reaches a model through one method, so anything that provides it counts as a model, and the whole toolkit works normally around it: tools, transfers, state, workflows, callbacks.

When you are ready for a real model, lesson 25 is one line of code and one line in a .env file. Nothing else in anything you wrote has to change.

How this course is written

Every snippet on these pages was run against google-adk 2.8 in a real Python environment, and the output shown is what came back. Nothing is typed by hand.

Why there is no editor here
There is no run button on these pages. ADK depends on a package that has no pure Python build, so it cannot install in a browser the way the other courses on this site do. Copy the snippets into a file and run them locally instead, which takes one install and no account.
Try it yourself
  • Install ADK now, so the next lesson is one command instead of two.
  • Read the loop output above once more and name which line the model produced.
Back toAll frameworks

Every expert started right here.