GEPA
gepa-ai.github.io
- Free plan
- API
- Self-hosted
What GEPA is
GEPA is an open-source engine for optimizing prompts, code, configurations, agent architectures, policies, and other material expressed as text. It uses execution traces and evaluator feedback to guide an LLM through diagnosis and targeted changes, then selects candidates with a Pareto-aware approach. With optimize_anything, a user-written evaluator can connect GEPA to a system without requiring DSPy or another framework. It can work with API-only models such as GPT, Claude, and Gemini without access to their weights. Integrations include DSPy, MLflow, Comet ML Opik, Pydantic AI, OpenAI Cookbook, Hugging Face Cookbook, and Google ADK; built-in adapters cover workflows including RAG, MCP, TerminalBench, and LangChain. Human-readable traces explain prompt changes and can help debug agent behavior. Users can cap metric calls and set stopping conditions. The project says improvements may appear with three examples and recommends 30–300 for best results. GEPA is a self-hosted Python package under the MIT License, installable with `pip install gepa`. It does not inherently optimize for short prompts.
Who it suits
GEPA suits teams working with costly rollouts, limited examples, API-only models, or a need to inspect why prompts changed. It can also fit systems connected through a custom evaluator.
Good to know, and what to watch
- Works with API-only models without model weights.
- Custom evaluators connect systems without a required framework.
- Traces explain optimization changes.
- Users can cap metric calls and configure stop conditions.
- Open-source under the MIT License.
- Prompt length is not optimized by default.
- Best results are recommended with 30–300 examples.
- Custom system use requires a user-written evaluator.
Plans
Every plan and priceGEPA
Open source
Getting started
- Open the GEPA project website
- Install the package with pip install gepa
- Choose a supported model or API-only model
- Create an evaluator for the system you want to optimize
- Connect the system through optimize_anything or a built-in adapter
- Set metric limits and stopping conditions
- Run optimization and review the human-readable traces
Limits to check
GEPA does not optimize for short prompts by default; prompt length must be included as an optimization objective. The project says it can work with as few as three examples and recommends 30–300 for best results.
The verdict
GEPA is suited to iterative optimization when evaluation feedback and readable traces matter. Include prompt length as an objective if shorter prompts are a requirement.
Questions people ask
Is GEPA free and open source?
Yes. The GEPA plan is free, and the project is listed under the MIT license.
Where does GEPA run?
GEPA is provided as a self-hosted Python package and can be installed with pip.
Which models can GEPA optimize?
It can optimize API-only models including GPT, Claude, and Gemini without access to model weights.
Does GEPA require DSPy?
No. The optimize_anything API works with any system through a user-written evaluator and does not require DSPy or another framework.
How much data is needed?
The project says improvements can appear with as few as three examples and recommends aiming for 30–300 examples.
Does GEPA optimize prompt length?
Not inherently. Prompt length must be included as an optimization objective if shorter prompts are desired.
What the maker publishes
- Agent skill
- The repository includes a GEPA Agent Skill for coding agents including Claude Code, Cursor, VS Code/Copilot, Codex, and Gemini CLI. source
- Best-fit workloads
- GEPA is presented as a fit for expensive rollouts, scarce data, API-only models, or cases where human-readable optimization traces are useful. source
- Budget controls
- Users can cap metric calls and configure timeout, no-improvement, score-threshold, signal, file, and composite stop conditions. source
- Built-in adapters
- Built-in adapters include Default, Confidence, DSPy Full Program, Generic RAG, MCP, TerminalBench, AnyMaths, and LangChain adapters. source
- Comparison caveat
- The site says gradient-based methods remain effective when data is abundant and there are 100,000 or more cheap rollouts. source
- Data needs
- The FAQ says GEPA can show improvements with as few as three examples and recommends aiming for 30–300 examples for best results. source
- Data scale limit
- The site says GEPA can work with as few as three examples and describes 100–500 evaluations as a use case for expensive rollouts. source
- Development
- GEPA is developed at UC Berkeley Sky Computing Lab through a research collaboration involving UC Berkeley, MIT, Stanford, and Databricks. source
- Framework flexibility
- The optimize_anything API can work with any system through a user-written evaluator, without requiring DSPy or another framework. source
- How it works
- It uses LLM reflection on execution traces to diagnose failures, propose targeted changes, and select candidates using a Pareto frontier. source
- Installation
- The project’s documented install command is `pip install gepa`. source
- Integrations
- The project lists integrations with DSPy, MLflow, Comet ML Opik, Pydantic AI, OpenAI Cookbook, Hugging Face Cookbook, and Google ADK. source
- Interpretability
- GEPA provides human-readable optimization traces that show why prompts changed and can help debug agent behavior. source
- License
- The GitHub repository lists the project under the MIT license. source
- Maker and origin
- GEPA is developed at UC Berkeley Sky Computing Lab through a research collaboration between UC Berkeley, MIT, Stanford, and Databricks. source
- Model access
- GEPA can optimize API-only models including GPT, Claude, and Gemini without requiring access to model weights. source
- Model access
- GEPA can optimize API-only models such as GPT, Claude, and Gemini without requiring access to model weights. source
- Notable limitation
- GEPA does not inherently optimize for short prompts; its prompts may be longer unless prompt length is included as an optimization objective. source
- Optimization method
- It uses execution traces and evaluator-provided diagnostic feedback to guide LLM reflection, targeted mutations, and Pareto-aware candidate selection. source
- Purpose
- GEPA is a framework for optimizing prompts, code, agent architectures, configurations, and other text parameters against evaluation metrics. source
- Security and compliance
- The opened official pages provide no security or compliance certification claims. source
- Support
- The FAQ directs users to Discord, Slack, GitHub Issues, and the project lead’s X account for questions. source
- Support
- The project points users to its documentation, GitHub issues, and a Discord community. source
- Supported systems
- The project documents adapters for DSPy, RAG, MCP, TerminalBench, and LangChain. source
Checked against the maker's pages on 9 Oct 2026.