google / google/adk-docs

[Doc] before_agent_callback incorrectly assumes that invocation_context can be modified.

Open
#372 1 comment 1 reaction 0 assignees View on GitHub
callbacks
Dominant language
Shell
Stars
1.5k
Forks
1.3k
Avg merge
7d 1h
Merged PRs (30d)
34

Description

Under https://google.github.io/adk-docs/callbacks/types-of-callbacks/#before-agent-callback:

It specifies that "Before Agent Callback" is "Ideal for setting up resources or state needed only for this specific agent's run, performing validation checks on the session state (callback_context.state) before execution starts, logging the entry point of the agent's activity, or **potentially modifying the invocation context before the core logic uses it.**"

However, SingleBeforeModelCallback is typed with CallbackContext which is ReadOnly.

Should the documentation be updated is there something I'm missing with the before agent callback method?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.