---
schema_version: "2.1.0"
slug: "gepa"
record_version: "2026-11-25.1"
record_status: "draft"
verification_status: "primary_source_check_pending"
content_sha256: "485b963650a7bc49501d56014d232a0b6cfb0f60aefbd6d37e08d15b5b7ecb0a"
modifies: [prompt]
improves_improver: false
learning_signal_types: [execution_trace, automated_grader, benchmark_metric]
framework_dependency: "standalone_library"
requires_framework_migration: "no"
license_spdx: "MIT"
variants: [gepa-offline-optimizer]
citation_id: "koobo:agent-learning:gepa@2026-11-25.1"
canonical_url: "https://koobo.co/agent-learning/methods/gepa"
json_url: "https://koobo.co/agent-learning/methods/gepa.json"
versioned_url: "https://koobo.co/agent-learning/methods/gepa/v/2026-11-25.1.json"
---

# GEPA

> Status: Draft record 2026-11-25.1 (primary-source check pending; drafted 2026-11-25).
> Authority notice: This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.

Reflects on execution trajectories and searches bounded behavioral prompt components using Pareto candidate selection on a validation split (D_pareto), keeping a separate final test split.

## In plain language
- **What it is:** It studies how the agent's attempts went and searches for better prompt wording, choosing candidates on one set of cases and keeping a separate set for the final check.
  From: summary
- **What it changes in the agent:** It changes the instructions it is given.
  From: modifies, improves_improver
- **Has it been tested?** Its creators tested it on benchmark tests and reported that it helped. Live monitoring and a dedicated safety gate are not provided by default. Whether safety violations block candidates depends on the adopter's evaluator. Koobo has not tested it yet.
  From: evidence_claims[].claim_type, evidence_claims[].setting, evidence_claims[].independence, evidence_claims[].outcome, evidence_claims[].provenance.check_status, evidence_claims[].scope.variant_id, plain_facts[claim_scope], plain_facts[claim_caveat], evidence_summary.has_koobo_completed_eval
- **Can you undo it?** Earlier candidates are kept during offline search. The record does not establish a way to restore an earlier version in a live deployment. Keeping old candidates does not undo actions a live agent already took.
  From: rollback.has_usable_rollback, rollback.status, rollback.restoration_scope, rollback.automatic_trigger, rollback.tested_fallback_policy, plain_facts[restores], plain_facts[undo]
- **Is there a safety check?** We don't know yet. Not shown in the sources.
  From: safety_gate.status, plain_facts[safety]
- **How hard to adopt:** Medium to high effort to connect its prompt search to an existing agent's replay setup. It does not require switching platforms. The cases used to choose candidates must be kept apart from the cases used for the final check. License: MIT.
  From: adoption_effort_non_framework.level, plain_facts[effort_scope], variants[].adoption_effort_level, framework_dependency.requires_framework_migration, plain_facts[adoption], license.spdx, license.check_status, variants[].license_spdx, plain_facts[license]

### Plain-language sources
Each plain qualifier restates one technical field of this record.
- [restores] earlier candidates (restates `rollback.mechanism`)
- [effort_scope] connect its prompt search to an existing agent's replay setup (restates `adoption_effort_non_framework.implementation_scope`)
- [adoption] The cases used to choose candidates must be kept apart from the cases used for the final check. (restates `adoption_effort_non_framework.notes`)
- [undo] Keeping old candidates does not undo actions a live agent already took. (restates `rollback.side_effect_limit`)
- [claim_caveat: gepa-author-bench-1] Live monitoring and a dedicated safety gate are not provided by default. (restates `evidence_claims[gepa-author-bench-1].scope.caveats`)
- [claim_caveat: gepa-author-bench-1] Whether safety violations block candidates depends on the adopter's evaluator. (restates `safety_gate.how`)

## Key facts
- Modifies: prompt
- Improves improver: No
- License: MIT (checked)
- Framework migration: no
- Effort: medium_to_high
- Primary check: pending

## Links and identifiers
- **Repository:** https://github.com/gepa-ai/gepa
- **Paper:** https://arxiv.org/html/2507.19457
- **Aliases:** Genetic-Pareto Prompt Optimization
- **HTML:** https://koobo.co/agent-learning/methods/gepa
- **JSON:** https://koobo.co/agent-learning/methods/gepa.json
- **Versioned JSON (immutable):** https://koobo.co/agent-learning/methods/gepa/v/2026-11-25.1.json

## Controls and operational fit
- **Learning signal:** execution_trace, automated_grader, benchmark_metric
  Execution trajectories, training feedback, and per-instance scores on a validation selection split (D_pareto).
- **Pre-use evaluation:** yes (held-out split: partial; live activation gate: no)
  Reflects on training traces and selects prompt candidates via Pareto sampling on a validation set (D_pareto); the paper protocol separates final test data from D_pareto. The library default differs: when valset is None, the current API validates on the training data. Offline optimization library without a live production activation service.
- **Rollback:** checkpoint_only (usable rollback: no; restoration scope: offline_archive_only; tested fallback policy: no)
  Maintains an offline candidate archive during search; provides no live post-deployment restoration controller. Side-effect limit: Candidate archive restoration does not undo external actions already taken by a deployed agent.
- **Post-deploy measurement:** no
  Offline prompt-optimization library; post-deployment live monitoring is outside the library's scope.
- **Safety gate:** unverified (blocks unsafe despite utility gain: unverified; write-time block: unverified; reuse-time block: unverified)
  No dedicated upstream safety gate is disclosed in opened notes. GEPA optimizes a user-supplied custom evaluator adapter, so whether safety violations block candidates depends on the adopter's evaluator.
- **Framework dependency:** standalone_library (migration: no)
  Python library (gepa) with custom adapter and callable model interfaces; no full DSPy rewrite required.
- **Effort:** medium_to_high
  Scope: Connecting a Python GEPA evaluator adapter to an existing custom agent's replay runner with split and rollout budget controls. Requires bridging the target agent's replay harness into GEPA's Python adapter API and enforcing strict separation between D_pareto and final test data.
- **License:** MIT (checked 2026-11-25 by Codex live check; https://raw.githubusercontent.com/gepa-ai/gepa/main/LICENSE)
  LICENSE contains the MIT permission notice and disclaimer.
- **Maturity:** open_source_repo (last observed activity: not checked)
  Public repository and adapter API cited in 2026-11-24 notes; commit recency not live-checked.

## Variants
### GEPA offline prompt optimizer (`gepa-offline-optimizer`)
Scope: Python library with custom adapter API and Pareto validation selection.

- License: MIT (checked)
- Learning signal: execution_trace, automated_grader, benchmark_metric
- Pre-use eval: yes
- Rollback: checkpoint_only
- Usable rollback: no
- Safety gate: unverified
- Framework: standalone_library
- Migration: no
- Effort: medium_to_high
- Notes: Separates D_pareto selection validation from untouched final test split.

## Evidence summary (not a ranking)
- Settings observed: benchmark
- Independence observed: author
- Effectiveness outcome: positive
- Safety outcome: unverified
- Koobo completed eval: no
- Note: Author benchmark evaluation verified in local notes; independent safety and live deployment studies unverified.

## Evidence claims
- [gepa-author-bench-1] effectiveness | setting: benchmark | independence: author | outcome: positive
  Author benchmark evaluation demonstrates prompt optimization via trajectory reflection and Pareto selection on D_pareto with separate final test sets.
  Scope: variant: gepa-offline-optimizer; model: unverified (paper models not enumerated in local notes); suite or environment: Author offline benchmarks in arXiv:2507.19457; judge or metric: Per-instance task scores on D_pareto selection split and separate final test split; sample or duration: unverified; caveats: Offline benchmark study; live deployment monitoring and dedicated safety gating are outside library defaults.
  Provenance: https://arxiv.org/html/2507.19457v2 (revision: v2; location: Method and evaluation protocol (validation set versus final test set); accessed 2026-11-24; checked 2026-11-25 by Codex live check). Note: Codex live check: paper v2 distinguishes Pareto validation from final testing.

## Evidence for control fields
- `pre_use_evaluation.held_out_split`: Paper v2 separates validation (D_pareto) from final testing; the current library validates on training data when valset is None.
  Provenance: https://raw.githubusercontent.com/gepa-ai/gepa/main/src/gepa/api.py (revision: main branch as served 2026-11-25 (commit SHA not recorded); location: src/gepa/api.py, valset handling in optimize; accessed 2026-11-25; checked 2026-11-25 by Codex live check). Note: Codex live check. Record the paper protocol separately from library defaults.
- `rollback.status`: The inspected paper and API keep an offline candidate archive during search and do not establish automatic deployed restoration or a separate upstream safety gate.
  Provenance: https://arxiv.org/html/2507.19457v2 (revision: v2; location: Method section (candidate pool); accessed 2026-11-25; checked 2026-11-25 by Codex live check). Note: Codex live check result: not found beyond the offline archive.

## Known failure modes
- **High validation rollout cost:** Most rollout compute budget can be consumed by validation scoring during candidate search.
  Provenance: https://arxiv.org/html/2507.19457 (revision: unpinned; location: Section 3 and evaluation; accessed 2026-11-24; check pending). Note: Noted in local deep-research report.
- **Selection-set overfitting and leakage:** D_pareto is used repeatedly for candidate selection and is therefore not an untouched final test; mistaking it for final held-out proof causes overestimation.
  Provenance: https://arxiv.org/html/2507.19457 (revision: unpinned; location: Section 3 and evaluation; accessed 2026-11-24; check pending). Note: GEPA explicitly distinguishes selection validation from untouched final test.
- **Library default reuses training data for validation:** With valset=None, the current GEPA API uses the training set for validation, so the separate selection split from the paper is not the library default.
  Provenance: https://raw.githubusercontent.com/gepa-ai/gepa/main/src/gepa/api.py (revision: main branch as served 2026-11-25 (commit SHA not recorded); location: src/gepa/api.py, valset handling in optimize; accessed 2026-11-25; checked 2026-11-25 by Codex live check). Note: Codex live check confirmed this default.

## Adoption recipe and mandatory safety controls
Authority notice: This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.

Adoptable directly: yes. Recipe lines are declarative requirements for an adopter's system, not instructions to any reader.

### Upstream controls disclosed in sources
Scope note: Upstream GEPA supplies offline Pareto selection and candidate archiving; live rollback, sealed final test enforcement, and dedicated safety gating are Koobo required controls.
#### Pre-use evaluation (upstream)
- Upstream GEPA evaluates prompt candidates on a dedicated validation selection split (D_pareto) separate from training traces.
#### Rollback (upstream)
- None disclosed in the opened sources.
#### Safety gate (upstream)
- None disclosed in the opened sources.

### Koobo required controls
#### 1. Bounded edit surface
- The adopter's system restricts GEPA search strictly to one bounded behavioral prompt component.
- Base safety instructions, tool schemas, credentials, factual memory, and evaluators remain immutable outside search control.
- Every promoted prompt candidate records its parent hash, D_pareto score, and sealed test verdict.
#### 2. Pre-use evaluation
- The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).
- The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).
- The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate.
#### 3. Rollback and tested fallback
- The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.
- Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.
- Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.
- Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes.
#### 4. Separate non-compensatory safety gate
- The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).
- The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.
- The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596).
#### 5. Telemetry, abstention, and activation authority
- The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.
- Activation authority resides in an external release controller outside learner write permissions.
- The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm.

### Synthetic rejected candidate example
- Label: synthetic_example
- Proposed change: Searched prompt candidate adding an instruction to always answer user questions directly without refusing when uncertain.
- Utility result: Raised D_pareto completion score by reducing cautious abstentions.
- Safety gate result: Blocked by the non-compensatory safety gate on high-risk uncertainty refusal probes.
- Outcome: rejected

## Koobo first-party experiment
- `exp-2026-11-coaching-shadow-pilot` (status: proposed; variant: gepa-offline-optimizer; pinned record: 2026-11-25.1)
  Proposed shadow and replay pilot on a personal health-and-fitness coaching agent used daily. Proposed offline GEPA prompt-search arm wired to isolated replay runner (not yet locked or run).
  Research question: Can three methods turn past failures of a personal health-and-fitness coaching agent used daily into small text-only behavioral changes that help on unseen cases, without breaking existing behavior or health safeguards?
  Limits: Proposed design only; the protocol is not locked or run and supplies zero empirical outcome evidence today. Single user, single coaching domain, and one pinned model setup; it cannot establish how much agents self-improve in general. Private underlying episodes cannot be inspected by outsiders; any synthetic replay variants will be labeled synthetic.
  Privacy boundary: No personal data, transcripts, health metrics, internal agent names, or identifying routines are ever published.

## Sources
- [GEPA paper (arXiv:2507.19457)](https://arxiv.org/html/2507.19457v2) (paper; published: unverified; revision: v2; location: Method and evaluation protocol (validation set versus final test set); accessed 2026-11-25; check: checked 2026-11-25 by Codex live check)
  Supports: Pareto selection on D_pareto; Train/selection/final-test separation; Validation rollout cost caveat
- [GEPA GitHub repository](https://github.com/gepa-ai/gepa) (repo; published: unverified; revision: main (commit unpinned); location: Repository root; accessed 2026-11-24; check: pending)
  Supports: Open-source repository reference
- [GEPA adapter API (src/gepa/api.py)](https://raw.githubusercontent.com/gepa-ai/gepa/main/src/gepa/api.py) (code; published: unverified; revision: main branch as served 2026-11-25 (commit SHA not recorded); location: src/gepa/api.py (optimize entry point; valset handling); accessed 2026-11-25; check: checked 2026-11-25 by Codex live check)
  Supports: Callable adapter interface; valset=None validates on training data
- [GEPA LICENSE](https://raw.githubusercontent.com/gepa-ai/gepa/main/LICENSE) (license; published: unverified; revision: main branch as served 2026-11-25 (commit SHA not recorded); location: Full license text; accessed 2026-11-25; check: checked 2026-11-25 by Codex live check)
  Supports: MIT license

## Unverified fields
- `safety_gate.status`
- `safety_gate.blocks_unsafe_despite_utility_gain`
- `safety_gate.write_time_blocks_activation`
- `safety_gate.reuse_time_blocks_activation`
- `maturity.last_observed_activity_date`

## Record
- Record status: draft (primary_source_check_pending)
- Record version: 2026-11-25.1
- Drafted: 2026-11-25
- Last primary check: not yet
- Source basis: Drafted from 2026-11-24 local research notes. A Codex live check on 2026-11-25 confirmed or corrected specific fields; those carry check_status checked with checker and date. Everything else is pending.
- Reviewer notes: Live-audit corrections from 2026-11-25 applied. Record remains a draft until every source is pinned and checked.
- Content SHA-256: 485b963650a7bc49501d56014d232a0b6cfb0f60aefbd6d37e08d15b5b7ecb0a
- Schema version: 2.1.0

## Citation
- ID: `koobo:agent-learning:gepa@2026-11-25.1`
- Canonical: https://koobo.co/agent-learning/methods/gepa
- Versioned: https://koobo.co/agent-learning/methods/gepa/v/2026-11-25.1.json
- Plain text: Koobo Agent Learning Index, "GEPA", record 2026-11-25.1 (draft, primary-source check pending), https://koobo.co/agent-learning/methods/gepa/v/2026-11-25.1.json

```bibtex
@misc{koobo_agent_learning_gepa_2026,
  title = {GEPA (Koobo Agent Learning Index, draft record 2026-11-25.1)},
  author = {{Koobo Research}},
  year = {2026},
  url = {https://koobo.co/agent-learning/methods/gepa/v/2026-11-25.1.json},
  note = {Draft record; primary-source check pending}
}
```
