Skip to main content

Quick Start

Using the CLI

The simplest way to run SkyDiscover is with the skydiscover-run command:
Required arguments:
  • initial_program.py - Starting solution (optional for from-scratch generation)
  • evaluator.py - Scoring function that returns metrics
Common flags:
  • -c, --config - Path to YAML configuration file
  • -s, --search - Search algorithm (topk, adaevolve, beam_search, evox, gepa, openevolve)
  • -i, --iterations - Maximum number of iterations (default: 100)
  • -m, --model - Model name(s), comma-separated (e.g., gpt-5, gemini/gemini-3-pro)
  • -o, --output - Output directory for results
  • --agentic - Enable agentic mode for codebase-aware generation
  • --api-base - Custom API endpoint URL
  • -l, --log-level - Logging level (DEBUG, INFO, WARNING, ERROR)

Using the Python API

Search Algorithms

topk

Simple top-k selection. Good baseline for quick experiments.

adaevolve

Adaptive multi-island evolution with dynamic search intensity.

beam_search

Beam search with diversity-weighted selection.

evox

Co-evolution of solutions and search strategies.

gepa

Guided evolution with acceptance gating and merging.

openevolve

MAP-Elites with island-based exploration (external package).

CLI Examples

Basic Run

Specify Model and Search Algorithm

Multiple Models

Custom API Endpoint

Agentic Mode

Resume from Checkpoint

Understanding Results

Output Directory Structure

DiscoveryResult Fields

best_program
Program
Full Program object with code, metrics, and lineage
best_score
float
The combined_score from the best program’s metrics
best_solution
str
Source code of the best solution
metrics
dict
All metrics returned by the evaluator for the best program
initial_score
float
Score of the initial program (if provided)
output_dir
str
Path to the output directory (None if cleanup=True)

Environment Variables

OPENAI_API_KEY
string
required
OpenAI API key (or set per-model in config)
GEMINI_API_KEY
string
Google Gemini API key (alias: GOOGLE_API_KEY)
ANTHROPIC_API_KEY
string
Anthropic Claude API key
DEEPSEEK_API_KEY
string
DeepSeek API key
OPENAI_API_BASE
string
Override the default API base URL (alias: OPENAI_BASE_URL)

From-Scratch Generation

You can omit the initial program to have the LLM generate solutions from scratch:
For from-scratch generation, provide a detailed system_message in your config describing the problem, input/output format, and constraints.

Performance Tips

Speed up discovery by running multiple iterations concurrently:
Works best with fast evaluators and sufficient API rate limits.
Exit early on low-scoring programs:
Implement evaluate_stage1() and evaluate_stage2() in your evaluator.
Save progress and resume if interrupted:

Next Steps

Writing Evaluators

Learn how to write effective scoring functions

Configuration

Deep dive into YAML configuration options

Model Providers

Set up OpenAI, Gemini, Anthropic, and local models

Monitoring

Watch your discovery run in real-time