OpenParable
Skip to content
← Back to skills

Loongflow

Productivity
loongflow

Loongflow is an Agent Skill for productivity published in the baidu-baige/LoongFlow repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

PEES (Plan-Execute-Evaluate-Summary) iterative problem-solving methodology with LoongFlow engine for complex tasks. Use when tasks need structured iteration, optimization, evolution, or when user mentions loongflow/PEES/PES.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/baidu-baige/LoongFlow/blob/HEAD/.claude/skills/loongflow/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/loongflow, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

LoongFlow — PEES Iterative Problem Solving

Use this skill when the user wants to iteratively improve a solution — optimization, evolution, structured retries with learning, or any task that benefits from multiple rounds of refinement rather than a one-shot attempt.

Step 1: Analyze and Advise

Before starting, analyze the task and advise the user on which mode to use. Present both options clearly:

Native PEES (recommended for simple tasks):

  • Best for: single-file fixes, small features, bug fixes, focused improvements
  • How it works: You run Plan-Execute-Evaluate-Summary iterations yourself within this conversation
  • Pros: Fast, no setup, no external dependencies, transparent workspace with full history
  • Cons: Limited to ~5 iterations, single-threaded, no population-based evolution

LoongFlow Engine (recommended for complex tasks):

  • Best for: optimization problems, multi-file projects, tasks needing many iterations (50+), population-based evolution with diversity preservation
  • How it works: Downloads the LoongFlow framework, creates a general_agent task, runs evolutionary optimization in the background, monitors via cron
  • Pros: Powerful evolutionary engine with multi-island model, Boltzmann selection, MAP-Elites diversity, checkpointing, cost tracking
  • Cons: Requires ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL, setup time, runs as background process
  • Source: https://github.com/baidu-baige/LoongFlow

Ask the user which mode they prefer before proceeding.

Step 2: Follow the Mode Guide

Once the user chooses, read the corresponding reference file for detailed instructions:

  • Native PEES → Read references/native-pees.md and follow it
  • LoongFlow Engine → Read references/engine-mode.md and follow it

Architecture Reference

LoongFlow supports three tiers for agent projects:

TierDescriptionBest For
SimpleReAct loop + persistent memoryChatbots, tool calling, format conversion
StandardReAct + self-evaluation + iterative improvementCode review, document generation, data analysis
AdvancedPEES evolution loop with loongflow-memoryMath optimization, algorithm design, NP-hard problems

Complexity Assessment

Task Analysis
├── Only needs conversation + simple tools? → SIMPLE
├── Needs file operations or code generation?
│   ├── Has numerical evaluation metric? → ADVANCED
│   └── No numerical metric? → STANDARD
└── Needs iterative optimization?
    ├── Has clear scoring function? → ADVANCED
    └── Qualitative improvement? → STANDARD