google adk adding context that can be cached
With Google ADK, we can easily add instruction via instructions settings but lets say we would like to add more context or pre-defined rules, perhaps safety rules - then we can use static_instructions And according to the docs: static_instruction : Optional [ types . ContentUnion ] = None """Static instruction content sent literally as system instruction at the beginning. This field is for content that never changes and doesn't contain placeholders. It's sent directly to the model without any processing or variable substitution. This field is primarily for context caching optimization. Static instructions are sent as system instruction at the beginning of the request, allowing for improved performance when the static portion remains unchanged. Live API has its own cache mechanism, thus this field doesn't work with Live API. **Impact on instruction field:** - When static_instruction is None: instruction ...