GenerateAgents.md
Automated generation of comprehensive Agents.md for LLMs, driven by the DSPy Recursive language model implementation.
Stars: 166
GenerateAgents.md is a tool that automatically generates Agents.md for any GitHub repository by analyzing its codebase using dspy.RLM (Recursive Language Model). It supports Gemini, Anthropic (Claude), and OpenAI models out of the box. The tool provides two output styles - Comprehensive Style for detailed overviews and explanations, and Strict Style focusing on coding constraints and anti-patterns. It follows a pipeline that involves cloning the repository, extracting codebase information, compiling conventions into markdown, and creating the final AGENTS.md file. The tool also supports environment variables for API keys and different models for generation tasks.
README:
Automatically generate Agents.md for any GitHub repository. Long context enabled using dspy.RLM aka Recursive Language Models.
GenerateAgents.md clones any GitHub repository, analyzes its codebase using dspy.RLM (Recursive Language Model), and produces Agents.md (AGENTS.md). It supports Gemini, Anthropic (Claude), and OpenAI models out of the box.
git clone https://github.com/originalankur/GenerateAgents.md
cd GenerateAgents.md
uv sync --extra dev # installs all deps + dev tools in one stepπ‘ Don't have
uv? Install it withcurl -LsSf https://astral.sh/uv/install.sh | shor see uv docs.
Copy the sample env file and fill in the key for your chosen provider:
cp .env.sample .env(Make sure the .env file sits directly in the root directory of the project, i.e., GenerateAgents.md/.env)
You only need one provider key β whichever model you select:
| Provider | Env Variable | Get a key |
|---|---|---|
| Gemini | GEMINI_API_KEY |
Google AI Studio |
| Anthropic | ANTHROPIC_API_KEY |
Anthropic Console |
| OpenAI | OPENAI_API_KEY |
OpenAI Platform |
# Default β generates AGENTS.md for a local repository (Gemini 2.5 Pro)
uv run autogenerateagentsmd /path/to/local/repo
# Analyze a public github repository using the flag
uv run autogenerateagentsmd --github-repository https://github.com/pallets/flask
# Choose a specific model
uv run autogenerateagentsmd /path/to/local/repo --model anthropic/claude-sonnet-4.6
uv run autogenerateagentsmd --github-repository https://github.com/pallets/flask --model openai/gpt-5.2
# Pass just the provider name to use its default model
uv run autogenerateagentsmd /path/to/local/repo --model anthropic
# List all supported models
uv run autogenerateagentsmd --list-models
# Interactive prompt (just run without arguments)
uv run autogenerateagentsmd
# Strict Style β Focus purely on strict code constraints, past failures, and repo quirks!
uv run autogenerateagentsmd --github-repository https://github.com/pallets/flask --style strictThe generated file will be saved under the projects/ directory using the repository name.
| Output | Location |
|---|---|
AGENTS.md |
./projects/<repo-name>/AGENTS.md |
GenerateAgents supports two distinct styles for AGENTS.md, each tailored to different AI agent setups. You can toggle between them using the --style flag.
Here are two examples generated for the flask repository:
-
Strict Style Example (
--style strict) - Focuses purely on coding constraints, anti-patterns, and repository quirks. -
Comprehensive Style Example (
--style comprehensive) - Includes high-level architectural overviews and explanations alongside constraints.
This builds a detailed, expansive guide. It extracts high-level abstractions like project architecture, directory mappings, data flow principles, and agent personas. Great for giving a brand-new AI agent a complete tour of the repository.
Output Format:
# AGENTS.md β <repo-name>
## Project Overview
## Agent Persona
## Tech Stack
## Architecture
## Code Style
## Anti-Patterns & Restrictions
## Database & State Management
## Error Handling & Logging
## Testing Commands
## Testing Guidelines
## Security & Compliance
## Dependencies & Environment
## PR & Git Rules
## Documentation Standards
## Common Patterns
## Agent Workflow / SOP
## Few-Shot ExamplesResearch suggests that broad, descriptive codebase summaries can sometimes distract LLMs and drive up token costs. The strict style combats this by giving the agent only what it can't easily grep for itself: strict constraints, undocumented quirks, and things it must never do.
Output Format:
# AGENTS.md β <repo-name>
## Code Style & Strict Rules
## Anti-Patterns & Restrictions
## Security & Compliance
## Lessons Learned (Past Failures)
## Repository Quirks & Gotchas
## Execution Commandsββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GenerateAgents Pipeline β
β β
β GitHub Repo URL β
β β β
β βΌ β
β ββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββ β
β β Clone βββββΆβ Load Source Tree (nested dict) β β
β β (git) β ββββββββββββββββββ¬ββββββββββββββββββββββββββ β
β ββββββββββββ β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β CodebaseConventionExtractor β β
β β β β
β β ββββββββββββββββββββββββββββββββββββββ β β
β β β ExtractCodebaseInfo (RLM Pass) β β β
β β βββββββββββββββββββ¬βββββββββββββββββββ β β
β β βΌ β β
β β ββββββββββββββββββββββββββββββββββββββ β β
β β β CompileConventionsMarkdown (CoT) β β β
β β βββββββββββββββββββ¬βββββββββββββββββββ β β
β ββββββββββββββββββββββΌββββββββββββββββββββββ β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β AgentsMdCreator β β
β β β β
β β ββββββββββββββββββββββββββββββββββββββ β β
β β β ExtractAgentsSections (CoT) β β β
β β β (Extracts 17 specific sections) β β β
β β βββββββββββββββββββ¬βββββββββββββββββββ β β
β β βΌ β β
β β ββββββββββββββββββββββββββββββββββββββ β β
β β β compile_agents_md() (Python) β β β
β β β (Template matching into markdown) β β β
β β βββββββββββββββββββ¬βββββββββββββββββββ β β
β ββββββββββββββββββββββΌββββββββββββββββββββββ β
β βΌ β
β projects/<repo-name>/AGENTS.md β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
GenerateAgents/
βββ src/
β βββ autogenerateagentsmd/ # Core package directory
β βββ cli.py # CLI entry point β orchestrates the analysis pipeline
β βββ model_config.py # Provider registry, model catalog, and CLI argument parsing
β βββ signatures.py # DSPy Signatures (LM task definitions)
β β βββ ExtractCodebaseInfo # RLM: Extracts comprehensive codebase properties
β β βββ CompileConventionsMarkdown # CoT: Compiles RLM output into markdown
β β βββ ExtractAgentsSections # CoT: Translates conventions -> 17 AGENTS.md fields
β βββ modules.py # DSPy Modules (pipeline components)
β β βββ CodebaseConventionExtractor # Performs RLM extraction & markdown compilation
β β βββ AgentsMdCreator # Splits info & formats final AGENTS.md text
β βββ utils.py # Utility functions
β βββ clone_repo() # Shallow git clone
β βββ load_source_tree() # Recursively map directories to a nested dict
β βββ compile_agents_md() # Combines the 17 extracted fields into AGENTS.md
β βββ save_agents_to_disk() # Saves output to `projects/<repo_name>/`
βββ tests/
β βββ ... # Pytest test suite, executing end-to-end tests
βββ pyproject.toml # Project metadata, dependencies & tool config
βββ uv.lock # Reproducible dependency lock file
βββ .env.sample # Template for API keys
βββ .env # Your API keys (not committed)
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
For Gemini | Google Gemini API key |
GOOGLE_API_KEY |
For Gemini | Alternative Gemini key name |
ANTHROPIC_API_KEY |
For Anthropic | Anthropic Claude API key |
OPENAI_API_KEY |
For OpenAI | OpenAI API key |
AUTOSKILL_MODEL |
No | Default model string (avoids --model flag) |
GITHUB_REPO_URL |
No | Target repository URL (skips prompt) |
Each provider has a primary model (used for main generation tasks) and a mini model (used as a sub-LM for faster RLM exploration):
| Provider | Primary (default) | Mini (sub-LM) |
|---|---|---|
| Gemini | gemini/gemini-2.5-pro |
gemini/gemini-2.5-flash |
| Anthropic | anthropic/claude-sonnet-4.6 |
anthropic/claude-haiku-3-20250519 |
| OpenAI | openai/gpt-5.2 |
openai/gpt-5.2-instant |
Run uv run autogenerateagentsmd --list-models for the full catalog of exact model versions supported.
The project includes an end-to-end test suite that typically runs the full pipeline against smaller codebases.
# Run all tests (uses AUTOSKILL_MODEL or defaults to Gemini)
uv run pytest tests/ -v -s
# Run only E2E tests
uv run pytest tests/ -v -s -m e2e
# Test with a specific provider
AUTOSKILL_MODEL=openai/gpt-5.2 uv run pytest tests/ -v -s -m e2e
# Run tests involving the generic clone function
uv run pytest tests/ -v -s -k "test_clone"
β οΈ Note: Full pipeline tests make real LLM API calls and may take a few minutes. Generated outputs from passing tests might be placed inside output directories.
- [x] Support Local Repositories
- [ ] Test approach of providing tools to read_file, list_files, cat, grep and move away from sending the entire codebase to the LLM.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for GenerateAgents.md
Similar Open Source Tools
GenerateAgents.md
GenerateAgents.md is a tool that automatically generates Agents.md for any GitHub repository by analyzing its codebase using dspy.RLM (Recursive Language Model). It supports Gemini, Anthropic (Claude), and OpenAI models out of the box. The tool provides two output styles - Comprehensive Style for detailed overviews and explanations, and Strict Style focusing on coding constraints and anti-patterns. It follows a pipeline that involves cloning the repository, extracting codebase information, compiling conventions into markdown, and creating the final AGENTS.md file. The tool also supports environment variables for API keys and different models for generation tasks.
chronicle
Chronicle is a self-hostable AI system that captures audio/video data from OMI devices and other sources to generate memories, action items, and contextual insights about conversations and daily interactions. It includes a mobile app for OMI devices, backend services with AI features, a web dashboard for conversation and memory management, and optional services like speaker recognition and offline ASR. The project aims to provide a system that records personal spoken context and visual context to generate memories, action items, and enable home automation.
observers
Observers is a lightweight library for AI observability that provides support for various generative AI APIs and storage backends. It allows users to track interactions with AI models and sync observations to different storage systems. The library supports OpenAI, Hugging Face transformers, AISuite, Litellm, and Docling for document parsing and export. Users can configure different stores such as Hugging Face Datasets, DuckDB, Argilla, and OpenTelemetry to manage and query their observations. Observers is designed to enhance AI model monitoring and observability in a user-friendly manner.
detour
Detour is an autonomous collision-avoidance system designed to run on-board satellites using NVIDIA's Nemotron LLM on the ASUS Ascent GX10. It utilizes a multi-agent LangGraph pipeline to detect debris threats, assess risk, plan maneuvers, validate safety constraints, and execute avoidance burns locally with zero ground-station latency. The system consists of key components such as Agent Pipeline, Physics Engine, Satellite Model, Tool Wrappers, API, Frontend, and Ascent GX10 Setup. The tool aims to provide fast and autonomous decision-making capabilities to prevent collisions in Low Earth Orbit (LEO) by leveraging edge AI technology.
bumpgen
bumpgen is a tool designed to automatically upgrade TypeScript / TSX dependencies and make necessary code changes to handle any breaking issues that may arise. It uses an abstract syntax tree to analyze code relationships, type definitions for external methods, and a plan graph DAG to execute changes in the correct order. The tool is currently limited to TypeScript and TSX but plans to support other strongly typed languages in the future. It aims to simplify the process of upgrading dependencies and handling code changes caused by updates.
Agentic-ADK
Agentic ADK is an Agent application development framework launched by Alibaba International AI Business, based on Google-ADK and Ali-LangEngine. It is used for developing, constructing, evaluating, and deploying powerful, flexible, and controllable complex AI Agents. ADK aims to make Agent development simpler and more user-friendly, enabling developers to more easily build, deploy, and orchestrate various Agent applications ranging from simple tasks to complex collaborations.
Zen-Ai-Pentest
Zen-AI-Pentest is a professional AI-powered penetration testing framework designed for security professionals, bug bounty hunters, and enterprise security teams. It combines cutting-edge language models with 20+ integrated security tools, offering comprehensive security assessments. The framework is security-first with multiple safety controls, extensible with a plugin system, cloud-native for deployment on AWS, Azure, or GCP, and production-ready with CI/CD, monitoring, and support. It features autonomous AI agents, risk analysis, exploit validation, benchmarking, CI/CD integration, AI persona system, subdomain scanning, and multi-cloud & virtualization support.
osmedeus
Osmedeus is a security-focused declarative orchestration engine that simplifies complex workflow automation into auditable YAML definitions. It provides powerful automation capabilities without compromising infrastructure integrity and safety. With features like declarative YAML workflows, multiple runners, event-driven triggers, template engine, utility functions, REST API server, distributed execution, notifications, cloud storage, AI integration, SAST integration, language detection, and preset installations, Osmedeus offers a comprehensive solution for security automation tasks.
aiohomematic
AIO Homematic (hahomematic) is a lightweight Python 3 library for controlling and monitoring HomeMatic and HomematicIP devices, with support for third-party devices/gateways. It automatically creates entities for device parameters, offers custom entity classes for complex behavior, and includes features like caching paramsets for faster restarts. Designed to integrate with Home Assistant, it requires specific firmware versions for HomematicIP devices. The public API is defined in modules like central, client, model, exceptions, and const, with example usage provided. Useful links include changelog, data point definitions, troubleshooting, and developer resources for architecture, data flow, model extension, and Home Assistant lifecycle.
aio-coding-hub
AIO Coding Hub is a local AI CLI unified gateway that allows requests from Claude Code, Codex, and Gemini CLI to go through a single entry point. It solves the pain points of configuring base URLs and API keys for each CLI, provides intelligent failover in case of upstream instability, offers full observability with trace tracking and usage statistics, enables easy switching of providers with a single toggle, and ensures security and privacy through local data storage and encrypted API keys. The tool features a unified gateway proxy supporting multiple CLI tools, intelligent routing and fault tolerance, observability with request tracing and usage statistics, channel validation with multi-dimensional templates, and security and privacy measures like local data storage and encrypted API keys.
memsearch
Memsearch is a tool that allows users to give their AI agents persistent memory in a few lines of code. It enables users to write memories as markdown and search them semantically. Inspired by OpenClaw's markdown-first memory architecture, Memsearch is pluggable into any agent framework. The tool offers features like smart deduplication, live sync, and a ready-made Claude Code plugin for building agent memory.
kweaver
KWeaver is an open-source ecosystem for building, deploying, and running decision intelligence AI applications. It adopts ontology as the core methodology for business knowledge networks, with DIP as the core platform, aiming to provide elastic, agile, and reliable enterprise-grade decision intelligence to further unleash productivity. The DIP platform includes key subsystems such as ADP, Decision Agent, DIP Studio, and AI Store.
vibium
Vibium is a browser automation infrastructure designed for AI agents, providing a single binary that manages browser lifecycle, WebDriver BiDi protocol, and an MCP server. It offers zero configuration, AI-native capabilities, and is lightweight with no runtime dependencies. It is suitable for AI agents, test automation, and any tasks requiring browser interaction.
giztoy
Giztoy is a multi-language framework designed for building AI toys and intelligent applications. It provides a unified abstraction layer that spans from resource-constrained embedded systems to powerful cloud services. With features like native support for ESP32 and other MCUs, cross-platform app development, a unified build system with Bazel, an agent framework for AI agents, audio processing capabilities, support for various Large Language Models, real-time models with WebSocket streaming, secure transport protocols, and multi-language implementations in Go, Rust, Zig, and C/C++, Giztoy serves as a versatile tool for developing AI-powered applications across different platforms and devices.
huf
HUF is an AI-native engine designed to centralize intelligence and execution into a single engine, enabling AI to operate inside real business systems. It offers multi-provider AI connectivity, intelligent tools, knowledge grounding, event-driven execution, visual workflow builder, full auditability, and cost control. HUF can be used as AI infrastructure for products, internal intelligence platform, automation & orchestration engine, embedded AI layer for SaaS, and enterprise AI control plane. Core capabilities include agent system, knowledge management, trigger system, visual flow builder, and observability. The tech stack includes Frappe Framework, Python 3.10+, LiteLLM, SQLite FTS5, React 18, TypeScript, Tailwind CSS, and MariaDB.
forge-orchestrator
Forge Orchestrator is a Rust CLI tool designed to coordinate and manage multiple AI tools seamlessly. It acts as a senior tech lead, preventing conflicts, capturing knowledge, and ensuring work aligns with specifications. With features like file locking, knowledge capture, and unified state management, Forge enhances collaboration and efficiency among AI tools. The tool offers a pluggable brain for intelligent decision-making and includes a Model Context Protocol server for real-time integration with AI tools. Forge is not a replacement for AI tools but a facilitator for making them work together effectively.
For similar tasks
GenerateAgents.md
GenerateAgents.md is a tool that automatically generates Agents.md for any GitHub repository by analyzing its codebase using dspy.RLM (Recursive Language Model). It supports Gemini, Anthropic (Claude), and OpenAI models out of the box. The tool provides two output styles - Comprehensive Style for detailed overviews and explanations, and Strict Style focusing on coding constraints and anti-patterns. It follows a pipeline that involves cloning the repository, extracting codebase information, compiling conventions into markdown, and creating the final AGENTS.md file. The tool also supports environment variables for API keys and different models for generation tasks.
For similar jobs
weave
Weave is a toolkit for developing Generative AI applications, built by Weights & Biases. With Weave, you can log and debug language model inputs, outputs, and traces; build rigorous, apples-to-apples evaluations for language model use cases; and organize all the information generated across the LLM workflow, from experimentation to evaluations to production. Weave aims to bring rigor, best-practices, and composability to the inherently experimental process of developing Generative AI software, without introducing cognitive overhead.
LLMStack
LLMStack is a no-code platform for building generative AI agents, workflows, and chatbots. It allows users to connect their own data, internal tools, and GPT-powered models without any coding experience. LLMStack can be deployed to the cloud or on-premise and can be accessed via HTTP API or triggered from Slack or Discord.
VisionCraft
The VisionCraft API is a free API for using over 100 different AI models. From images to sound.
kaito
Kaito is an operator that automates the AI/ML inference model deployment in a Kubernetes cluster. It manages large model files using container images, avoids tuning deployment parameters to fit GPU hardware by providing preset configurations, auto-provisions GPU nodes based on model requirements, and hosts large model images in the public Microsoft Container Registry (MCR) if the license allows. Using Kaito, the workflow of onboarding large AI inference models in Kubernetes is largely simplified.
PyRIT
PyRIT is an open access automation framework designed to empower security professionals and ML engineers to red team foundation models and their applications. It automates AI Red Teaming tasks to allow operators to focus on more complicated and time-consuming tasks and can also identify security harms such as misuse (e.g., malware generation, jailbreaking), and privacy harms (e.g., identity theft). The goal is to allow researchers to have a baseline of how well their model and entire inference pipeline is doing against different harm categories and to be able to compare that baseline to future iterations of their model. This allows them to have empirical data on how well their model is doing today, and detect any degradation of performance based on future improvements.
tabby
Tabby is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features: * Self-contained, with no need for a DBMS or cloud service. * OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE). * Supports consumer-grade GPUs.
spear
SPEAR (Simulator for Photorealistic Embodied AI Research) is a powerful tool for training embodied agents. It features 300 unique virtual indoor environments with 2,566 unique rooms and 17,234 unique objects that can be manipulated individually. Each environment is designed by a professional artist and features detailed geometry, photorealistic materials, and a unique floor plan and object layout. SPEAR is implemented as Unreal Engine assets and provides an OpenAI Gym interface for interacting with the environments via Python.
Magick
Magick is a groundbreaking visual AIDE (Artificial Intelligence Development Environment) for no-code data pipelines and multimodal agents. Magick can connect to other services and comes with nodes and templates well-suited for intelligent agents, chatbots, complex reasoning systems and realistic characters.