GenerateAgents.md  by originalankur

Automated generation of comprehensive `Agents.md` for LLM-driven projects

Created 4 months ago
250 stars

Top 100.0% on SourcePulse

GitHubView on GitHub
Project Summary

Automated generation of comprehensive AGENTS.md files for code repositories, powered by DSPy's Recursive Language Models (RLM). This tool targets developers and researchers building AI agents that need to understand and interact with codebases, offering deep codebase exploration and optimized documentation to enhance agent performance and reduce development friction.

How It Works

The project clones a specified GitHub or local repository and analyzes its source tree using DSPy's RLM to extract codebase conventions. It then employs Chain-of-Thought (CoT) prompting to compile these conventions into markdown, generating an AGENTS.md file. An advanced feature includes analyzing Git history to automatically deduce anti-patterns from reverted commits, feeding these lessons learned directly into the generated documentation.

Quick Start & Requirements

  • Install: Clone the repository (git clone https://github.com/originalankur/GenerateAgents.md), navigate into it, and run uv sync --extra dev (requires uv package manager).
  • Prerequisites: An API key for a supported LLM provider (e.g., Gemini, Anthropic, OpenAI, Ollama) configured via environment variables (e.g., .env file).
  • Run: Use uv run autogenerateagentsmd /path/to/local/repo for local repositories or uv run autogenerateagentsmd --github-repository <url> for public GitHub repositories. Specific models can be selected using the --model flag (e.g., anthropic/claude-sonnet-4.6).
  • Docs: Project repository: https://github.com/originalankur/GenerateAgents.md

Highlighted Details

  • Supports over 100 LLM providers out-of-the-box via LiteLLM integration.
  • Offers two output styles: "Comprehensive" for high-level overviews and "Strict" for constraints, anti-patterns, and quirks.
  • Advanced Git history analysis automatically identifies and incorporates lessons learned from reverted commits into AGENTS.md.
  • Leverages DSPy's Recursive Language Models for long-context understanding of codebases.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or roadmap were found in the provided README.

Licensing & Compatibility

The project is released under the MIT License, which generally permits commercial use and modification.

Limitations & Caveats

End-to-end pipeline tests require valid API keys and internet access, and may incur costs and take significant time due to real LLM API calls. The quality of the generated AGENTS.md is dependent on the chosen LLM and the complexity/clarity of the target codebase.

Health Check
Last Commit

4 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.