API Reference¶
Welcome to the GEPA API Reference. This documentation is auto-generated from the source code docstrings.
optimize_anything¶
The primary public API for GEPA. Optimize any text artifact with LLM-guided evolution — bring a seed candidate and an evaluator, and GEPA handles the rest.
optimize_anythingGEPAConfigEngineConfigReflectionConfigMergeConfigRefinerConfigTrackingConfigEvaluatorOptimizationStateLogContextlogget_log_contextset_log_contextmake_litellm_lm
Core¶
The core module contains the main optimization function and fundamental classes.
Callbacks¶
Callback system for observing and instrumenting GEPA optimization runs.
GEPACallbackCompositeCallbackOptimizationStartEventOptimizationEndEventIterationStartEventIterationEndEventCandidateSelectedEventCandidateAcceptedEventCandidateRejectedEventEvaluationStartEventEvaluationEndEventValsetEvaluatedEventParetoFrontUpdatedEventMergeAttemptedEventMergeAcceptedEventMergeRejectedEventBudgetUpdatedEventErrorEventStateSavedEvent
Stop Conditions¶
Stop conditions control when optimization terminates.
StopperProtocolMaxMetricCallsStopperTimeoutStopConditionNoImprovementStopperScoreThresholdStopperFileStopperSignalStopperCompositeStopper
Adapters¶
Adapters integrate GEPA with different systems and frameworks.
Proposers¶
Proposers generate new candidate programs during optimization.
CandidateProposalProposeNewCandidateReflectiveMutationProposerMergeProposerSignatureLanguageModel
Logging¶
Logging utilities for tracking optimization progress.
Strategies¶
Strategies for various aspects of the optimization process.