Agent Optimizer
Common contract for agent optimizers: algorithms that improve a GraphAIAgent by learning from execution trajectories collected over a training dataset.
An implementation runs in two phases. train executes the base agent over a dataset, scores the trajectories with a caller-supplied metric, and persists optimizer-specific artifacts to disk. loadOptimizedAgent then reads those artifacts and applies them to a base agent.
Parameters
Input
the agent input type.
Output
the agent output type.
Input Label
the golden-label type associated with each dataset item (see TrainSetItem).
Inheritors
Functions
Link copied to clipboard
Link copied to clipboard
Trains the agent using the provided session, which gives access to a TrainingSession.use block where the training scope (agent, dataset, tracked execution methods) is available.