omarcevi.dev / workshops / devfest-samsun-agent

DevFest Samsun 2026 · Hands-on lab · about 20 minutes

Deploy your first AI agent to Google Cloud

Part of The Google Cloud Stack for Production AI Agents by Omar Elcircevi

You'll take a ready-made agent, the DevFest Samsun Assistant, and run it in Cloud Shell. Then you'll deploy it to Agent Runtime on Google Cloud and explore it in Agent Platform. You don't write any code, and you don't install anything on your laptop.

What you need

  • A laptop with a browser. Chrome works best.
  • A personal Google account (Gmail). Work and school accounts often block Cloud Shell or credits.
  • The credit link in Step 1.

The agent

The DevFest Samsun Assistant answers questions about this event's real schedule: which talks are on, when, and on which floor. It's built with Google's Agent Development Kit (ADK). It has one Gemini model, one instruction and a few Python functions it can call as tools.

DevFest Samsun Assistant lab architecture. (1) The participant opens Cloud Shell in the browser, clones the devfest-samsun-assistant repo and runs ./lab/setup.sh, which enables the APIs, installs the packages with uv and writes .env. (2) adk web on port 8080 opens the ADK dev UI through Web Preview. (3) Locally, the ADK agent samsun_assistant calls gemini-3.6-flash on Agent Platform, location global, and its Python tools search_sessions, get_session, submit_feedback and get_current_time, which read data/agenda.json. (4) agents-cli deploy --agent-identity -i deploys the same code to Agent Runtime in us-central1 as devfest-samsun-assistant, with Sessions, Memory Bank and its own Agent Identity. The deployed agent also calls Gemini. (5) The participant opens it in the Agent Platform console under Agents, Deployments: Playground, Sessions and Memories. (6) Spans go to Cloud Trace, where Trace explorer shows invoke_agent, generate_content and execute_tool.
What each participant runs and deploys in their own project. Click or tap the diagram to see it at full size.

The steps

Step 1: Get your credits and a project

5 min
1

Open the credit link while signed in with your personal Google account: [CREDIT_LINK]

2

Follow the page to accept the credits. This creates a billing account that uses them.

3

Open the Google Cloud console: https://console.cloud.google.com

4

Create a project:

  1. Click the project picker at the top of the page, then New project.
  2. Project name: devfest-samsun-agent
  3. Billing account: pick the one with your credits.
  4. Click Create.
5

Note your Project ID. It's shown under the name and may have numbers added, for example devfest-samsun-agent-482913.

✅ CheckThe top bar of the console shows your new project.

Step 2: Open Cloud Shell and get the code

3 min

Open in Google Cloud Shell →

Open in Cloud Shell: it clones the repo and opens a step-by-step tutorial next to the terminal.

In the Open in Cloud Shell dialog, tick Trust repo and click Confirm. If you do not select Trust repo, Cloud Shell runs in ephemeral mode and deletes your files when the session ends. Cloud Shell clones the repo to ~/cloudshell_open/devfest-samsun-assistant, opens the terminal in that folder and the tutorial panel on the right. If asked, click Authorize.

With the button you skip git clone and cd: follow the tutorial panel. Its first step runs gcloud config set project, ./lab/setup.sh and source ~/.profile.

Or do it by hand

1

Click Activate Cloud Shell (the >_ icon) at the top right of the console. If asked, click Continue and then Authorize.

2

Point Cloud Shell at your project. Replace YOUR_PROJECT_ID with your Project ID:

gcloud config set project YOUR_PROJECT_ID
3

Get the code and run the setup script:

git clone https://github.com/omarcevi/devfest-samsun-assistant.git
cd devfest-samsun-assistant
./lab/setup.sh
source ~/.profile

The script:

  • checks that billing is linked to your project
  • turns on the Google Cloud APIs this lab needs
  • installs the agent's Python packages and the Agents CLI
  • writes a .env file so the agent uses Gemini in your project

It takes 1–2 minutes. The last line, source ~/.profile, makes your shell use the Agents CLI version the script just installed (Cloud Shell ships an older one).

✅ CheckThe script ends with ✅ Ready. If it stops with an error, the message says what to fix. See also Troubleshooting at the end.

Step 3: Talk to your agent locally

5 min
The agent loop in the ADK dev UI. (1) You ask: Which talks are about AI agents? The question goes to samsun_assistant, which runs in Cloud Shell, where gemini-3.6-flash reads it together with the tool list. (2) The model calls the tool search_sessions. The dev UI shows this as a ⚡ search_sessions chip. The Python function reads agenda.json. (3) The result goes back to the model. The dev UI shows it as a ✓ search_sessions chip. (4) The model answers with the talk, speaker, day, time and floor, for example: The Google Cloud Stack for Production AI Agents, Omar Elcircevi, Saturday, 10:30, Kat 1. The instruction makes it call get_current_time first and recommend at most 3 sessions that the tools return.
The agent loop: each ⚡ / ✓ pair of chips in the dev UI is one tool call and its result.
1

Start the ADK dev UI:

uv run adk web --port 8080 --allow_origins "*"

--allow_origins "*" lets the Cloud Shell Web Preview page talk to the dev UI. Without it the page stays blank.

2

At the top of Cloud Shell, click Web preview (the eye icon), then Preview on port 8080. A new tab opens.

3

In the top-left dropdown, check that the agent app is selected.

4

Ask it something:

  • Which talks are about AI agents?
  • What's on Kat 2 tomorrow?
  • Yarın Flutter ile ilgili hangi konuşmalar var?

The first answer can take 20–40 seconds.

5

Above each answer you'll see small chips: ⚡ search_sessions is a tool call, ✓ search_sessions is its result. Click one to see the arguments and the result in the left panel. That's the agent loop: the model picks a tool, reads the result, then answers.

6

Go back to Cloud Shell and press Ctrl+C to stop the dev UI.

💡 OptionalSee the whole agent with cloudshell edit app/agent.py. It's under 30 lines.

Step 4: Deploy it to Agent Runtime

2 min to start, 5–10 min to finish
What agents-cli deploy --agent-identity -i does. In Cloud Shell, agents-cli asks Proceed? [Y/n] and packages the project folder: app/, Dockerfile and .env. (1) It uploads the code. (2) A container build runs in a Google-managed project. (3) It creates the Agent Runtime instance devfest-samsun-assistant in us-central1: a container with ADK and FastAPI that scales to zero when idle, Sessions and Memory Bank managed by Agent Runtime, and its own Agent Identity, principal://agents.global.proj-PROJECT_NUMBER.system.id.goog/…. (4) The identity gets IAM roles on your project, such as Agent Platform user, Logging writer and Monitoring writer. (5) After about 5 minutes, Cloud Shell shows Deployment successful! with the agent ID and its Agent Identity.
What one deploy command creates. It takes about 5 minutes and keeps running if Cloud Shell disconnects.

Run:

agents-cli deploy --agent-identity -i
  • It asks Deploying to Google Cloud project 'YOUR_PROJECT_ID'. Proceed? [Y/n]. Check that it's yours and press Enter. (-i turns this prompt on; without it, the command stops and asks you to name the project.)
  • You can ignore the warning about npx.
  • It packages your code, uploads it and creates a managed agent that scales on its own.
  • --agent-identity gives your agent its own identity in IAM, instead of a shared service account.
  • It takes about 5 minutes. Leave it running and watch the demo on stage while you wait.
✅ CheckThe output shows ✅ Deployment successful!, followed by your agent's ID and its Agent Identity.

The deploy keeps running on Google Cloud even if Cloud Shell disconnects. Click Reconnect, go back to the repo folder (cd ~/cloudshell_open/devfest-samsun-assistant if you used the Cloud Shell button, cd devfest-samsun-assistant if you cloned by hand), then check progress with:

agents-cli deploy --status

Step 5: Meet your agent in Agent Platform

5 min
Memory across sessions, and the trace of one turn. (1) In Playground session 1 you say: Hi! I'm into ML and Flutter. What should I see tomorrow? After the answer, the after_agent_callback save_to_memory sends the session to Memory Bank, which extracts the fact that the user is into ML and Flutter, in about 30 seconds. (2) In a New Session you ask: What should I see tomorrow? PreloadMemoryTool adds the fact before the model call, and the agent picks ML and Flutter talks without asking again. Below, Trace explorer shows one turn: an invoke_agent samsun_assistant span that contains retrieve_memories, three generate_content gemini-3.6-flash calls, execute_tool get_current_time, execute_tool search_sessions and save_memories. Timings are illustrative.
Memory Bank across Playground sessions, and the spans you find in Trace explorer.
1

In the console's search bar, type Agent Platform and open it. In the left menu, click Agents, then Deployments (under Scale).

2

Click your agent: devfest-samsun-assistant. If a pop-up says an API isn't enabled, click Close.

3

Playground: chat with your deployed agent. Try:

  • Hi! I'm into ML and Flutter. What should I see tomorrow?
  • Wait about 30 seconds, click New Session and ask What should I see tomorrow?. Does it remember what you like? That's Memory Bank.
  • The first answer can take up to a minute while your agent wakes up.
  • In the Playground, click a ⚡ chip to see the tool call, and State on the left to see what the agent kept in its session.
4

Sessions tab: every conversation you just had, stored by Agent Runtime.

5

Memories tab: the facts Memory Bank kept about you, such as your interest in ML and Flutter.

6

Traces: in the console's search bar, type Trace explorer and open it. Each row is one step of your agent: invoke_agent, generate_content (a Gemini call) and execute_tool (a tool call). Click one to see the timeline, the same view Omar showed on stage. Traces show up a minute or two after you chat.

You've now seen the questions from the talk answered on your own agent:

  • where it runsAgent Runtime
  • what it remembersSessions and Memory Bank
  • who it acts asits Agent Identity
  • what it's doingTrace

Step 6: Clean up

1 min

Your credits are limited. When you're done, delete the agent:

./lab/cleanup.sh

You can also shut down the whole project: in the console, go to IAM & Admin › Settings › Shut down.

You can keep the agent until the end of DevFest on Sunday if you want to play with it more.

No laptop?

Use the shared assistant on your phone: omarcevi.dev/demos/devfest-samsun-agent

Troubleshooting

What you see
What to do
The setup script says billing isn't linked
In the console, go to Billing › Link a billing account, pick your credits account, then run ./lab/setup.sh again.
PERMISSION_DENIED or "API not enabled" right after setup
New APIs can take a minute to turn on. Wait, then try again.
429 or RESOURCE_EXHAUSTED
You hit a Gemini rate limit. Wait 30 seconds and try again.
Web preview shows an error page
Check that adk web is still running in Cloud Shell and that you used port 8080.
Web preview shows a blank page
Stop adk web with Ctrl+C and start it again with --allow_origins "*", as in Step 3.
Cloud Shell says the session ended
Click Reconnect, then run cd ~/cloudshell_open/devfest-samsun-assistant (Cloud Shell button) or cd devfest-samsun-assistant (cloned by hand).
agents-cli: confirmation required
Add -i to the deploy command, as shown in Step 4.
agents-cli --version doesn't say 1.11.0
Run source ~/.profile. Cloud Shell has an older Agents CLI built in; this switches to the one setup.sh installed.
A warning that npx isn't installed
Ignore it.
A pop-up says apphub.googleapis.com isn't enabled
Click Close. It doesn't affect the lab.
The deploy fails
Copy the last lines of the error and raise your hand.

Learn more