Best way to get access to states inside prompt when running agents #710
-
I'm still struggling to understand what is the best way to do the above. Doing {{state.<<YOUR_KEY>>}} works and doesnt work.
Doing {{ctx.state.get...}} doesnt work What is the best way to do it? |
Beta Was this translation helpful? Give feedback.
Answered by
Jacksunwei
May 14, 2025
Replies: 1 comment
-
If you have a state key 'some_var', you can inject it into instruction via See a reference in: https://github.com/google/adk-python/blob/main/contributing/samples/memory/agent.py#L36 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Jacksunwei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a state key 'some_var', you can inject it into instruction via
{some_var}
.See a reference in:
https://github.com/google/adk-python/blob/main/contributing/samples/memory/agent.py#L36