Google ADK for Go 2.6

Last reviewed Oct 25, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Go 1.27130 lines · 5.5K tokens
  2. Google ADK for Go 2.653 lines · 2.3K tokens
Total183 lines · 7.8K tokens

CWE Coverage

  • 15
  • 20
  • 22
  • 59
  • 78
  • 79
  • 89
  • 94
  • 117
  • 190
  • 201
  • 208
  • 209
  • 250
  • 252
  • 257
  • 287
  • 295
  • 307
  • 323
  • 327
  • 338
  • 345
  • 347
  • 352
  • 362
  • 367
  • 378
  • 426
  • 444
  • 488
  • 489
  • 494
  • 532
  • 639
  • 732
  • 759
  • 770
  • 772
  • 807
  • 841
  • 862
  • 863
  • 915
  • 916
  • 918
  • 922
  • 942
  • 1004
  • 1275
  • 1395
  • 1426
  • 1427

Prompt Preview

Apply the Go 1.27 baseline first. These rules target the google.golang.org/adk/v2 2.6 release line, checked against v2.6.0. Its go.mod declares Go 1.26.6; review the deployed toolchain separately from the module.

Agent and instruction boundaries

  • Construct llmagent.Config models, instructions, generation settings, tools, toolsets, and subagents from trusted configuration. Treat user, document, memory, tool, skill, and remote-agent content as data; prompt injection in any of it must not become trusted instruction or authorization.
  • Keep untrusted session state and artifact text out of authoritative Instruction and GlobalInstruction templates: {key} and {artifact.name} insert their contents. Use InstructionProvider for literal braces and validate any values the provider inserts.
  • Put shared instructions on the root agent, whose GlobalInstruction takes effect. Review instruction providers that override static instructions, and enforce access policy in handlers instead of relying on model obedience.
  • Minimize Tools, Toolsets, and SubAgents; set DisallowTransferToParent and DisallowTransferToPeers when routing is unnecessary. Recheck the receiving agent's principal and resource permissions after any transfer.
  • Validate OutputSchema and OutputKey values before output handling in HTML, queries, commands, storage, or external actions. OutputSchema still permits tool calls through set_model_response; neither its shape nor stored model output grants authority.

Tool calls and human input

  • Define bounded argument and result schemas