docs(redis): Quick Start snippet in src/google/adk/integrations/redis/README.md passes invalid Agent(instructions=...) kwarg

Offen
#8,247 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

@sanketpatil06 arbeitet bereits daran.

Seit 19.11.2026.

  • #8249 von @prassu017 — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

models

Describe the Bug:
In src/google/adk/integrations/redis/README.md (lines 45–48, under ## Quick Start), the runnable Quick Start snippet constructs Agent with instructions= (plural) instead of instruction= (singular). Because LlmAgent sets extra="forbid", running the Quick Start snippet immediately fails with a Pydantic ValidationError on both google-adk==2.14.1 and main (9eb6d9d9).

Steps to Reproduce:

  1. Run the adk-verify-snippets script (or copy-paste the ## Quick Start block from src/google/adk/integrations/redis/README.md lines 31–56):
    uv run --python 3.12 --with "google-adk==2.14.1" --with "redis" \
      python .agents/skills/adk-verify-snippets/scripts/verify_md.py \
      src/google/adk/integrations/redis/README.md
    
  2. Observe Phase 1 load failure on Snippet 1 (Quick Start).

Expected Behavior:
The Quick Start snippet uses instruction="You are a helpful AI assistant." and loads cleanly (Agent + Runner instantiate without error).

Observed Behavior:

File "snippet_1_quick_start.py", line 14, in <module>
  agent = Agent(
pydantic_core._pydantic_core.ValidationError: 1 validation error for LlmAgent
instructions
  Extra inputs are not permitted [type=extra_forbidden, input_value='You are a helpful AI assistant.', input_type=str]
    For further information visit https://errors.pydantic.dev/2.14/v/extra_forbidden

Changing line 47 from instructions= to instruction= allows the entire Quick Start snippet (RedisSessionServiceConfig, RedisSessionService, Agent, Runner) to load cleanly.

Environment Details:

  • ADK Library Version: google-adk 2.14.1 (also reproduced against main 9eb6d9d9), redis 8.1.0
  • Desktop OS: macOS (Darwin arm64)
  • Python Version: 3.12.13

Model Information:

  • Are you using LiteLLM: N/A (fails offline during Agent(...) construction)
  • Which model is being used: N/A

Note: Audited with .agents/skills/adk-verify-snippets and drafted with AI assistance; all commands and outputs were run locally offline.

Vorherrschende Sprache
Python
Sterne
22.3k
Forks
4.4k
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus google/adk-python

Alle Issues in google/adk-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.