AgentForge is a powerful AI Agent File Generator Tool designed to streamline the process of preparing your codebases for AI-driven development. It analyzes projects and generates precise, professional AI agent configuration files, along with custom prompts for various AI models.
- Project Analysis: Scans codebases to detect tech stack, frameworks, file structure, and conventions.
- AI Agent File Generation: Automatically creates standardized AI configuration files like
AGENTS.mdand.agents/rules/base.md. - Multi-Provider AI Support: Supports Google Gemini, Anthropic Claude, OpenAI, Grok, and DeepSeek.
- Dynamic Prompt Generation: Craft specific or multi-step prompts based on project context and desired AI agent roles.
- Interactive Chat: Engage with AI models in a contextual chat, leveraging your project's analysis for more relevant conversations.
- Configurable Scans: Customize file inclusion/exclusion, depth, and token budget for tailored project insights.
- Real-time Logging: Monitor all operations and AI interactions with a comprehensive log system.
- Local Caching: Persists project analysis to disk for faster subsequent operations.
- Cross-platform Folder Browsing: Native folder selection dialogs for Windows, macOS, and Linux.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need Node.js (LTS recommended) installed on your system. Download Node.js
-
Clone the repository:
git clone https://github.com/args0179/AgentForge.git cd AgentForge -
Install dependencies:
npm install
-
Start the server:
npm start
or open start.bat file
This will start the Express server and automatically open the web interface in your default browser.
If you prefer to run in development mode with
nodemonfor auto-restarts:npm run dev
-
Analyze Project:
- In the AgentForge web interface, enter the
Path to Project Folderyou want to analyze. - Enter your
API Keyfor your preferred AI provider (e.g., Gemini, Claude, OpenAI). - Click
Analyze Project. The tool will scan your codebase and sends a structured summary to the AI to detect architecture patterns, and conventions. - The analyzed project context will be cached locally.
- In the AgentForge web interface, enter the
-
Generate AI Agent Files:
- After analysis, select the type of AI agent files you want to generate (e.g.,
AGENTS.md,.agents/rules/base.md). - Click
Generate. - The generated content will be displayed, ready for review.
- After analysis, select the type of AI agent files you want to generate (e.g.,
-
Save Files:
- If you're satisfied with the generated files, click
Saveto write them directly into your project folder.
- If you're satisfied with the generated files, click
-
Generate Prompts:
- Use the
Generate Promptfeature to create specific AI prompts tailored with project context for various tasks.
- Use the
-
Chat with Context:
- Utilize the
Chatinterface to interact with an AI model while providing it with the current project's analysis.
- Utilize the
agentforge/
├── generators/
│ ├── analyzer.js
│ ├── fileReader.js
│ └── templates.js
├── public/
│ └── index.html
├── .env.example
├── .gitignore
├── package.json
├── README.md
├── server.js
├── start.bat
└── stop.bat
server.js: The main Express.js application file, handling API routes and serving the frontend.public/: Contains static assets for the web interface, primarilyindex.html.generators/: Houses the core logic for project scanning, AI analysis, file generation, and prompt templating.analyzer.js: Connects to AI providers, performs project analysis, and generates content.fileReader.js: Scans the project directory, reads files, and estimates token usage.templates.js: Stores prompt templates for various AI agent configuration files.
.env.example: Template for environment variables.package.json: Defines project metadata and dependencies.start.bat/stop.bat: Simple batch scripts for Windows users to start/stop the application (not explicitly covered inpackage.jsonscripts but part of the project structure).
To run this project, you need to set up your environment variables. Copy .env.example to .env and fill in the values.
| Variable | Description | Example Default (from .env.example) |
|---|---|---|
GEMINI_API_KEY |
Your API key for Google Gemini. | AIzaSyC... (placeholder) |
PORT |
The port on which the server will run. | 3456 |
Contributions are welcome! If you have suggestions for improvements, new features, or bug fixes, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.