pub trait InstructionProvider: Send + Sync {
// Required method
fn provide(&self, state: &State) -> String;
}Expand description
A dynamic instruction source — the ADK “instruction provider” pattern:
instead of a string fixed at build time, the instruction is produced
from live session state on every model request (persona switching,
risk-driven guardrails, multi-tenant instructions without rebuilding
the agent). Any Fn(&State) -> String closure is a provider.
Required Methods§
Implementations on Foreign Types§
Source§impl<T: InstructionProvider + ?Sized> InstructionProvider for Arc<T>
impl<T: InstructionProvider + ?Sized> InstructionProvider for Arc<T>
Implementors§
impl InstructionProvider for TemplateInstruction
Available on crate feature
templates only.