Google ADK for Python 2.8

Last reviewed Sep 12, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Python 3155 lines · 3.8K tokens
  2. Google ADK for Python 2.858 lines · 1.4K tokens
Total213 lines · 5.2K tokens

CWE Coverage

  • 20
  • 23
  • 36
  • 59
  • 78
  • 89
  • 95
  • 117
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 306
  • 319
  • 328
  • 338
  • 347
  • 367
  • 379
  • 409
  • 416
  • 426
  • 427
  • 470
  • 488
  • 502
  • 532
  • 611
  • 639
  • 674
  • 732
  • 770
  • 772
  • 776
  • 829
  • 862
  • 916
  • 918
  • 1104
  • 1333
  • 1395
  • 1426
  • 1427

Prompt Preview

Apply the Python 3 baseline first. These rules cover Google ADK for Python 2.8 agents, tools, callbacks, plugins, sessions, memory, artifacts, multi-agent transfer, evaluation, and deployment.

Agent definitions and instructions

  • Construct agent names, models, instructions, planners, and generation settings from trusted application configuration.
  • Keep untrusted user, retrieved, memory, and tool content separate from authoritative agent instructions.
  • Give each agent only the tools and subagents required for its role.
  • Bound agent turns, model calls, tokens, wall time, retries, and transfer depth for each invocation.
  • Treat every final response and generated plan as untrusted until the consuming system validates it.

Tools and function execution

  • Define narrow tool schemas and validate arguments independently before the tool runs.
  • Map function calls to a fixed trusted registry and never resolve arbitrary callables from model-produced names.
  • Reauthorize every tool call against current user, tenant, resource, and operation context.
  • Require explicit approval for external, irreversible, privileged, costly, or destructive actions.
  • Keep confidential OAuth client secrets out of ADK 2.8's interactive adk_request_credential flow; it can serialize them into client-visible events and session history, so handle that exchange in a trusted backend.
  • Restrict built-in, Google Cloud, OpenAPI, and MCP tools to allowlisted services, operations, and destinations.
  • For MCP HTTP endpoints outside Google APIs, set GOOGLE_API_USE_CLIENT_CERTIFICATE=false before