跳到正文
DEV Community· Hastimal Jangid·· 2 小時前AI 評分48

從 Gemini + Google ADK 到 AgentOps:打造以 Docker 為先、保障私隱的醫療 AI 平台

From Gemini + Google ADK to AgentOps: Building a Docker-First, Privacy-Safe Healthcare AI Platform

AI 導讀

開源項目 Gemini Healthcare Agentic Platform 結合 Gemini、Google ADK、MCP、Docker Compose 和 OpenTelemetry,打造可追溯、具私隱意識的醫療多智能體系統。系統由三個 Google ADK 智能體組成,透過 NPPES、PubMed 和 FHIR R4 蒐集證據,並要求沒有證據就不作聲稱。

正文

So proud to show my Google and Open Source AI + Containers community, how I combined Gemini, Google ADK, MCP, Docker Compose, and OpenTelemetry to build a grounded, observable healthcare multi-agent system

Open source project: https://github.com/hastimal/gemini-healthcare-agentic-platform


From a real healthcare question to a three-agent Google ADK workflow, privacy-safe OpenTelemetry tracing, and a Docker-based AgentOps stack


Building an AI agent that can answer a question is becoming easier.

Building one that is grounded, multi-agent, observable, privacy-aware, reproducible, and easy for another developer to run is a much more interesting engineering challenge.

That is what I have been exploring through my open-source project:

Gemini Healthcare Agentic Platform

The project started with a simple idea:

Go beyond a basic RAG workflow and build a healthcare agent system that can plan, retrieve, compare, ground, cite, and explain.

But as the platform evolved, another question became equally important:

How do we understand what the agents are actually doing once multiple model calls, tools, retrieval systems, and processing stages are involved?

That led to the current architecture built around:

  • Gemini
  • Google Agent Development Kit
  • Model Context Protocol
  • NPPES
  • PubMed
  • FHIR R4
  • Docker Compose
  • OpenTelemetry
  • Tempo
  • Prometheus
  • Grafana

This project also sits at the intersection of two areas I care deeply about.

For my Google Developer Expert journey, I am focusing on practical engineering patterns around Gemini, Google ADK, agent orchestration, grounding, tool use, MCP, evaluation, and responsible AI.

For my Docker Captain journey, I am focusing on reproducible AI environments, Docker Compose, local developer platforms, health checks, observability, and simple one-command experiences.

The interesting part is not any one technology.

It is how they work together.


Start With a Real Healthcare Question

The demo begins with a realistic healthcare discovery request:

Find three pediatric dentists in Houston for a child who is scared of going to the dentist. Compare them using trustworthy sources, provider credentials, services, and location, and explain why you selected each one.

This looks like a search query.

It is actually several different problems combined:

  • understand the intent
  • identify the specialty
  • identify the location
  • consider pediatric dental anxiety
  • find provider information
  • retrieve supporting evidence
  • compare candidates
  • rank evidence
  • cite sources
  • explain limitations

Trying to solve all of this with one large prompt is not the architecture I wanted.

Instead, I split the workflow into specialized Google ADK agents.


The Streamlit application exposes the real healthcare question, the three-agent workflow, evidence processing, and the AgentOps entry point


Three Google ADK Agents

The system contains exactly three Google ADK agents:

Search Planner Agent
        ↓
Healthcare Research Agent
        ↓
Evidence & Answer Agent

Each agent has a focused responsibility.

This made the workflow easier to reason about and, later, much easier to observe.


1. Search Planner Agent

The Search Planner Agent receives the original healthcare request and creates multiple focused research queries.

For example:

pediatric dentists Houston TX

pediatric dentist Houston dental anxiety scared child

board certified pediatric dentists Houston Texas

Houston pediatric dentist sedation behavior guidance

pediatric dental clinics Houston credentials services

I refer to this as query fan-out.

Conceptually:

                    ┌── Query 1
                    ├── Query 2
User Question → Planner ── Query 3
                    ├── Query 4
                    └── Query 5

Instead of treating the original question as one search string, Gemini helps create several targeted research paths.

This is one of the most interesting parts of the workflow for me.

The model is not simply generating the final response.

It is helping define the research strategy.


One healthcare question becomes multiple targeted research paths before retrieval begins


2. Healthcare Research Agent

The second agent is responsible for retrieving evidence.

The Healthcare Research Agent uses MCP-backed tools to work with sources including:

Healthcare Research Agent
        |
        +--> NPPES
        |
        +--> PubMed
        |
        +--> FHIR R4

Each source serves a different role.

NPPES provides provider registry information.

PubMed provides biomedical literature.

FHIR R4 provides a standards-based healthcare interoperability path.

One design principle guides the system:

No evidence → no claim.

The Research Agent retrieves evidence first.

The final answer should not simply be generated from model memory when relevant evidence can be retrieved.


3. Evidence & Answer Agent

The final Google ADK agent receives the retrieved evidence and produces the grounded result.

Its responsibilities include:

  • evidence selection
  • comparison
  • reasoning
  • citation
  • limitation handling
  • grounded synthesis

There is also an Evidence Ranking stage.

But this distinction is important:

Evidence Ranking is a processing stage, not a fourth agent.

The architecture remains exactly:

1. Search Planner Agent
2. Healthcare Research Agent
3. Evidence & Answer Agent

I prefer keeping the architecture understandable rather than creating a separate agent for every processing step.


Grounding Is More Than Adding Citations

Healthcare is a useful domain for demonstrating why evidence boundaries matter.

For example, NPPES can tell us that a provider exists and give registry information.

It does not prove that one provider is clinically better than another.

PubMed can provide relevant scientific evidence.

It does not prove that a specific provider offers a specific service.

The agent has to respect those boundaries.

That means grounding is not simply:

Find some sources and add links at the end.

It means understanding what each source can actually support.


Provider recommendations remain evidence-constrained, with citations and reasoning exposed instead of hidden behind a fluent response


Transparency Should Be Part of the Product

I also wanted the system to surface uncertainty.

The application therefore exposes limitations such as:

  • provider registry data should not be interpreted as proof of clinical quality
  • specific services may not have been independently verified
  • scientific literature may provide general context rather than provider-specific proof

A trustworthy agent should be able to communicate:

Here is what I know.

and also:

Here is what I could not verify.


The application makes uncertainty explicit instead of hiding it behind a confident model response


The Next Problem: How Do You Observe a Multi-Agent System?

Once the agents were working, the next engineering problem became obvious.

One user request can trigger:

User Question
      |
      v
Gemini
      |
      v
Search Planner Agent
      |
      v
Gemini
      |
      v
Healthcare Research Agent
      |
      +--> NPPES
      +--> PubMed
      +--> FHIR
      |
      v
Evidence Ranking
      |
      v
Gemini
      |
      v
Evidence & Answer Agent

At that point, application logs alone are not enough.

I want to know:

  • Which agent ran?
  • Which model call happened?
  • Which MCP tool executed?
  • How long did each stage take?
  • Was evidence actually retrieved?
  • Did a span get dropped?
  • Did an exporter fail?
  • Where did a workflow fail?

That is where the project moved from agent development toward AgentOps.


OpenTelemetry for Agent Workflows

I added OpenTelemetry tracing to the workflow.

Operational spans include examples such as:

workflow.gemini_healthcare_agentic_platform

adk.agent.search_planner_agent

adk.agent.healthcare_research_agent

adk.agent.evidence_answer_agent

gen_ai.model

mcp.provider_search

mcp.pubmed_search

mcp.fhir_search

Each workflow produces a Trace ID.

The Streamlit application displays that Trace ID directly.

Example:

OpenTelemetry Trace ID

3f1b56846b7c0496df2d768cfecfaa39

That creates a very useful connection:

User Experience
      ↓
Application
      ↓
Google ADK Workflow
      ↓
Trace ID
      ↓
Tempo / Grafana

Now the user-facing workflow and the engineering trace are connected.


AgentOps and Observability

Let's learn more about - AgentOps / Observability

Each healthcare workflow exposes its Trace ID and provides direct access to the local AgentOps tooling


Privacy-Safe Observability

Observability introduced another challenge.

During development, I found that framework-level tracing can contain much more than latency and status metadata.

Potentially sensitive fields can include things associated with:

gcp.vertex.agent.llm_request

gcp.vertex.agent.llm_response

gcp.vertex.agent.tool_call_args

gcp.vertex.agent.tool_response

In a healthcare-oriented application, exporting raw request and response content is not something I wanted.

Those payloads could potentially contain:

  • healthcare questions
  • prompts
  • model responses
  • provider names
  • retrieved documents
  • tool arguments
  • FHIR data

So I added an explicit privacy boundary.

Gemini + Google ADK
        |
        v
OpenTelemetry SDK
        |
        v
Privacy-Safe Span Exporter
        |
        v
OpenTelemetry Collector

The telemetry pipeline keeps operational metadata such as:

workflow.name

workflow.stage

agent.name

gen_ai.model.name

gen_ai.model.provider

retrieval.source_type

retrieval.result_count

mcp.tool.name

retry.count

error.type

while intentionally excluding:

healthcare question text

prompts

model responses

grounded answers

provider names

retrieved documents

FHIR patient data

tool arguments

tool responses

secrets

The design principle became:

Observe the execution, not the healthcare content.

This was one of the most important lessons from the project.


Google ADK UI: The Agent Development View

The local environment exposes the Google ADK development UI at:

http://localhost:8080

This gives a developer-oriented view into:

  • agent events
  • session state
  • tool execution
  • model interactions
  • workflow behavior
  • traces

That makes it excellent for debugging agent logic.


Google ADK’s local development UI exposes agent events, planner output, state, tool execution, and workflow behavior


This is an important distinction in the architecture.

I think of the two layers like this:

Google ADK UI
      ↓
Agent Development & Debugging


OpenTelemetry + Tempo + Prometheus + Grafana
      ↓
AgentOps & Operational Observability

Both are useful.

They solve different problems.


Docker Became Part of the Architecture

This is also where Docker became central.

The complete local environment includes:

Healthcare application

Google ADK UI

OpenTelemetry Collector

Tempo

Prometheus

Grafana

I did not want developers to manually install and configure each component.

The goal became:

./scripts/demo-docker.sh gemini

One command.


One command starts the complete Gemini + ADK + AgentOps environment and prints every application, debugging, and observability endpoint


The startup experience looks roughly like this:

Gemini Healthcare Agentic Platform READY

Google ADK Agents:
  1. Search Planner Agent
  2. Healthcare Research Agent
  3. Evidence & Answer Agent

Application:
  Healthcare UI: http://localhost:8501

Agent Development:
  Google ADK UI: http://localhost:8080

AgentOps / Observability:
  Grafana Dashboard: http://localhost:3000
  Grafana Explore:   http://localhost:3000/explore
  Prometheus:        http://localhost:9090
  Tempo:             http://localhost:3200

This is the part of the project that strongly connects with my Docker Captain journey.

Containers are not just how the application is packaged.

Docker becomes the local developer platform.


Docker Compose Runs the Full Stack

The core stack contains:

healthcare-app

otel-collector

tempo

prometheus

grafana

The application container exposes:

Streamlit UI :8501

Google ADK UI :8080

Application URLs

The observability stack exposes:

Grafana :3000

Prometheus :9090

Tempo :3200

OTLP HTTP :4318

OTLP gRPC :4317

Docker Compose gives the project:

  • reproducible environments
  • service networking
  • health checks
  • container lifecycle management
  • configuration
  • local observability
  • easy teardown

Tempo


Docker Compose runs the complete local platform: healthcare app, OpenTelemetry Collector, Tempo, Prometheus, and Grafana


For me, this is a strong example of why Docker matters for AI development.

A developer should not have to spend an hour configuring infrastructure just to evaluate an open-source AI project.

The ideal experience is:

git clone
    ↓
configure .env
    ↓
run one command
    ↓
working application

Health Checks Are Part of Developer Experience

One important Docker lesson is that:

docker compose up

does not necessarily mean:

The application is ready.

The local startup verifies service health for components such as:

  • Streamlit
  • Google ADK UI
  • OpenTelemetry Collector
  • Tempo
  • Prometheus
  • Grafana

The script only announces the platform as ready after the important services are available.

Small operational details like this dramatically improve demos and developer experience.


Grafana Gives the Operational View

The next layer is Grafana.

I provision the Grafana environment automatically.

The dashboard shows operational signals such as:

  • spans received
  • spans sent to Tempo
  • refused or dropped spans
  • exporter failures
  • Collector memory usage
  • telemetry pipeline health

This answers a simple but important question:

Is the AgentOps pipeline itself healthy?


The Grafana dashboard monitors the observability pipeline itself: spans received, spans exported to Tempo, dropped spans, exporter failures, and Collector health


The dashboard proves something important.

It is not enough for the agent to work.

The observability pipeline also has to work.


Grafana Explore Gives the Engineering View

The dashboard gives the high-level operational picture.

Grafana Explore provides the detailed engineering view.

Using Tempo, I can inspect individual traces.

A workflow trace might contain spans such as:

workflow.gemini_healthcare_agentic_platform

   ├── adk.agent.search_planner_agent
   │      └── gen_ai.model
   │
   ├── adk.agent.healthcare_research_agent
   │      ├── gen_ai.model
   │      ├── mcp.provider_search
   │      ├── mcp.pubmed_search
   │      └── mcp.fhir_search
   │
   └── adk.agent.evidence_answer_agent
          └── gen_ai.model

Now debugging becomes much more specific.

Instead of asking:

Why did the AI fail?

I can ask:

Did the planner run?

Which model call took longer?

Did NPPES retrieval execute?

Did PubMed return evidence?

Which MCP tool failed?

Did the final synthesis agent execute?

That is the difference between prompt debugging and system debugging.


Grafana Explore with Tempo turns a Trace ID into an inspectable distributed trace for individual agent workflows


Why This Matters for My GDE Journey

From the Google technology side, this project goes well beyond:

Call Gemini from Python.

It explores a broader developer architecture:

Gemini
   ↓
Google ADK
   ↓
Multi-Agent Orchestration
   ↓
Query Fan-Out
   ↓
MCP Tool Use
   ↓
Healthcare Retrieval
   ↓
Evidence Grounding
   ↓
Responsible AI
   ↓
Observability

The areas I want to continue exploring and sharing include:

  • Gemini architecture patterns
  • Google ADK orchestration
  • multi-agent workflows
  • tool use
  • MCP integrations
  • grounding
  • evaluation
  • responsible AI
  • reliability
  • production observability

These are exactly the kinds of practical engineering patterns I want to keep contributing to the Google developer community as part of my GDE journey.


Why This Matters for My Docker Captain Journey

Docker plays an equally important role in the project.

It turns several independent tools into one reproducible developer platform.

Without Docker, a developer would need to configure:

Application runtime

OpenTelemetry Collector

Tempo

Prometheus

Grafana

Networking

Health checks

Datasources

With Docker Compose:

./scripts/demo-docker.sh gemini

brings up the whole environment.

And:

./scripts/demo-docker-stop.sh

tears it down.

Docker is responsible for:

  • reproducibility
  • service orchestration
  • networking
  • health checks
  • configuration
  • local observability
  • simple startup
  • clean shutdown

That is the kind of practical developer experience I want to continue building and sharing as part of my Docker Captain journey.


Testing the System, Not Just the Prompt

I also wanted the project to demonstrate engineering discipline.

The observability and privacy test suite validates areas including:

  • OpenTelemetry configuration
  • ADK lifecycle tracing
  • privacy-safe span export
  • MCP retrieval tracing

The focused observability suite currently reports:

24 passed

The broader offline suite reports:

151 passed
5 skipped

I also executed real Gemini workflows through the Docker environment.

The resulting Trace IDs were successfully discoverable in Tempo.

Most importantly, the privacy audit confirmed that fields such as:

gcp.vertex.agent.llm_request

gcp.vertex.agent.llm_response

gcp.vertex.agent.tool_call_args

gcp.vertex.agent.tool_response

were not present in the exported traces.

The actual healthcare question and query fan-out text were also absent from Tempo.

For me, this is where the project moves from:

AI demo

toward:

AI engineering


The Architecture Today

The application workflow:

Healthcare Question
        |
        v
Search Planner Agent
        |
        +--> Query Fan-Out
        |
        v
Healthcare Research Agent
        |
        +--> MCP --> NPPES
        +--> MCP --> PubMed
        +--> MCP --> FHIR R4
        |
        v
Evidence Ranking
        |
        v
Evidence & Answer Agent
        |
        v
Grounded Answer

The AgentOps workflow:

Gemini + Google ADK
        |
        v
Privacy-Safe OpenTelemetry
        |
        v
OpenTelemetry Collector
        |
        +--> Tempo
        |
        +--> Prometheus
        |
        +--> Grafana

And Docker Compose ties the complete developer environment together.


What I Learned

A few lessons stand out.

1. Multi-Agent Systems Need Observability Early

Once multiple agents, tools, and model calls exist, debugging without traces becomes difficult very quickly.

Observability should not be the final production step.


2. Query Planning Should Be Visible

Showing query fan-out helps developers and users understand how the agent is reasoning about the problem.

Transparency matters.


3. Automatic Telemetry Needs Inspection

Framework instrumentation is useful.

It can also export much more than expected.

Always inspect what is leaving your application.


4. Privacy Should Be Architectural

Privacy should not depend on developers remembering:

Don't log this field.

A better model is:

Telemetry
    ↓
Privacy Boundary
    ↓
Approved Operational Metadata

5. Docker Is Part of the Product Experience

A good open-source AI project should be easy for another developer to run.

Containerization, health checks, networking, and startup automation are not secondary concerns.

They are part of the experience.


6. Agent Development and AgentOps Are Different

Google ADK UI helps me understand agent behavior.

Grafana, Tempo, Prometheus, and OpenTelemetry help me understand system behavior.

Both perspectives matter.


Closing Thoughts

There is a lot of excitement around Agentic AI right now.

But I think the next stage will increasingly focus on harder engineering questions:

Can we observe it?

Can we evaluate it?

Can we reproduce it?

Can we debug it?

Can we ground it?

Can we protect sensitive data?

Can another developer run it easily?

That is why I find the combination of Gemini, Google ADK, MCP, Docker, and OpenTelemetry so interesting.

Gemini provides reasoning.

Google ADK provides orchestration.

MCP provides structured tool connectivity.

Docker provides reproducibility.

OpenTelemetry provides visibility.

Tempo provides distributed traces.

Prometheus provides metrics.

Grafana provides operational understanding.

And privacy boundaries make the system safer to observe.

The goal is not simply to build agents that are intelligent.

The goal is to build agents that are:

grounded, observable, testable, reproducible, privacy-aware, and operationally understandable.

That is what I am continuing to explore through the Gemini Healthcare Agentic Platform, and what I hope to keep contributing back to both the Google developer and Docker communities.


Open Source Project

Gemini Healthcare Agentic Platform

https://github.com/hastimal/gemini-healthcare-agentic-platform

If you're working with Gemini, Google ADK, MCP, Docker, OpenTelemetry, AgentOps, or healthcare AI, I would love to compare architectures and learn what patterns are working for you.

來源:DEV Community · dev.to