gepa
Optimize prompts, code, and more with AI-powered Reflective Optimization
GEPA is an AI-powered agent skill that enables coding agents to optimize prompts, code, agent architectures, and other text parameters through reflective evolution and Pareto-efficient search. It uses LLM-based reflection to analyze full execution traces—error messages, profiling data, reasoning logs—to diagnose failures and propose targeted improvements. Agents like Claude Code, Cursor, and Copilot can invoke GEPA's optimize_anything functionality to automatically improve system prompts, code performance, and configuration files with 100–500 evaluations instead of thousands required by reinforcement learning approaches.
Key Features
Use Cases
- 01Optimize math-solving prompts on AIME benchmark (46.6% → 56.6% accuracy improvement)
- 02Improve multi-hop question answering on HotpotQA through reflective query refinement
- 03Optimize agent architectures for ARC-AGI tasks (32% → 89% accuracy)
- 04Discover cloud scheduling policies that beat expert heuristics (40.2% cost savings)
- 05Boost coding agent resolve rates on complex frameworks like Jinja (55% → 82%)
- 06Optimize RAG pipelines across vector stores (ChromaDB, Weaviate, Qdrant, Pinecone)
Related Skills
View moresuperpowers
An agentic skills framework & software development methodology that works.
skills
Skills for Real Engineers. Straight from my .agents directory.
skills
Public repository for Agent Skills
ponytail
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
gepa — FAQ
What is GEPA and what does it optimize?+
GEPA is an agent skill that optimizes any text parameter—prompts, code, agent architectures, configurations—using LLM-based reflection and evolutionary search. It reads full execution traces to diagnose failures and iteratively improves candidates, achieving optimization in 100–500 evaluations compared to thousands required by reinforcement learning.
How do I install GEPA as an agent skill?+
For Claude Code and compatible agents, use '/plugin marketplace add gepa-ai/gepa' then '/plugin install gepa-optimize-anything@gepa'. The skill is auto-discovered from the .claude/skills/gepa-optimize-anything/ directory. Alternatively, install via pip with 'pip install gepa' for direct Python use.
Which AI clients and agents work with GEPA?+
GEPA works as an agent skill with Claude Code, Cursor, VS Code Copilot, Codex, and Gemini CLI. It also integrates with DSPy (dspy.GEPA), MLflow, Comet ML Opik, Pydantic AI, LangChain, and Google ADK.
What are the prerequisites and do I need API keys?+
GEPA requires Python and LLM API access (OpenAI, Anthropic, or other providers) for the reflection and task models. You'll need API keys for your chosen LLM provider. Install via 'pip install gepa' or with extras like 'pip install gepa[confidence]' for specialized adapters.
Is GEPA free and open source?+
Yes, GEPA is open source under the MIT license and free to use. You only pay for LLM API calls to your chosen provider during optimization runs.
How does GEPA differ from reinforcement learning optimization?+
GEPA uses reflective evolution with full execution trace analysis instead of scalar rewards, requiring 35x fewer evaluations (100–500 vs 5,000–25,000+). It works with scarce data (as few as 3 examples), needs no model weight access, and produces human-readable optimization traces showing why each change was made.
How do I install gepa?+
Open the source repository on GitHub and follow its README. gepa is a skill — MCP Agents Market links you directly to the official repo.
Is gepa free?+
gepa is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.