agentleFS
oceanbaseoceanbase/powerrag/AGENTS.md

powerrag

AGENTS.md147 starsChanged 10 months agoApache-2.0Archived repositoryView on GitHub

This file provides context, build instructions, and coding standards for the RAGFlow project. It is structured to follow GitHub Copilot's customization guidelines. Runs on port 8000 by default.

  • Installs packages

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

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Pre-requisite: Start dependent services (MySQL, ES/Infinity, Redis, MinIO).

    line 42
  2. Very specific:

    Python Formatting: Use ruff for linting and formatting.

    line 95
  3. Distinctive:

    Pre-commit: Ensure pre-commit hooks are installed.

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

RAGFlow Project Instructions for GitHub Copilot

This file provides context, build instructions, and coding standards for the RAGFlow project. It is structured to follow GitHub Copilot's customization guidelines.

1. Project Overview

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. It is a full-stack application with a Python backend and a React/TypeScript frontend.

  • Backend: Python 3.10+ (Flask/Quart)
  • Frontend: TypeScript, React, UmiJS
  • Architecture: Microservices based on Docker.
    • api/: Backend API server.
    • rag/: Core RAG logic (indexing, retrieval).
    • deepdoc/: Document parsing and OCR.
    • web/: Frontend application.

2. Directory Structure

  • api/: Backend API server (Flask/Quart).
    • apps/: API Blueprints (Knowledge Base, Chat, etc.).
    • db/: Database models and services.
  • rag/: Core RAG logic.
    • llm/: LLM, Embedding, and Rerank model abstractions.
  • deepdoc/: Document parsing and OCR modules.
  • agent/: Agentic reasoning components.
  • web/: Frontend application (React + UmiJS).
  • docker/: Docker deployment configurations.
  • sdk/: Python SDK.
  • test/: Backend tests.

3. Build Instructions

Backend (Python)

The project uses uv for dependency management.

  1. Setup Environment:
    uv sync --python 3.12 --all-extras
    uv run download_deps.py
  2. Run Server:
    • Pre-requisite: Start dependent services (MySQL, ES/Infinity, Redis, MinIO).
      docker compose -f docker/docker-compose-base.yml up -d
    • Launch:
      source .venv/bin/activate
      export PYTHONPATH=$(pwd)
      bash docker/launch_backend_service.sh

Frontend (TypeScript/React)

Located in web/.

  1. Install Dependencies:
    cd web
    npm install
  2. Run Dev Server:
    npm run dev
    Runs on port 8000 by default.

Docker Deployment

To run the full stack using Docker:

cd docker
docker compose -f docker-compose.yml up -d

4. Testing Instructions

Backend Tests

  • Run All Tests:
    uv run pytest
  • Run Specific Test:
    uv run pytest test/test_api.py

Frontend Tests

  • Run Tests:
    cd web
    npm run test

5. Coding Standards & Guidelines

  • Python Formatting: Use ruff for linting and formatting.
    ruff check
    ruff format
  • Frontend Linting:
    cd web
    npm run lint
  • Pre-commit: Ensure pre-commit hooks are installed.
    pre-commit install
    pre-commit run --all-files

Download now (ZIP)

  • 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 28,693 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 repository2 other files it gives its agents.

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.