An AI-powered GitHub repository agent that truly understands codebases and manages repository workflows with human-level intelligence.
- Semantic Code Understanding: Uses RAG (Retrieval-Augmented Generation) to understand your codebase at a deep level
- Intelligent Issue Handling: Auto-labels, categorizes, and responds to issues based on codebase knowledge
- PR Description Generation: Automatically generates comprehensive PR descriptions from diffs
- Duplicate Detection: Identifies and links related/duplicate issues
- Stale Issue Management: Automatically marks and closes stale issues/PRs
RepoMind uses a sophisticated agent loop:
- Perceive: Gathers context about events, issues, PRs, and relevant code
- Plan: Uses LLM to determine the best course of action
- Validate: Checks if actions require human approval
- Execute: Performs actions via GitHub API
- Reflect: Logs decisions and learns from feedback
- Full Auto: Agent acts independently on all decisions
- Balanced: Agent requires approval for critical actions (close, merge)
- Suggest Only: Agent only suggests actions, never executes
┌─────────────────────────────────────────────────────────────────┐
│ GitHub │
│ (Issues, PRs, Comments, Pushes) │
└──────────────────────┬──────────────────────────────────────────┘
│ Webhooks
▼
┌─────────────────────────────────────────────────────────────────┐
│ Webhook Handler │
│ - Validates signatures │
│ - Routes to appropriate processor │
└──────────────────────┬──────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Event Queue (Redis) │
│ - Ensures reliability │
│ - Handles rate limiting │
└──────────────────────┬──────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Agent Core │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Planner │→ │ Executor │→ │ Reflector │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Vector DB │ │ PostgreSQL │ │ Claude API │
│ (Codebase) │ │ (State) │ │ (LLM) │
└─────────────┘ └─────────────┘ └─────────────┘
- Runtime: Node.js/TypeScript
- LLM: Claude (Anthropic) or OpenAI
- Vector DB: Qdrant
- Database: PostgreSQL
- Queue: Redis + BullMQ
- GitHub: Octokit + GitHub App
- Node.js 20+
- PostgreSQL
- Redis
- Qdrant (or use cloud)
# Clone the repository
git clone https://github.com/yourusername/repomind.git
cd repomind
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Edit .env with your configurationEdit .env with your settings:
# LLM Provider (anthropic or openai)
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=your_api_key
# GitHub App
GITHUB_APP_ID=your_app_id
GITHUB_APP_PRIVATE_KEY=base64_encoded_key
GITHUB_WEBHOOK_SECRET=your_secret
# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/repomind
# Redis
REDIS_URL=redis://localhost:6379
# Qdrant
QDRANT_URL=http://localhost:6333# Run database migrations
npm run db:migrate
# Start the server
npm run dev
# In another terminal, start the worker
npm run worker
# Start the dashboard
npm run dashboard- Go to GitHub Developer Settings
- Create a new GitHub App
- Set the webhook URL to
https://your-domain.com/webhook - Configure permissions:
- Issues: Read & Write
- Pull requests: Read & Write
- Contents: Read
- Metadata: Read
- Subscribe to events:
- Issues
- Issue comment
- Pull request
- Pull request review
- Push
- Generate and download a private key
- Install the app on your repositories
Mention @repomind in any issue or PR comment:
@repomind explain how authentication works
@repomind find the user validation logic
@repomind summarize this issue
@repomind help
React to RepoMind's comments with:
- 👍 for positive feedback
- 👎 for negative feedback
Or reply with "helpful" or "not helpful" in your comment.
repomind/
├── src/
│ ├── agent/ # Core agent logic
│ │ ├── core.ts # Main agent loop
│ │ ├── planner.ts # Decision planning
│ │ ├── executor.ts # Action execution
│ │ ├── reflector.ts # Learning & feedback
│ │ └── memory.ts # Context & history
│ ├── tools/ # Agent tools
│ │ ├── github.ts # GitHub API wrapper
│ │ ├── codeSearch.ts # Code search
│ │ └── ragQuery.ts # Vector search
│ ├── indexer/ # Codebase indexing
│ │ ├── parser.ts # Code parsing
│ │ ├── embeddings.ts # Embedding generation
│ │ └── sync.ts # Index synchronization
│ ├── handlers/ # Event handlers
│ │ ├── issues.ts # Issue handling
│ │ ├── pullRequests.ts
│ │ └── comments.ts
│ ├── web/ # Dashboard
│ │ ├── api/ # REST API
│ │ └── dashboard/ # React UI
│ ├── db/ # Database
│ ├── queue/ # Job queue
│ └── index.ts # Entry point
├── tests/
└── docs/
GET /health # Health check
GET /api/repositories # List repositories
GET /api/repositories/:id # Get repository details
PATCH /api/repositories/:id/settings # Update settings
POST /api/repositories/:id/reindex # Trigger reindex
GET /api/repositories/:id/actions # Get action logs
POST /api/feedback # Submit feedback
GET /api/dashboard/metrics # Dashboard metrics
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run type checking
npm run typecheck
# Run linting
npm run lintFROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY dist ./dist
CMD ["node", "dist/index.js"]See deployment guides in /docs/deployment/.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.