agentleFS
baidu-baigebaidu-baige/LoongFlow/AGENTS.md

LoongFlow

AGENTS.md480 starsChanged 10 months agoApache-2.0View on GitHub

LoongFlow is an Evolutionary Agent Development Framework designed to build autonomous agents that improve through a Plan-Execute-Summary (PES) paradigm. It moves beyond simple ReAct loops to structured evolutionary processes, focusing on high efficiency and stability for complex tasks like mathematical discovery and machine learning competitions (AutoML). Always use uv for dependency management. Do not run python scripts directly if a shell wrapper exists. General Evolve Agent: ML Evolve Agent:

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use uv for dependency management.

    line 48
  2. Distinctive:

    Do not run python scripts directly if a shell wrapper exists.

    line 58
  3. Very specific:

    Ensure llm_config follows the schema: url, api_key, model.

    line 81
  4. Distinctive:

    PES Paradigm: When designing agents, strictly separate concerns into Planner (strategy), Executor (action/coding), and Summary …

    line 87
  5. Distinctive:

    Path Handling: Use relative paths carefully.

    line 94
  6. Very specific:

    Respect the Abstraction: Do not hardcode agent logic into agentsdk.

    line 107
  7. Very specific:

    Check Dependencies: If adding a new library, check if it belongs in pyproject.toml (core) or a specific example's requirements.txt.

    line 108
  8. Very specific:

    Safety: When modifying executor modules, ensure code execution sandboxing or warnings are preserved, as these agents generate and run code.

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

LoongFlow

Project Context

LoongFlow is an Evolutionary Agent Development Framework designed to build autonomous agents that improve through a Plan-Execute-Summary (PES) paradigm. It moves beyond simple ReAct loops to structured evolutionary processes, focusing on high efficiency and stability for complex tasks like mathematical discovery and machine learning competitions (AutoML).

Repository Overview

Core Framework (src/)

  • src/evolux/: The core logic for agent architectures.
    • evolve/: Implementation of PESAgent (Evolutionary algorithms).
    • react/: Implementation of ReActAgent (Standard reasoning loops).
    • base/: Abstract base classes.
  • src/agentsdk/: Foundational building blocks.
    • tools/: Tool interfaces and implementations.
    • memory/: Memory management for agents.
    • logger/, message/, models/, token/: Utility modules.

Agent Implementations (agents/)

  • agents/math_agent/: Agents for open-ended math and algorithm optimization.
    • Contains evolve_planner, evolve_executor, evolve_summary modules.
    • Examples: Located in agents/math_agent/examples/.
  • agents/ml_agent/: Agents specialized for Machine Learning tasks (Kaggle/MLE-Bench).
    • Contains evocoder, evaluator and specific ML workflow logic.
    • Examples: Located in agents/ml_agent/examples/.

Configuration & Scripts

  • pyproject.toml: Project dependencies and configuration.
  • uv.lock: Dependency lock file (managed by uv).
  • run_task.sh: Entry point for General Evolve tasks.
  • run_ml.sh: Entry point for ML Evolve tasks.

Tech Stack & Dependencies

  • Language: Python 3.12+ (Strict requirement).
  • Package Manager: uv (Preferred over pip/conda).
  • LLM Integration: Supports OpenAI, Gemini, DeepSeek via config.
  • Core Libraries: Pydantic (data validation), PyTorch (implied for ML tasks).

Development Workflow

1. Environment Setup

Always use uv for dependency management.

uv venv .venv --python 3.12
source .venv/bin/activate
uv pip install -e .

2. Running Agents

Do not run python scripts directly if a shell wrapper exists.

General Evolve Agent:

# Install task-specific deps first
uv pip install -r ./agents/math_agent/examples/<task_name>/requirements.txt
# Run task
./run_math.sh <task_name> --background
# Logs are found in the example directory's run.log

ML Evolve Agent:

./run_ml.sh init
./run_ml.sh run <task_name> --background
# Logs are found in the example directory's agent.log

3. Configuration

  • LLM configurations are stored in task_config.yaml within specific example directories.
  • Ensure llm_config follows the schema: url, api_key, model.

Coding Guidelines

Architecture Patterns

  • PES Paradigm: When designing agents, strictly separate concerns into Planner (strategy), Executor (action/coding), and Summary (evaluation/learning).
  • Modularity: New tools should be added to agentsdk/tools if generic, or kept local to the agent if specific.

Style & Standards

  • Type Hinting: Enforce Python type hints for all public interfaces.
  • Asynchronous: The framework relies heavily on async/await. Ensure run() methods are awaitable.
  • Path Handling: Use relative paths carefully; agent execution contexts often depend on the root directory.

Testing

  • Tests are located in tests/ mirroring the src/ structure.
  • Run tests using:
    uv run pytest

Thinking Process for AI

  1. Identify the Scope: Are you modifying the Core Framework (src/evolux) or a Specific Agent (agents/)?
  2. Respect the Abstraction: Do not hardcode agent logic into agentsdk. Keep the SDK generic.
  3. Check Dependencies: If adding a new library, check if it belongs in pyproject.toml (core) or a specific example's requirements.txt.
  4. Safety: When modifying executor modules, ensure code execution sandboxing or warnings are preserved, as these agents generate and run code.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.