OptimizeAnythingConfig
gepa.optimize_anything.OptimizeAnythingConfig(engine: str | Engine = 'gepa', name: str | None = None, max_evals: int | None = 100, max_token_cost: float | None = None, max_concurrency: int = 8, output_dir: str | Path | None = None, run_dir: str | None = None, stop_at_score: float | None = None, sandbox: bool = True, engine_config: dict[str, Any] = dict()) dataclass
Configuration for :func:gepa.optimize_anything.optimize_anything.
Attributes:
| Name | Type | Description |
|---|---|---|
engine | `str | Engine` |
name | `str | None` |
max_evals | `int | None` |
max_token_cost | `float | None` |
max_concurrency | int | Eval server thread-pool size. |
output_dir | `str | Path |
run_dir | `str | None` |
stop_at_score | `float | None` |
sandbox | bool | OS-jail the subprocess engines' claude sessions (bwrap on Linux — requires the bubblewrap package — Claude Code's Seatbelt sandbox on macOS). Default True. Linux runs abort at engine start when bwrap is missing; False prints a loud warning and runs the agent unsandboxed with full host access. |
engine_config | dict[str, Any] | Engine-specific options that don't generalize across engines. Each engine reads the keys it understands and warns about leftovers so typos surface. The keys an engine accepts are enumerated in that engine's class docstring: - gepa — a GEPAConfig-shaped dict, passed through 1-to-1. Its accepted keys are the live fields of :class:~gepa.gepa_launcher.GEPAConfig (engine, reflection, merge, refiner, tracking, callbacks, stop_callbacks); the OA layer only overlays the budget/run_dir/cost-cap and merges its own callbacks. Set the reflection LM, wandb/mlflow tracking, reasoning knobs (via reflection.reflection_lm_kwargs, e.g. reasoning_effort / thinking), and (via reflection.custom_candidate_proposer) a Claude Code proposer here — see :class:~gepa.oa.engines.gepa.GepaEngine. - autoresearch — model, ralph, max_no_eval_seconds, handoffs, effort, max_thinking_tokens (see AutoResearchEngine / _AR_CONFIG_KEYS). - best_of_n — model, temperature, max_n, lm_kwargs, effort, max_thinking_tokens (see BestOfNEngine / _BON_CONFIG_KEYS). - meta_harness — model, max_iterations, max_candidates_per_iter, effort, max_thinking_tokens (see MetaHarnessEngine / _MH_CONFIG_KEYS). effort (claude --effort) and max_thinking_tokens are Claude-CLI knobs, so they live in each agent engine's engine_config; the gepa engine takes reasoning knobs through reflection.reflection_lm_kwargs instead. |