π The AI Coding Companion That Understands Your GitHub Repositories
Installation β’ Quick Start β’ Example Usage β’ Documentation β’ Contributing
If GitPilot saves you time or helps your projects, please give us a star! β
Your support helps us:
- π Build new features faster
- π Fix bugs and improve stability
- π Create better documentation
- π Grow the community
β Click here to star GitPilot on GitHub β it takes just 2 seconds and means the world to us! π
GitPilot is a production-ready agentic AI assistant that acts as your intelligent coding companion for GitHub repositories. Unlike copy-paste coding assistants, GitPilot:
- π§ Understands your entire codebase β Analyzes project structure, file relationships, and cross-repository dependencies
- π Shows clear plans before executing β Always presents an "Answer + Action Plan" with structured file operations (CREATE/MODIFY/DELETE/READ)
- π Manages multiple LLM providers β Seamlessly switch between OpenAI, Claude, Watsonx, and Ollama with smart model routing
- ποΈ Visualizes agent workflows β See exactly how the multi-agent system thinks and operates
- π Works locally and with GitHub β Full local file editing, terminal execution, and GitHub integration
- π Extensible ecosystem β MCP server connections, plugin marketplace, /command skills, and IDE extensions
- π‘οΈ Built-in security scanning β AI-powered vulnerability detection beyond traditional SAST tools
- π€ Self-improving agents β Learns from outcomes and adapts strategies per project over time
Built with CrewAI, FastAPI, and React β GitPilot combines the power of multi-agent AI with a beautiful, modern web interface and the extensibility of a platform.
# Install from PyPI
pip install gitcopilot
# Set your GitHub token
export GITPILOT_GITHUB_TOKEN="ghp_your_token_here"
# Set your LLM API key (choose one)
export OPENAI_API_KEY="sk-..."
# or
export ANTHROPIC_API_KEY="sk-ant-..."
# or
export WATSONX_API_KEY="your_api_key"
export WATSONX_PROJECT_ID="your_project_id"
# Launch GitPilot
gitpilot# 1. Start GitPilot (opens in browser automatically)
gitpilot
# 2. Select a repository from the sidebar
# β Search your GitHub repos
# β Click to connect
# 3. Ask GitPilot to make changes
# Example: "Add a new API endpoint for user login with JWT authentication"
# 4. Review the generated plan
# β Answer: Explanation of what will be done
# β Action Plan: Structured steps with file operations
# - CREATE: src/api/auth.py
# - MODIFY: src/routes/index.py
# - READ: README.md (for analysis)
# - DELETE: deprecated/old_auth.py
# 5. Approve & Execute
# β GitPilot applies changes to your repository
# β View execution log with detailed resultsAdd a new feature:
User: Add a rate limiter to all API endpoints to prevent abuse
GitPilot Response:
Answer: I'll implement rate limiting using a middleware approach with Redis
for distributed rate limiting support.
Action Plan:
Step 1: Create rate limiter middleware
- CREATE: src/middleware/rate_limiter.py
Step 2: Add Redis client configuration
- MODIFY: src/config.py
Step 3: Apply middleware to all routes
- MODIFY: src/main.py
Step 4: Add rate limit tests
- CREATE: tests/test_rate_limiter.py
Refactor existing code:
User: Refactor the user authentication to use async/await instead of callbacks
GitPilot Response:
Answer: I'll convert all authentication functions to async/await pattern,
update the database queries, and ensure all tests pass.
Action Plan:
Step 1: Analyze current authentication implementation
- READ: src/services/auth_service.py
- READ: src/routes/auth.py
Step 2: Convert auth service to async
- MODIFY: src/services/auth_service.py (12 functions)
Step 3: Update route handlers
- MODIFY: src/routes/auth.py
Step 4: Migrate database calls
- MODIFY: src/db/user_repository.py
Step 5: Update unit tests
- MODIFY: tests/test_auth_service.py
Fix a bug:
User: Fix the bug where empty email validation returns a 500 error instead of 400
GitPilot Response:
Answer: I'll add proper input validation with Pydantic models and return
appropriate HTTP 400 errors with helpful messages.
Action Plan:
Step 1: Add Pydantic validation model
- CREATE: src/models/user_input.py
Step 2: Update login endpoint with validation
- MODIFY: src/routes/auth.py
Step 3: Add validation error handler
- MODIFY: src/main.py
Step 4: Add test cases for validation
- MODIFY: tests/test_validation.py
Every AI response is structured into two clear sections:
- Answer: Natural language explanation of what will be done and why
- Action Plan: Structured list of steps with explicit file operations:
- π’ CREATE β New files to be added
- π΅ MODIFY β Existing files to be changed
- π΄ DELETE β Files to be removed
- π READ β Files to analyze (no changes)
See exactly what will happen before approving execution!
All four LLM providers are fully operational and tested:
- β OpenAI β GPT-4o, GPT-4o-mini, GPT-4-turbo
- β Claude (Anthropic) β Claude 4.5 Sonnet, Claude 3 Opus
- β IBM Watsonx.ai β Llama 3.3, Granite 3.x models
- β Ollama β Local models (Llama3, Mistral, CodeLlama, Phi3)
Switch between providers seamlessly through the Admin UI without restart. The smart model router automatically selects the optimal model (fast/balanced/powerful) for each task based on complexity analysis, keeping costs low while maintaining quality where it matters.
GitPilot now works directly on your local filesystem β just like Claude Code:
- Local file editing β Read, write, search, and delete files in a sandboxed workspace
- Terminal execution β Run shell commands (
npm test,make build,python -m pytest) with timeout and output capping - Git operations β Commit, push, diff, stash, merge β all from the workspace
- Path traversal protection β All file operations are sandboxed to prevent escaping the workspace directory
Persistent sessions that survive restarts and support time-travel:
- Resume any session β Pick up exactly where you left off
- Fork sessions β Branch a conversation to try different approaches
- Checkpoint & rewind β Snapshot workspace state at key moments and roll back if something goes wrong
- CI/CD headless mode β Run GitPilot non-interactively via
gitpilot run --headlessfor automation pipelines
Fine-grained control over what agents can do:
- Lifecycle hooks β Register shell commands that fire on events like
pre_commit,post_edit, orpre_pushβ blocking hooks can veto risky actions - Three permission modes β
normal(ask before risky ops),plan(read-only),auto(approve everything) - Path-based blocking β Prevent agents from touching
.env,*.pem, or any sensitive file pattern
The equivalent of Claude Code's CLAUDE.md β teach your agents project-specific conventions:
- Create
.gitpilot/GITPILOT.mdwith your code style, testing, and commit message rules - Add modular rules in
.gitpilot/rules/*.md - Agents automatically learn patterns from session outcomes and store them in
.gitpilot/memory.json
Connect GitPilot to any MCP (Model Context Protocol) server β databases, Slack, Figma, Sentry, and more:
- stdio, HTTP, and SSE transports β Connect to local subprocess servers or remote endpoints
- JSON-RPC 2.0 β Full protocol compliance with tool discovery and invocation
- Auto-wrap as CrewAI tools β MCP tools are automatically available to all agents
- Configure servers in
.gitpilot/mcp.jsonwith environment variable expansion
Extend GitPilot with community plugins and project-specific skills:
- Install plugins from git URLs or local paths β each plugin can provide skills, hooks, and MCP configs
- Define skills as markdown files in
.gitpilot/skills/*.mdwith YAML front-matter and template variables - Invoke skills via
/commandsyntax in chat or the CLI:gitpilot skill review - Auto-trigger skills based on context patterns (e.g., auto-run lint after edits)
Multimodal capabilities powered by OpenAI, Anthropic, and Ollama vision models:
- Analyse screenshots β Describe UI bugs, extract text via OCR, review design mockups
- Compare before/after β Detect visual regressions between two screenshots
- Base64 encoding with format validation (PNG, JPG, GIF, WebP, BMP, SVG) and 20 MB size limit
Go beyond traditional SAST tools with pattern-based and context-aware vulnerability detection:
- Secret detection β AWS keys, GitHub tokens, JWTs, Slack tokens, private keys, passwords in code
- Code vulnerability patterns β SQL injection, command injection, XSS, SSRF, path traversal, weak crypto, insecure CORS, disabled SSL verification
- Diff scanning β Scan only added lines in a git diff for CI/CD integration
- CWE mapping β Every finding links to its CWE identifier with actionable recommendations
- CLI command β
gitpilot scan /path/to/repowith confidence thresholds and severity summaries
Proactive suggestions based on what you just did:
- After merging a PR β suggest updating the changelog
- After test failure β suggest debugging approach
- After dependency update β suggest running full test suite
- After editing security-sensitive code β suggest security review
- 8 built-in trigger rules with configurable cooldowns and relevance scoring
- Add custom prediction rules for your own workflows
Split large tasks across multiple agents working simultaneously:
- Task decomposition β Automatically split complex tasks into independent subtasks
- Parallel execution β Agents work concurrently via
asyncio.gather, each on its own git worktree - Conflict detection β Merging detects file-level conflicts when multiple agents touch the same files
- Custom or auto-generated plans β provide your own subtask descriptions or let the engine split evenly
GitPilot learns from every interaction and becomes specialised to each project over time:
- Outcome evaluation β Checks signals like tests_passed, pr_approved, error_fixed
- Pattern extraction β Generates natural-language insights from successes and failures
- Per-repo persistence β Learned strategies are stored in JSON and loaded in future sessions
- Preferred style tracking β Record project-specific code style preferences that agents follow
Understand dependencies and impact across your entire codebase:
- Dependency graph construction β Parses
package.json,requirements.txt,pyproject.toml, andgo.mod - Impact analysis β BFS traversal to find all affected repos when updating a dependency, with risk assessment (low/medium/high/critical)
- Shared convention detection β Find common config patterns across multiple repos
- Migration planning β Generate step-by-step migration plans when replacing one package with another
Query your project's databases using plain English through MCP connections:
- NL-to-SQL translation β Rule-based translation with schema-aware table and column matching
- Safety validation β Read-only mode blocks INSERT/UPDATE/DELETE; read-write mode blocks DROP/TRUNCATE
- Query explanation β Translate SQL back to human-readable descriptions
- Tabular output β Results formatted as plain-text tables for CLI or API consumption
Use GitPilot from your favourite editor:
- VS Code extension β Sidebar chat panel, inline actions, keybindings (Ctrl+Shift+G), skill invocation, and server configuration
- Connects to the GitPilot API server β all the same agents and tools available from within your editor
Seven pre-wired agent topologies that control routing, execution, and visualization in one place:
- System architectures (Default fan-out, GitPilot Code ReAct loop) and task pipelines (Feature Builder, Bug Hunter, Code Inspector, Architect Mode, Quick Fix) β each with its own agent roster, execution style, and flow graph
- Zero-latency classifier selects the best topology from the user's message without an extra LLM call, while the Flow Viewer dropdown lets you switch or pin a topology at any time
Interactive visual representation of the CrewAI multi-agent system using ReactFlow:
- Repository Explorer β Thoroughly explores codebase structure
- Refactor Planner β Creates safe, step-by-step plans with verified file operations
- Code Writer β Implements approved changes with AI-generated content
- Code Reviewer β Reviews for quality and safety
- Local Editor & Terminal β Direct file editing and shell execution agents
- GitHub API Tools β Manages file operations and commits
Full-featured LLM provider configuration with:
- OpenAI β API key, model selection, optional base URL
- Claude β API key, model selection (Claude 4.5 Sonnet recommended)
- IBM Watsonx.ai β API key, project ID, model selection, regional URLs
- Ollama β Base URL (local), model selection
Settings are persisted to ~/.gitpilot/settings.json and survive restarts.
GitPilot can optionally run as an A2A agent server that can be imported by URL into MCP ContextForge (MCP Gateway) and exposed as MCP tools. This makes GitPilot usable not only from the web UI, but also from:
- MCP-enabled IDEs and CLIs
- automation pipelines (CI/CD)
- other AI agents orchestrated by an MCP gateway
A2A mode is feature-flagged and does not affect the existing UI/API unless enabled.
pip install gitcopilot# Clone the repository
git clone https://github.com/ruslanmv/gitpilot.git
cd gitpilot
# Install dependencies
make install
# Build frontend
make frontend-build
# Run GitPilot
gitpilotdocker pull ruslanmv/gitpilot
docker run -p 8000:8000 -e GITHUB_TOKEN=your_token ruslanmv/gitpilot- Python 3.11+
- GitHub Personal Access Token (with
reposcope) - API key for at least one LLM provider (OpenAI, Claude, Watsonx, or Ollama)
Create a GitHub Personal Access Token at https://github.com/settings/tokens with repo scope:
export GITPILOT_GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXX"
# or
export GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXX"You can configure providers via the web UI's Admin/Settings page, or set environment variables:
export OPENAI_API_KEY="sk-..."
export GITPILOT_OPENAI_MODEL="gpt-4o-mini" # optionalexport ANTHROPIC_API_KEY="sk-ant-..."
export GITPILOT_CLAUDE_MODEL="claude-3-5-sonnet-20241022" # optionalNote: Claude integration now includes automatic environment variable configuration for seamless CrewAI compatibility.
export WATSONX_API_KEY="your-watsonx-api-key"
export WATSONX_PROJECT_ID="your-project-id" # Required!
export WATSONX_BASE_URL="https://us-south.ml.cloud.ibm.com" # optional, region-specific
export GITPILOT_WATSONX_MODEL="ibm/granite-3-8b-instruct" # optionalNote: Watsonx integration requires both API key and Project ID for proper authentication.
export OLLAMA_BASE_URL="http://localhost:11434"
export GITPILOT_OLLAMA_MODEL="llama3" # optionalgitpilotThis will:
- Start the FastAPI backend on
http://127.0.0.1:8000 - Serve the web UI at the root URL
- Open your default browser automatically
Alternative commands:
# Custom host and port
gitpilot serve --host 0.0.0.0 --port 8000
# API only (no browser auto-open)
gitpilot-api
# Headless mode for CI/CD
gitpilot run --repo owner/repo --message "fix the login bug" --headless
# Initialize project conventions
gitpilot init
# Security scan
gitpilot scan /path/to/repo
# Get proactive suggestions
gitpilot predict "Tests failed in auth module"
# Manage plugins
gitpilot plugin install https://github.com/example/my-plugin.git
gitpilot plugin list
# List and invoke skills
gitpilot skill list
gitpilot skill review
# List available models
gitpilot list-models --provider openai
# Using make (for development)
make runGitPilot can run as a self-contained MCP server with A2A endpoints. You can use it standalone or optionally integrate with MCP ContextForge gateway for advanced multi-agent workflows.
-
Simple MCP Server (recommended for most users)
- Just GitPilot with A2A endpoints enabled
- Direct MCP client connections
- Use
make mcpto deploy
-
Full MCP Gateway (optional - with ContextForge)
- Complete MCP ContextForge infrastructure
- Advanced gateway features and orchestration
- Use
make gatewayto deploy
- Direct MCP access: Use GitPilot from MCP-enabled IDEs/CLIs without additional infrastructure
- No UI required: Call GitPilot programmatically from automation pipelines
- Composable: GitPilot can act as the "repo editor agent" inside larger multi-agent workflows
- Gateway optional: Full ContextForge gateway only needed for advanced orchestration scenarios
A2A endpoints are disabled by default. Enable them using environment variables:
export GITPILOT_ENABLE_A2A=true
# Recommended: protect the A2A endpoint (gateway will inject this header)
export GITPILOT_A2A_REQUIRE_AUTH=true
export GITPILOT_A2A_SHARED_SECRET="REPLACE_WITH_LONG_RANDOM_SECRET"Then start GitPilot as usual:
gitpilot serve --host 0.0.0.0 --port 8000When enabled, GitPilot exposes:
POST /a2a/invokeβ A2A invoke endpoint (JSON-RPC + envelope fallback)POST /a2a/v1/invokeβ Versioned alias (recommended for gateways)GET /a2a/healthβ Health checkGET /a2a/manifestβ Capability discovery (methods + auth hints)
GitPilot supports a gateway-friendly model:
-
Gateway β GitPilot authentication:
X-A2A-Secret: <shared_secret>(recommended) orAuthorization: Bearer <shared_secret>
-
GitHub auth (optional):
X-Github-Token: <token>(recommended when not using a GitHub App internally)
Tip: Avoid sending GitHub tokens in request bodies. Prefer headers to reduce accidental logging exposure.
Note: This section is only needed if you're using the full MCP ContextForge gateway (make gateway). If you're using the simple MCP server (make mcp), you can connect MCP clients directly to GitPilot's A2A endpoints.
Once the full gateway stack is deployed, register GitPilot as an A2A agent in ContextForge by providing the endpoint URL (note trailing / is recommended for JSON-RPC mode):
- Endpoint URL:
https://YOUR_GITPILOT_DOMAIN/a2a/v1/invoke/
- Agent type:
jsonrpc
- Inject auth header:
X-A2A-Secret: <shared_secret>
After registration, MCP clients connected to the gateway will see GitPilot as an MCP tool (name depends on the gateway configuration).
GitPilot exposes a small, composable set of methods:
repo.connectβ validate access and return repo metadatarepo.treeβ list repository tree / filesrepo.readβ read a filerepo.writeβ create/update a file (commit)plan.generateβ generate an action plan for a goalplan.executeβ execute an approved planrepo.search(optional) β search repositories
These methods are designed to remain stable even if internal implementation changes.
# Configure MCP server
cp .env.a2a.example .env.a2a
# Edit .env.a2a and set GITPILOT_A2A_SHARED_SECRET
# Start GitPilot MCP server
make mcpThis starts GitPilot with A2A endpoints only - perfect for most use cases.
Only needed if you want the complete MCP ContextForge gateway infrastructure:
# 1. Download ContextForge and place at: deploy/a2a-mcp/mcp-context-forge
# 2. Configure environment
cd deploy/a2a-mcp
cp .env.stack.example .env.stack
# Edit .env.stack and set secrets
# 3. Start full gateway stack
cd ../..
make gateway
# 4. Register GitPilot agent in ContextForge
export CF_ADMIN_BEARER="<jwt-token>"
export GITPILOT_A2A_SECRET="<same-as-env-stack>"
make gateway-registerNote: Most users only need make mcp. The full gateway is optional for advanced setups.
See deploy/a2a-mcp/README.md for detailed deployment instructions.
Because the A2A adapter is stateless, GitPilot can be deployed with multiple replicas behind a load balancer. For long-running executions, consider adding async job execution (Redis/Postgres) in a future release.
Step 1: Launch GitPilot
gitpilotYour browser opens to http://127.0.0.1:8000
Step 2: Configure LLM Provider
- Click "βοΈ Admin / Settings" in the sidebar
- Select your preferred provider (e.g., OpenAI, Claude, Watsonx, or Ollama)
- Enter your credentials:
- OpenAI: API key + model
- Claude: API key + model
- Watsonx: API key + Project ID + model + base URL
- Ollama: Base URL + model
- Click "Save settings"
- See the success message confirming your settings are saved
Step 3: Connect to GitHub Repository
- Click "π Workspace" to return to the main interface
- In the sidebar, use the search box to find your repository
- Click "Search my repos" to list all accessible repositories
- Click on any repository to connect
- The Project Context Panel will show repository information
- Use the Refresh button to update permissions and file counts
Step 1: Browse Your Codebase
- The Project Context panel shows repository metadata
- Browse the file tree to understand structure
- Click on files to preview their contents
- Use the Refresh button to update the file tree after changes
Step 2: Describe Your Task In the chat panel, describe what you want in natural language:
Example 1: Add a Feature
Add a new API endpoint at /api/users/{id}/profile that returns
user profile information including name, email, and bio.
Example 2: Refactor Code
Refactor the authentication middleware to use JWT tokens
instead of session cookies. Update all related tests.
Example 3: Analyze and Generate
Analyze the README.md file and generate Python example code
that demonstrates the main features.
Example 4: Fix a Bug
The login endpoint is returning 500 errors when the email
field is empty. Add proper validation and return a 400
with a helpful error message.
Step 3: Review the Answer + Action Plan GitPilot will show you:
Answer Section:
- Clear explanation of what will be done
- Why this approach was chosen
- Overall summary of changes
Action Plan Section:
- Numbered steps with descriptions
- File operations with colored pills:
- π’ CREATE β Files to be created
- π΅ MODIFY β Files to be modified
- π΄ DELETE β Files to be removed
- π READ β Files to analyze (no changes)
- Summary totals (e.g., "2 files to create, 3 files to modify, 1 file to read")
- Risk warnings when applicable
Step 4: Execute or Refine
- If the plan looks good: Click "Approve & Execute"
- If you want changes: Provide feedback in the chat
The plan looks good, but please also add rate limiting to the new endpoint to prevent abuse. - GitPilot will update the plan based on your feedback
Step 5: View Execution Results After execution, see a detailed log:
Step 1: Create authentication endpoint
β Created src/api/auth.py
β Modified src/routes/index.py
Step 2: Add authentication tests
β Created tests/test_auth.py
βΉοΈ READ-only: inspected README.md
Step 6: Refresh File Tree After agent operations:
- Click the Refresh button in the file tree header
- See newly created/modified files appear
- Verify changes were applied correctly
Step 7: View Agent Workflow (Optional) Click "π Agent Flow" to see:
- How agents collaborate (Explorer β Planner β Code Writer β Reviewer)
- Data flow between components
- The complete multi-agent system architecture
frontend/
βββ App.jsx # Main application with navigation
βββ components/
β βββ AssistantMessage.jsx # Answer + Action Plan display
β βββ ChatPanel.jsx # AI chat interface
β βββ FileTree.jsx # Repository file browser with refresh
β βββ FlowViewer.jsx # Agent workflow visualization
β βββ Footer.jsx # Footer with GitHub star CTA
β βββ LlmSettings.jsx # Provider configuration UI
β βββ PlanView.jsx # Enhanced plan rendering with READ support
β βββ ProjectContextPanel.jsx # Repository context with refresh
β βββ RepoSelector.jsx # Repository search/selection
βββ styles.css # Global styles with dark theme
βββ index.html # Entry point
βββ package.json # Dependencies (React, ReactFlow)
gitpilot/
βββ __init__.py
βββ api.py # FastAPI routes (80+ endpoints)
βββ agentic.py # CrewAI multi-agent orchestration
βββ agent_router.py # NLP-based request routing
βββ agent_tools.py # GitHub API exploration tools
βββ cli.py # CLI (serve, run, scan, predict, plugin, skill)
βββ github_api.py # GitHub REST API client
βββ github_app.py # GitHub App installation management
βββ github_issues.py # Issue CRUD operations
βββ github_pulls.py # Pull request operations
βββ github_search.py # Code, issue, repo, user search
βββ github_oauth.py # OAuth web + device flow
βββ llm_provider.py # Multi-provider LLM factory
βββ settings.py # Configuration management
βββ topology_registry.py # Switchable agent topologies (7 built-in)
β
β # --- Phase 1: Feature Parity ---
βββ workspace.py # Local git clone & file operations
βββ local_tools.py # CrewAI tools for local editing
βββ terminal.py # Sandboxed shell command execution
βββ session.py # Session persistence & checkpoints
βββ hooks.py # Lifecycle event hooks
βββ memory.py # GITPILOT.md context memory
βββ permissions.py # Fine-grained permission policies
βββ headless.py # CI/CD headless execution mode
β
β # --- Phase 2: Ecosystem Superiority ---
βββ mcp_client.py # MCP server connector (stdio/HTTP/SSE)
βββ plugins.py # Plugin marketplace & management
βββ skills.py # /command skill system
βββ vision.py # Multimodal image analysis
βββ smart_model_router.py # Auto-route tasks to optimal model
β
β # --- Phase 3: Intelligence Superiority ---
βββ agent_teams.py # Parallel multi-agent on git worktrees
βββ learning.py # Self-improving agents (per-repo)
βββ cross_repo.py # Dependency graphs & impact analysis
βββ predictions.py # Predictive workflow suggestions
βββ security.py # AI-powered security scanner
βββ nl_database.py # Natural language SQL via MCP
β
βββ a2a_adapter.py # Optional A2A/MCP gateway adapter
βββ web/ # Production frontend build
βββ index.html
βββ assets/
GET /api/reposβ List user repositories (paginated + search)GET /api/repos/{owner}/{repo}/treeβ Get repository file treeGET /api/repos/{owner}/{repo}/fileβ Get file contentsPOST /api/repos/{owner}/{repo}/fileβ Update/commit file
GET/POST/PATCH /api/repos/{owner}/{repo}/issuesβ Full issue CRUDGET/POST /api/repos/{owner}/{repo}/pullsβ Pull request managementPUT /api/repos/{owner}/{repo}/pulls/{n}/mergeβ Merge pull request
GET /api/search/codeβ Search code across GitHubGET /api/search/issuesβ Search issues and pull requestsGET /api/search/repositoriesβ Search repositoriesGET /api/search/usersβ Search users and organisations
POST /api/chat/messageβ Conversational dispatcher (auto-routes to agents)POST /api/chat/planβ Generate execution planPOST /api/chat/executeβ Execute approved planPOST /api/chat/execute-with-prβ Execute and auto-create pull requestPOST /api/chat/routeβ Preview routing without execution
GET/POST/DELETE /api/sessionsβ Session CRUDPOST /api/sessions/{id}/checkpointβ Create checkpointGET/POST/DELETE /api/hooksβ Hook registrationGET/PUT /api/permissionsβ Permission mode managementGET/POST /api/repos/{owner}/{repo}/contextβ Project memory
GET /api/mcp/serversβ List configured MCP serversPOST /api/mcp/connect/{name}β Connect to MCP serverPOST /api/mcp/callβ Call a tool on a connected serverGET/POST/DELETE /api/pluginsβ Plugin managementGET/POST /api/skillsβ Skill listing and invocationPOST /api/vision/analyzeβ Analyse an image with a text promptPOST /api/model-router/selectβ Preview model selection for a task
POST /api/agent-teams/planβ Split task into parallel subtasksPOST /api/agent-teams/executeβ Execute subtasks in parallelPOST /api/learning/evaluateβ Evaluate action outcome for learningGET /api/learning/insights/{owner}/{repo}β Get learned insightsPOST /api/cross-repo/dependenciesβ Build dependency graphPOST /api/cross-repo/impactβ Impact analysis for package updatePOST /api/predictions/suggestβ Get proactive suggestionsPOST /api/security/scan-fileβ Scan file for vulnerabilitiesPOST /api/security/scan-directoryβ Recursive directory scanPOST /api/security/scan-diffβ Scan git diff for issuesPOST /api/nl-database/translateβ Natural language to SQLPOST /api/nl-database/explainβ Explain SQL in plain English
GET /api/flow/currentβ Get agent workflow graph (supports?topology=param)GET /api/flow/topologiesβ List available agent topologiesGET /api/flow/topology/{id}β Get graph for a specific topologyPOST /api/flow/classifyβ Auto-detect best topology for a messageGET /api/settings/topologyβ Read saved topology preferencePOST /api/settings/topologyβ Save topology preference
Enabled only when GITPILOT_ENABLE_A2A=true:
POST /a2a/invokeβ A2A invoke endpoint (JSON-RPC + envelope)POST /a2a/v1/invokeβ Versioned A2A endpoint (recommended)GET /a2a/healthβ A2A health checkGET /a2a/manifestβ A2A capability discovery (methods + schemas)
# Install all dependencies
make install
# Install frontend dependencies only
make frontend-install
# Build frontend for production
make frontend-build
# Run development server
make run
# Run tests (846 tests across 28 test files)
make test
# Lint code
make lint
# Format code
make fmt
# Build Python package
make build
# Clean build artifacts
make clean
# MCP Server Deployment (Simple - Recommended)
make mcp # Start GitPilot MCP server (A2A endpoints)
make mcp-down # Stop GitPilot MCP server
make mcp-logs # View MCP server logs
# MCP Gateway Deployment (Optional - Full ContextForge Stack)
make gateway # Start GitPilot + MCP ContextForge gateway
make gateway-down # Stop MCP ContextForge gateway
make gateway-logs # View gateway logs
make gateway-register # Register agent in ContextForgegitpilot # Start server with web UI (default)
gitpilot serve --host 0.0.0.0 # Custom host/port
gitpilot config # Show current configuration
gitpilot version # Show version
gitpilot run -r owner/repo -m "task" # Headless execution for CI/CD
gitpilot init # Initialize .gitpilot/ with template
gitpilot scan /path # Security scan a directory or file
gitpilot predict "context text" # Get proactive suggestions
gitpilot plugin install <source> # Install a plugin
gitpilot plugin list # List installed plugins
gitpilot skill list # List available skills
gitpilot skill <name> # Invoke a skill
gitpilot list-models # List LLM models for active providercd frontend
# Install dependencies
npm install
# Development mode with hot reload
npm run dev
# Build for production
npm run buildGitPilot uses automated publishing via GitHub Actions with OIDC-based trusted publishing.
- Update version in
gitpilot/version.py - Create and publish a GitHub release (tag format:
vX.Y.Z) - GitHub Actions automatically:
- Builds source distribution and wheel
- Uploads artifacts to the release
- Publishes to PyPI via trusted publishing
See .github/workflows/release.yml for details.
# Build distributions
make build
# Publish to TestPyPI
make publish-test
# Publish to PyPI
make publishWe love contributions! Whether it's bug fixes, new features, or documentation improvements.
- β Star the repository (if you haven't already!)
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature) - βοΈ Make your changes
- β
Run tests (
make test) - π¨ Run linter (
make lint) - π Commit your changes (
git commit -m 'Add amazing feature') - π Push to the branch (
git push origin feature/amazing-feature) - π― Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/gitpilot.git
cd gitpilot
# Install dependencies
make install
# Create a branch
git checkout -b feature/my-feature
# Make changes and test
make run
make testThis project is licensed under the MIT License - see the LICENSE file for details.
Ruslan Magana Vsevolodovna
- GitHub: @ruslanmv
- Website: ruslanmv.com
- CrewAI β Multi-agent orchestration framework
- FastAPI β Modern, fast web framework
- React β UI library
- ReactFlow β Interactive node-based diagrams
- Vite β Fast build tool
- MCP (Model Context Protocol) β By Anthropic, for tool interoperability
- OWASP Top 10 β Security vulnerability categorisation
- BIRD benchmark and DIN-SQL research β Text-to-SQL approaches
- Horvitz (1999) β Proactive assistance in HCI research
- All our contributors and stargazers! β
- Issues: https://github.com/ruslanmv/gitpilot/issues
- Discussions: https://github.com/ruslanmv/gitpilot/discussions
- Documentation: Full Documentation
Phase 1 β Feature Parity with Claude Code:
- β Local Workspace Manager β Clone repos, read/write/search files locally
- β Terminal Execution β Sandboxed shell commands with timeout and output capping
- β Session Persistence β Resume, fork, checkpoint, and rewind sessions
- β Hook System β Lifecycle events (pre_commit, post_edit) with blocking support
- β Permission Policies β Three modes (normal/plan/auto) with path-based blocking
- β Context Memory (GITPILOT.md) β Project conventions injected into agent prompts
- β
Headless CI/CD Mode β
gitpilot run --headlessfor automation pipelines
Phase 2 β Ecosystem Superiority:
- β MCP Client β Connect to any MCP server (databases, Slack, Figma, Sentry)
- β Plugin Marketplace β Install/uninstall plugins from git or local paths
- β Skill System β /command skills defined as markdown with template variables
- β Vision Analysis β Multimodal image analysis via OpenAI, Anthropic, or Ollama
- β Smart Model Router β Auto-route tasks to optimal model by complexity
- β VS Code Extension β Sidebar chat, inline actions, and keybindings
Phase 3 β Intelligence Superiority (no competitor has this):
- β Agent Teams β Parallel multi-agent execution on git worktrees
- β Self-Improving Agents β Learn from outcomes and adapt per-project
- β Cross-Repo Intelligence β Dependency graphs and impact analysis across repos
- β Predictive Workflows β Proactive suggestions based on context patterns
- β AI Security Scanner β Secret detection, injection analysis, CWE mapping
- β NL Database Queries β Natural language to SQL translation via MCP
- β Topology Registry β Seven switchable agent architectures with zero-latency message classification and visual topology selector
- β Full Multi-LLM Support β All 4 providers fully tested
- β Answer + Action Plan UX with structured file operations
- β Real Execution Engine with GitHub operations
- β Agent Flow Viewer with ReactFlow
- β MCP / A2A Integration (ContextForge compatible)
- β Issue and Pull Request management APIs
- β Code, issue, repository, and user search
- β OAuth web + device flow authentication
- π Frontend components for terminal, sessions, checkpoints, and security dashboard
- π JetBrains IDE plugin
- π Real-time collaboration (shared sessions, audit log)
- π Automated test generation from code changes
- π Slack/Discord notification hooks
- π LLM-powered semantic diff review
- π OSV dependency vulnerability scanning
- π Custom agent templates and agent marketplace
- Never commit API keys to version control
- Use environment variables or the Admin UI for credentials
- Rotate tokens regularly
- Limit GitHub token scopes to only what's needed
- Review all plans before approving execution
- Verify GitHub App installations before granting write access
- Run
gitpilot scanbefore releases to catch secrets, injection risks, and insecure configurations - Use permission modes β run agents in
planmode (read-only) when exploring unfamiliar codebases
All providers now fully supported! β¨
Each provider has specific requirements:
OpenAI
- Requires:
OPENAI_API_KEY - Optional:
GITPILOT_OPENAI_MODEL,OPENAI_BASE_URL
Claude (Anthropic)
- Requires:
ANTHROPIC_API_KEY - Optional:
GITPILOT_CLAUDE_MODEL,ANTHROPIC_BASE_URL - Note: Environment variables are automatically configured by GitPilot
IBM Watsonx.ai
- Requires:
WATSONX_API_KEY,WATSONX_PROJECT_ID - Optional:
WATSONX_BASE_URL,GITPILOT_WATSONX_MODEL - Note: Project ID is essential for proper authentication
Ollama
- Requires:
OLLAMA_BASE_URL - Optional:
GITPILOT_OLLAMA_MODEL - Note: Runs locally, no API key needed
GitPilot supports four file operation types in plans:
- CREATE (π’) β Add new files with AI-generated content
- MODIFY (π΅) β Update existing files intelligently
- DELETE (π΄) β Remove files safely
- READ (π) β Analyze files without making changes (new!)
READ operations allow agents to gather context and information without modifying your repository, enabling better-informed plans.
GitPilot uses a multi-agent architecture where each request is routed to the right set of agents by the agent router, which analyses your message using NLP patterns and dispatches to one of 12+ specialised agent types:
Core Agents:
- Repository Explorer β Scans codebase structure and gathers context
- Refactor Planner β Creates structured step-by-step plans with file operations
- Code Writer β Generates AI-powered content for new and modified files
- Code Reviewer β Reviews changes for quality, safety, and adherence to conventions
Local Agents (Phase 1):
- Local Editor β Reads, writes, and searches files directly on disk
- Terminal Agent β Executes shell commands (
npm test,make build,pytest)
Specialised Agents (v2):
- Issue Agent β Creates, updates, labels, and comments on GitHub issues
- PR Agent β Creates pull requests, lists files, manages merges
- Search Agent β Searches code, issues, repos, and users across GitHub
- Learning Agent β Evaluates outcomes and improves strategies over time
Intelligence Layer (Phase 3):
- Agent Teams β Multiple agents work in parallel on subtasks with conflict detection
- Predictive Engine β Suggests next actions before you ask
- Security Scanner β Detects secrets, injection risks, and insecure configurations
- Cross-Repo Analyser β Maps dependencies and assesses impact across repositories
The smart model router selects the optimal LLM for each task β simple queries go to fast/cheap models while complex reasoning gets the most powerful model available.
OpenAI (GPT-4o, GPT-4o-mini)
- β Best for: General-purpose coding, fast responses
- β Strengths: Excellent code quality, great at following instructions
- β Status: Fully tested and working
β οΈ Costs: Moderate to high
Claude (Claude 4.5 Sonnet)
- β Best for: Complex refactoring, detailed analysis
- β Strengths: Deep reasoning, excellent at planning
- β Status: Fully tested and working (latest integration fixes applied)
β οΈ Costs: Moderate to high
Watsonx (Llama 3.3, Granite 3.x)
- β Best for: Enterprise deployments, privacy-focused
- β Strengths: On-premise option, compliance-friendly
- β Status: Fully tested and working (project_id integration fixed)
β οΈ Costs: Subscription-based
Ollama (Local Models)
- β Best for: Cost-free operation, offline work
- β Strengths: Zero API costs, complete privacy
- β Status: Fully tested and working
β οΈ Performance: Depends on hardware, may be slower
Issue: "ANTHROPIC_API_KEY is required" error with Claude
- Solution: This is now automatically handled. Update to latest version or ensure environment variables are set via Admin UI.
Issue: "Fallback to LiteLLM is not available" with Watsonx
- Solution: Ensure you've set both
WATSONX_API_KEYandWATSONX_PROJECT_ID. Installlitellmif needed:pip install litellm
Issue: Plan generation fails with validation error
- Solution: Update to latest version which includes READ action support in schema validation.
Issue: "Read Only" status despite having write access
- Solution: Install the GitPilot GitHub App on your repository. Click the install link in the UI or refresh permissions.
Issue: File tree not updating after agent operations
- Solution: Click the Refresh button in the file tree header to see newly created/modified files.
For more issues, visit our GitHub Issues page.
β Don't forget to star GitPilot if you find it useful! β
β Star on GitHub β’ π Documentation β’ π Report Bug β’ π‘ Request Feature
GitPilot β Your AI Coding Companion for GitHub π
Made with β€οΈ by Ruslan Magana Vsevolodovna




