# gepa

> gepa is an open-source AI tool for ai models and llm tooling. Python library that optimises prompts and code with reflective evolutionary search. It is available on API and CLI.

- **Kind:** Tool
- **Pricing:** Open source
- **Platforms:** API, CLI
- **Website:** https://gepa-ai.github.io/gepa/
- **Repository:** https://github.com/gepa-ai/gepa
- **GitHub stars:** 7,458
- **License:** MIT
- **Categories:** AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

The method treats any text parameter, such as a prompt, code or configuration, as something to improve by trial. An LLM reflects on run traces and proposes edits, while Pareto-efficient selection keeps diverse good candidates.

Usage is a single optimize call: give it a seed candidate, training and validation sets, a task model and a reflection model. The site's example reports a rise from 46.6% to 56.6% on AIME 2025 with GPT-4.1 Mini.

It is also built into DSPy, and a custom adapter lets you plug in any system that can be scored. Headline claims on the site (cost, speed against RL, named users) are the vendor's own.

## Features

- **Reflective optimisation:** An LLM reads traces and proposes better candidates.
- **Pareto selection:** Keeps varied high performers instead of one winner.
- **Optimises any text:** Prompts, code, configurations and agent architectures.
- **DSPy built-in:** Available as dspy.GEPA.
- **Custom adapters:** Wrap any system with an evaluate function.
- **pip install:** Distributed on PyPI.

## Good for

- Improve a system prompt against a dataset
- Tune a DSPy program
- Optimise code against a metric
- Evolve agent configurations

## FAQ

### How do I install it?

pip install gepa.

### Does it work with DSPy?

Yes, it is built into DSPy.

### What does it need?

A metric, datasets and a reflection model.

### Is gepa free?

Yes. gepa is open source, so you can use and self-host it for free.

### What are the best alternatives to gepa?

The closest alternatives to gepa are ECC, ponytail, graphify, ragflow and Agent-Reach.

## Alternatives

- [ECC](https://ai-powered.com/tools/ecc): ECC is a freemium AI tool for ai models and llm tooling.
- [ponytail](https://ai-powered.com/tools/ponytail): ponytail is an open-source AI tool for ai models and llm tooling.
- [graphify](https://ai-powered.com/tools/graphify-2): graphify is a freemium AI tool for knowledge and memory.
- [ragflow](https://ai-powered.com/tools/ragflow): ragflow is a freemium AI tool for knowledge and memory.
- [Agent-Reach](https://ai-powered.com/tools/agent-reach): Agent-Reach is an open-source AI tool for ai models and llm tooling.
- [OmniRoute](https://ai-powered.com/tools/omniroute): OmniRoute is a freemium AI tool for ai models and llm tooling.
- [ai-engineering-from-scratch](https://ai-powered.com/tools/ai-engineering-from-scratch): ai-engineering-from-scratch is an open-source AI tool for ai models and llm tooling.
- [crawl4ai](https://ai-powered.com/tools/crawl4ai): crawl4ai is a freemium AI tool for web search and scraping.

---
Source: https://ai-powered.com/tools/gepa
