agentleFS
hoangsonwwhoangsonww/AI-Agents-Orchestrator/AGENTS.md

AI-Agents-Orchestrator

AGENTS.md87 starsChanged 8 months agoMITView on GitHub

This file is read by Codex, Gemini CLI, and other agentic coding tools. Claude Code reads .claude/CLAUDE.md which imports this file. Skills provide reusable patterns and best practices. Located in .claude/skills/:

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,736 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 repository9 other files it gives its agents.

The file

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

9 rules. About 0 are common, 2 are distinctive, and 7 are 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.

  • 7

    Very specific

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

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

    All tests in tests/ directory

    line 27
  2. Very specific:

    Use @pytest.mark.integration for tests requiring CLI tools (claude, codex, gemini)

    line 28
  3. Very specific:

    Use @pytest.mark.slow for long-running tests

    line 29
  4. Distinctive:

    Use specialized agents for domain-specific tasks:

    line 43
  5. Very specific:

    Create a PROJECT node plus FILE, PATTERN, and DECISION nodes

    line 148
  6. Very specific:

    Never use shell=True with user input

    line 193
  7. Distinctive:

    Always use parameterized SQL queries

    line 194
  8. Very specific:

    Use secrets.compare_digest() for token comparison

    line 196
  9. Very specific:

    Check .claude/skills/security/ for detailed patterns

    line 198

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

AGENTS.md — Instructions for AI Coding Agents

This file is read by Codex, Gemini CLI, and other agentic coding tools. Claude Code reads .claude/CLAUDE.md which imports this file.

Project Overview

AI Coding Tools Orchestrator: Enterprise-grade agentic infrastructure with two self-contained systems coordinating AI coding assistants (Claude, Codex, Gemini, Copilot, Ollama, llama.cpp), plus specialized skills, MCP tools, and persistent graph-based context memory.

Build & Test

pip install -r requirements.txt
python -m pytest tests/ --override-ini="addopts=" -q --timeout=30 -m "not integration and not slow"

Code Style

  • Python 3.8+, type hints required
  • Black formatting, 120-char max line length
  • isort for import ordering
  • flake8 for linting

Architecture Boundaries

  • orchestrator/ and agentic_team/ are fully independent — zero shared imports
  • Each has its own adapters/, config/, ui/, CLI
  • mcp_server/ is optional and depends on both
  • orchestrator/context/ provides graph-based memory (shared infrastructure)

Testing

  • All tests in tests/ directory
  • Use @pytest.mark.integration for tests requiring CLI tools (claude, codex, gemini)
  • Use @pytest.mark.slow for long-running tests
  • CI excludes integration and slow tests

File Patterns

  • Adapters: */adapters/<name>_adapter.py extending BaseAdapter
  • Config: */config/agents.yaml (YAML, not JSON)
  • Tests: tests/test_<module>.py
  • Skills: .claude/skills/<category>/<skill>.md
  • Claude Agents: .claude/agents/<role>.md
  • Codex Agents: .codex/agents/<role>.toml

Specialized Agents

Available Specialized Agents

Use specialized agents for domain-specific tasks:

AgentDomainUse For
web-frontendFrontendReact, Vue, CSS, accessibility
backend-apiBackendREST, GraphQL, databases, Flask/FastAPI
security-specialistSecurityOWASP, vulnerability analysis, secure coding
devops-infrastructureDevOpsDocker, K8s, CI/CD, cloud
ai-ml-engineerAI/MLML pipelines, embeddings, LLM integration
database-architectDataSchema design, query optimization
mobile-developerMobileiOS, Android, React Native, Flutter
performance-engineerPerformanceProfiling, load testing, optimization
documentation-writerDocsAPI docs, architecture, tutorials

Invoking Agents (Claude)

Reference agent by filename without extension:

@web-frontend Review this component for accessibility
@security-specialist Audit this authentication code

Skills Library

Skills provide reusable patterns and best practices. Located in .claude/skills/:

Categories

  • development/: React components, REST API design, Python async, database queries, GraphQL, error handling
  • testing/: Unit testing, integration testing, TDD, performance testing
  • security/: Input validation, authentication, secure coding, vulnerability assessment
  • devops/: Docker containerization, CI/CD pipelines, Kubernetes deployment
  • ai-ml/: Embeddings & retrieval, LLM integration, RAG pipelines
  • documentation/: API documentation, architecture docs, code documentation

Using Skills

Reference skills for guidance on specific patterns:

See .claude/skills/security/input-validation.md for validation patterns
See .claude/skills/testing/unit-testing.md for pytest patterns

MCP Tools

Core Tools (10)

  • orchestrator_execute - Execute task via orchestrator
  • agentic_team_execute - Execute via agentic team
  • orchestrator_list_agents - List available agents
  • orchestrator_health - Check orchestrator health
  • agentic_team_config - Get team configuration
  • list_engines - List all engines

Code Analysis Tools (4)

  • code_complexity - Analyze Python code complexity
  • find_patterns - Find code patterns/anti-patterns
  • analyze_deps - Analyze dependency issues
  • code_summary - Generate code file summary

Security Tools (4)

  • secrets_scan - Scan for hardcoded secrets
  • security_headers_check - Check security headers
  • dependency_audit - Audit dependencies for CVEs
  • injection_scan - Scan for injection vulnerabilities

Testing Tools (4)

  • suggest_tests - Generate test case suggestions
  • test_coverage_analysis - Analyze test coverage
  • parse_tests - Parse test output results
  • create_test_stub - Generate test stubs

DevOps Tools (5)

  • dockerfile_analysis - Analyze Dockerfile best practices
  • compose_analysis - Analyze Docker Compose
  • ci_config_check - Check CI/CD configuration
  • deploy_checklist - Generate deployment checklist
  • env_config_analysis - Analyze environment config

Context Tools (7)

  • context_store_conversation - Store conversation in memory
  • context_store_task - Store task result
  • context_log_mistake - Log mistake for future reference
  • context_store_pattern - Store reusable code pattern
  • context_search - Search context memory
  • context_get_relevant - Get relevant context for task
  • context_stats - Get memory statistics

Graph Context System

The context system provides persistent memory for AI agents:

Node Types

  • Conversation: Past chat sessions with messages
  • Task: Completed tasks with outcomes
  • Mistake: Errors with corrections and prevention strategies
  • Pattern: Reusable code patterns
  • Decision: Architectural decisions with rationale
  • CodeSnippet: Useful code fragments
  • Preference: Learned user preferences
  • File: Source file metadata from project scans
  • Concept: Abstract concepts and domain knowledge
  • Project: Registered project roots with scan metadata

Project-Scoped Context

Both systems support project-scoped graphs. Configure PROJECT_PATH env var or settings.project_path in config YAML to point at a user project. The engine will:

  1. Scan the directory with ProjectScanner (languages, frameworks, structure)
  2. Create a PROJECT node plus FILE, PATTERN, and DECISION nodes
  3. Tag all nodes with a deterministic project_id (SHA-256 prefix of path)
  4. Isolate queries by project_id — no cross-project contamination
from orchestrator.context import MemoryManager

manager = MemoryManager()

# Register a project (idempotent)
pid = manager.register_project("/path/to/project")

# Get project-scoped context for a task
context = manager.get_project_context(pid, task="Add authentication")

# Rescan after major changes
manager.rescan_project("/path/to/project")

Using Context

from orchestrator.context import MemoryManager

manager = MemoryManager("context.db")

# Log a mistake to prevent repetition
manager.log_mistake(
    description="Used string formatting in SQL query",
    correction="Changed to parameterized query",
    prevention="Always use ? placeholders",
    category="security"
)

# Get relevant context for a task
context = manager.get_relevant_context(
    task_description="Implement user authentication"
)

Search Capabilities

  • BM25: Keyword-based search
  • Semantic: Embedding-based similarity
  • Hybrid: Combined BM25 + semantic with RRF fusion

Security Guidelines

  • Never use shell=True with user input
  • Always use parameterized SQL queries
  • Validate all inputs with Pydantic
  • Use secrets.compare_digest() for token comparison
  • Log errors without sensitive data
  • Check .claude/skills/security/ for detailed patterns

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.