Instruction
A unit of instruction provided to an LlmAgent.
Use one of the variants:
Text for a single literal string (most common).
Structured for a pre-built, possibly multimodal Content.
Provider for instructions that must be resolved per turn from a ReadonlyContext.
Convenience factories on the companion object allow the call sites Instruction("text"), Instruction(content), and Instruction { ctx -> ... }.
Inheritors
Types
Link copied to clipboard
A function that produces the instruction Content at turn time, given a ReadonlyContext.
Link copied to clipboard
A pre-built structured instruction, e.g. multimodal content.
Link copied to clipboard
A literal text instruction. Wrapped into a single Part at runtime.