
How replit.md works
Agent first creates a replit.md file in your project’s root directory using proven best practices. This file includes:
- Basic project information
- Recommended coding patterns
- Common preferences for your project type
replit.md file and uses its contents to:
- Understand your project’s architecture and conventions
- Follow your preferred coding patterns and style
- Use your specified package managers and dependencies
replit.md file as it learns more about your project and makes changes to your application.
You can edit the
replit.md file to customize Agent’s behavior.Setting up replit.md
Automatic generation
When you create a new project with Agent, it automatically generates areplit.md file using proven best practices. This file appears in your project’s root directory and includes:
- Basic project information
- Recommended coding patterns
- Common preferences for your project type
Manual creation
You can create your ownreplit.md file by adding a new file named replit.md in your project’s root directory. Agent will automatically detect and use this file in future conversations.
replit.md must be located in your project’s root directory to work properly.Regenerating replit.md
If your replit.md file becomes corrupted or you want to start fresh:
- Delete the existing
replit.mdfile from your project root - Start a new conversation with Agent
- Agent will automatically generate a new
replit.mdfile based on your current project
Best practices
Be specific and clear
Write clear, specific instructions that help Agent understand exactly what you want:Use examples
Examples help Agent understand your preferences better than abstract descriptions:Define communication preferences
Tell Agent how you prefer to receive information and updates:Specify project context
Help Agent understand your project’s purpose and constraints:Example replit.md configurations
Web application project
Data analysis project
API development project
Advanced usage
Dynamic project guidance
Update yourreplit.md file as your project evolves to provide current context:
Integration with external tools
Reference external documentation and tools in yourreplit.md:
Combining web search with replit.md
Agent can perform web searches to find current information, libraries, and solutions. When combined with your replit.md file, you get both up-to-date knowledge and project-specific guidance.
Best practices for web search integration
Be specific about what you want Agent to research:replit.md”
This approach gives you solutions that are both current and tailored to your specific project needs.
Limitations
File size and content limits
While there’s no strict character limit forreplit.md, extremely large files may not be fully processed. Keep your replit.md focused and concise for best results.
Root directory requirement
replit.md must exist in your project’s root directory. Agent won’t automatically detect files in subdirectories.
Context scope
replit.md provides context for Agent conversations but doesn’t automatically apply to other AI tools.
Next steps
Ready to customize Agent for your project?- Start simple: Create a basic
replit.mdwith your key preferences - Iterate and improve: Update your
replit.mdas you work with Agent - Share patterns: Use successful
replit.mdconfigurations across similar projects - Monitor effectiveness: Pay attention to how well Agent follows your guidelines and adjust accordingly
replit.md in custom templates to give every builder in your organization a consistent starting context. For design-specific guidance, see setting up a design system.