Skip to content

Repository files navigation

LLM4AD Next

From problem description to runnable evolutionary algorithm search — in one command.
LLM-driven automated algorithm design with evolutionary optimization

Quickstart · Docs · Wiki · Online Demo

PyPI Version Python Versions License CI


🔥 News

  • 🔬 [2026.07][New Feature]: Search methods migrated — EoH, MEoH, ReEvo, and MCTS-AHD are now available as standalone orchestrators. See Search Methods.
  • 🧠 [2026.07][New Feature]: MindMemOS-backed long-term memory is now available, with global, project, and task memory scopes plus configurable Chat and Embedding model bindings. See the Memory Guide.
  • 🚀 [2026.07][New Release]: LLM4AD_Next Online Trial is now available at https://llm4ad-next.cn/ — try the full problem-to-algorithm workflow directly in your browser with no local setup.
  • ✨ [2026.07][New Feature]: Introducing an interactive problem-to-project workflow that turns natural-language problem descriptions into runnable evolutionary algorithm search projects.
  • 🐳 [2026.07][New Feature]: Versioned Docker Hub deployment images are now aligned with GitHub Release tags for reproducible local deployment.

🚀 Why LLM4AD_Next?

Traditionally, using Large Language Models for Automated Algorithm Design (LLM4AD) required a tedious, multi-step configuration pipeline. LLM4AD_Next destroys this entry barrier.

LLM4AD vs LLM4AD_Next Process Overview

With LLM4AD_Next, after creating your directory, all of these painful steps are fully automated through an interactive conversational terminal. Just run:

uv run llm4ad chat

Our built-in AI-powered consultant will interview you, instantly understand your requirements, and automatically generate a ready-to-run pipeline (evaluator, algorithm skeleton, configuration, and debugger) so you can leap straight into producing Useful Algorithms.

🎯 Key Features Overview

  • 🧠 LLM-Powered Design & 🧬 Evolutionary Optimization combined to automatically evolve top-performing code.
  • 💬 Interactive Configuration (llm4ad chat) — Your conversational AI consultant that generates the entire runnable app framework.
  • 🔍 Evolve-Block Advisor & Recommender — Point LLM4AD_Next at any repository, and it will scan, score, and recommend exactly which blocks of code are most promising to evolve to hit your goals.

Search Methods (Automatic Heuristic Design)

Migration status of the Automatic Heuristic Design (AHD) search methods from the original LLM4AD platform.

Method Status Method Status
IslandGA ✅ Available FunSearch ⏳ Pending
MEoH ✅ Available HillClimb ⏳ Pending
DyCA ✅ Available LHNS ⏳ Pending
EoH ✅ Available LLaMEA ⏳ Pending
ReEvo ✅ Available MLES ⏳ Pending
MCTS-AHD ✅ Available MOEA/D ⏳ Pending
NSGA-II ⏳ Pending
PartEvo ⏳ Pending
RandSample ⏳ Pending

Using the migrated methods

Set evolution.type in your config and run llm4ad run <config.yaml>. See examples/config/config.complete.yaml for full examples.

evolution:
  type: "eoh"  # options: "eoh", "meoh", "reevo", "mcts_ahd", "island_ga", "dyca"

Quick Start

Try Online
Watch Instruction
Read Docs
Run LLM4AD_Next in your browser. No installation or API key required. Watch the introduction before installing or configuring a local environment. Use the documentation path map for setup, configuration, examples, and Web UI deployment.
Launch Online Demo Watch the instruction video on YouTube Open Documentation

Instruction Video

Run LLM4AD

Option A: Online Demo (No Installation Required)

Use the online demo from Quick Start, or open it directly: Launch Online Demo.

No setup, no API key needed — just open the link and start designing algorithms.

Option B: Local Installation

Requires Python 3.12+ (pinned in .python-version) and uv (recommended) or pip. A plain uv sync sets up everything, including the chatv2 AI build agent, out of the box.

# Clone the repository
git clone https://github.com/Optima-CityU/LLM4AD_Next.git
cd LLM4AD_Next

# Install dependencies
uv sync

# Configure your LLM provider (see Global Settings section below)
# Or set environment variables directly:
export LLM_BASE_URL="https://api.openai.com/v1"
export LLM_API_KEY="your-api-key"
export LLM_MODEL="gpt-4o"

# Option 1: Interactive configuration (recommended for new users)
llm4ad chat

# Option 2: Run with an existing config file
llm4ad run examples/applications/tsp_benchmark_python/config.yaml

For optional dependency groups (infra, providers, eval, dev, docs, all) and uv installation, see the Installation Guide.

Global Settings

Create ~/.llm4ad/settings.yaml to configure shared providers across all projects:

providers:
  - name: default
    type: openai
    api_key: ${OPENAI_API_KEY}
    model: gpt-4o
  - name: anthropic
    type: anthropic
    api_key: ${ANTHROPIC_API_KEY}
    model: claude-sonnet-4-20250514

Task configs then only need the provider name — credentials and model are resolved from global settings automatically.

For CLI commands, the interactive chat workflow, the Evolve-Block Advisor / Recommender, and the Python API, see the Documentation.

Documentation

Local Development

# Serve documentation with live reload
mkdocs serve

# Build static documentation
mkdocs build

Project Structure

LLM4AD/
├── src/llm4ad/          # Main source code
│   ├── config/           # Configuration schemas and global settings
│   ├── consultant/       # Interactive configuration wizard
│   ├── builder/          # Task builder (analyzer, creator, validator, writer)
│   ├── advisor/          # Evolve-block advisor and recommender
│   ├── provider/         # LLM provider implementations
│   ├── planner/          # Algorithm planning layer
│   ├── coder/            # Code generation layer
│   ├── evaluator/        # Evaluation layer
│   ├── orchestrator/     # Workflow orchestration
│   ├── infra/            # Infrastructure (Ray, monitoring)
│   └── utils/            # Utilities
├── examples/             # Example configurations and applications
├── tests/                # Test suite
└── docs/                 # Documentation

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

# Set up development environment
uv sync --extra all

# Run tests
pytest

# Format code
black src/ tests/
ruff check src/ tests/ --fix

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Support

Join the Community

Scan the QR code with WeChat to join the LLM4AD_Next community group.

LLM4AD_Next WeChat community QR code

About

A next-generation LLM4AD platform focused on intuitive UI interactions and seamless collaboration with AI agents, making automated algorithm design more accessible and easier to use

Resources

Contributing

Stars

374 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages