A before_agent_callback which changes the state results in an empty Event being returned
Open
agent engine
request clarification
- Dominant language
- Python
- Stars
- 21.5k
- Forks
- 4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 37
Description
[This code](https://github.com/google/adk-python/blob/54274cdeba42a46e4346f48589c84fe2ebcc0da2/src/google/adk/agents/base_agent.py#L559) forces the end of the turn and results in an empty event being returned if there are state changes.
This prevents these callbacks from doing any kind of processing that result in state changes. It's not clear what's the purpose of this logic. This behavior is [not documented](https://adk.dev/callbacks/types-of-callbacks/#before-agent-callback).
Contributor guide
Assessment
This issue has not been assessed yet.