Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Verify a synthetic patient before lab-prep instructions

Collect identity over multiple turns, route on a mock identity check, then confirm an order lookup before generating preparation instructions.

Goal

Complete identity intake and a mock order lookup for a synthetic patient, producing preparation guidance tied to the returned orders.

Steps

  1. Define PatientIdentity with name and phone_number; use mode="task" and output_schema to collect both fields before advancing. [src-google-verify-patient-identity-before-lab-prep-instructions]
  2. Pass the structured identity to check_identity; route a mock miss back to intake_agent and a Jane Doe match to generate_instruction. [src-google-verify-patient-identity-before-lab-prep-instructions]
  3. Set require_confirmation=True on find_orders; confirm the mock lookup, then generate concise preparation instructions from its returned orders. [src-google-verify-patient-identity-before-lab-prep-instructions]

How to verify

Try the Jane Doe and John Doe examples: Jane should receive mock orders and preparation text after confirmation; John should return to intake. Missing phone_number should trigger another question.

Troubleshooting

If identity checking runs with a missing field, inspect PatientIdentity.output_schema and task mode. If Jane Doe has no orders, check the mock find_orders data; do not connect a real patient database.

Permissions

Prerequisites

Permissions

Limitations

Identity checking uses mock database logic; the Jane Doe branch only demonstrates routing. Generated preparation text is not a medical order or clinical advice.

Pinned upstream source

https://github.com/google/adk-python/blob/2d0eb955972803781d209a45d71b958b2c8addef/contributing/samples/workflows/agent_in_workflow/README.md

Repository
google/adk-python
File path
contributing/samples/workflows/agent_in_workflow/README.md
Pinned commit
2d0eb955972803781d209a45d71b958b2c8addef
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: Apache-2.0

Main topic

Make Agent behavior safer and easier to verify

Related resources