Written by: Ali-Reza Adl-Tabatabai, Founder and CEO, Gitar
Key Takeaways
- Self-host Qodo PR-Agent with Docker to keep AI code review in your own environment and ease PR bottlenecks from rising pull request volume.
- Use docker-compose to run a persistent webhook server that automatically analyzes pull requests on GitHub and GitLab.
- Handle Mac and ARM compatibility with the
--platform linux/amd64flag and connect to local models like Ollama for offline reviews. - Set up CI/CD workflows in GitHub Actions and GitLab CI so every pull request triggers an automated review.
- Upgrade to Gitar when you need automatic code fixes and guaranteed green builds instead of suggestion-only reviews.
Prerequisites and Environment Setup for Qodo PR-Agent
Set up a few basics before you connect Qodo PR-Agent to Docker. You need Docker installed, a GitHub or GitLab personal access token with repository permissions, and access to the repositories you plan to analyze. Create a .env file in your working directory with the required environment variables. The table below shows the three core variables you need, their purpose, and an example format for valid values:
| Variable | Purpose | Example |
|---|---|---|
| GITHUB_TOKEN | Repository access | ghp_xxxxxxxxxxxx |
| OPENAI_API_KEY | AI model access | sk-xxxxxxxxxxxx |
| QODO_API_KEY | Optional Qodo services | qodo_xxxxxxxxxxxx |
For Mac M1 or other ARM-based machines, add the --platform linux/amd64 flag to Docker commands to avoid compatibility issues. If you plan to use local models instead of cloud APIs, note that self-hosted Ollama setups require a minimum of 8GB VRAM on NVIDIA GPUs for local inference of 8B parameter models.
Quick Start: Run Qodo PR-Agent Docker Locally
You can test Qodo PR-Agent quickly by running it against a single pull request. Follow these steps:
- Pull the latest Docker image:
docker pull codiumai/pr-agent:0.34 - Run against a PR URL:
docker run --platform linux/amd64 --env-file .env codiumai/pr-agent:0.34 /app/entrypoint.py --pr-url https://github.com/owner/repo/pull/123 --config-path .qodo/.pr_agent.json - Confirm that the analysis appears as comments on your pull request.
- Create a
.qodo/.pr_agent.jsonconfiguration file to customize behavior. - Test additional commands like
/reviewand/improveby commenting on pull requests.
Version 0.34 includes improvements for API key handling and file filtering.

Once you confirm Qodo PR-Agent works for one-off pull request analysis, move to a setup that runs continuously. Instead of running Docker manually for each pull request, you can deploy a persistent webhook server that analyzes every new pull request automatically.
Persistent Webhook Server Setup with Docker Compose
For production use, deploy Qodo PR-Agent as a persistent webhook server with docker-compose. This setup enables automatic pull request analysis without manual intervention.
version: '3.8' services: pr-agent: image: codiumai/pr-agent:0.34 platform: linux/amd64 ports: - "8080:8080" env_file: - .env volumes: - ./config:/app/.qodo - ./logs:/app/logs restart: unless-stopped command: webhook ollama: image: ollama/ollama:latest ports: - "11434:11434" volumes: - ollama_data:/root/.ollama restart: unless-stopped volumes: ollama_data:
Deploy with docker-compose up -d and configure GitHub webhooks to point to your server on port 8080. Some users report configuration challenges with Ollama integration, so monitor GitHub issues for updates and fixes.
Platform Integrations and CI/CD Examples
GitHub Actions with Docker
Integrate Qodo PR-Agent into GitHub Actions workflows so each pull request triggers a review.

name: PR Agent Review on: pull_request: types: [opened, synchronize] jobs: review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run PR Agent run: | docker run --platform linux/amd64 \ -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \ -e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \ codiumai/pr-agent:0.34 \ /app/entrypoint.py --pr-url ${{ github.event.pull_request.html_url }}
GitLab CI Integration
Use this configuration in .gitlab-ci.yml to run Qodo PR-Agent inside GitLab pipelines.
pr_review: image: docker:latest services: - docker:dind script: - docker run --platform linux/amd64 \ -e GITLAB_TOKEN=$GITLAB_TOKEN \ -e OPENAI_API_KEY=$OPENAI_API_KEY \ codiumai/pr-agent:0.34 \ /app/entrypoint.py --pr-url $CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID only: - merge_requests
For ARM or Mac development, use Docker buildx for multi-architecture support with this command: docker buildx build --platform linux/amd64,linux/arm64.
With your CI and CD integrations running, you interact with Qodo PR-Agent mainly through commands posted as pull request comments. A clear view of the full command set helps you get more value from your deployment.
Qodo PR-Agent Commands and Configuration Options
Qodo PR-Agent supports several commands that you can trigger through pull request comments or direct execution.
| Command | Function | Usage |
|---|---|---|
| /review | Code analysis and suggestions | Comment on PR |
| /describe | Generate PR description | Comment on PR |
| /improve | Code improvement suggestions | Comment on PR |
| /ask | Answer questions about changes | Comment with question |
Control behavior through .qodo/.pr_agent.json with settings for model selection, review depth, and output format. Use this configuration file to choose AI models, define review criteria, and adjust integration-specific settings for your environment.
Troubleshooting Common Qodo PR-Agent Issues
Use this table to diagnose and fix common deployment issues.
| Error | Cause | Solution |
|---|---|---|
| Token invalid | Insufficient permissions | Verify repo and pull request scopes |
| ARM architecture failure | Image compatibility | Add –platform linux/amd64 |
| /describe command fails | Configuration or version issue | Verify your setup and use the latest version |
| CI timeout | Resource limits | Increase memory and CPU limits |
| Ollama connection fails | Configuration issues | Check your .env configuration and model settings |
Running the latest available version often resolves issues with PR description generation and other command failures.
Limitations of Qodo and How to Evaluate Next-Level Tools
Qodo PR-Agent delivers useful code analysis but works as a suggestion engine instead of an automation platform. The tool identifies issues and recommends fixes, yet developers still need to apply changes manually. Configuration issues cause silent fallbacks to OpenAI-hosted models despite local endpoint settings, which weakens data sovereignty goals.
These limitations, including manual fix implementation and configuration complexity, highlight what to prioritize when you evaluate alternatives. The table below compares Qodo with a platform that addresses these gaps.
| Feature | Qodo PR-Agent | Gitar |
|---|---|---|
| Code suggestions | Yes | Yes |
| CI failure auto-fix | No | Yes |
| 14-day trial access | No | Start 14-day trial |
Tools like Gitar go beyond suggestions to implement fixes automatically, validate them against CI, and guarantee green builds. As mentioned earlier, Gitar offers a 14-day trial that lets you experience the difference between suggestion-only tools and platforms that apply and verify fixes for you.
Qodo PR-Agent works well as a starting point for teams exploring AI code review. Production environments with heavy pull request volume benefit more from platforms that remove manual fix implementation. The surge in pull requests from AI coding tools increases review load, so teams need automation that cuts developer toil instead of adding another review step.
Self-hosting Qodo PR-Agent with Docker helps reduce PR bottlenecks by automating the review step, while keeping data under your control. It does not remove the manual work of implementing fixes, which limits velocity gains in high-volume environments. For teams facing increased pull request volume from AI coding tools, the next step is moving from automated suggestions to automated fixes. Ready to move beyond suggestions? Install Gitar to automatically fix broken builds and ship higher quality software, faster.
Frequently Asked Questions
What is the difference between Qodo PR-Agent and Qodo Merge?
Qodo PR-Agent focuses on pull request analysis and code review automation, while Qodo Merge (formerly PR-Agent) provides broader testing and code generation capabilities. PR-Agent targets the code review bottleneck with Docker-deployable webhook servers, which makes it a strong fit for teams that want self-hosted review automation without external dependencies.
Can I run Qodo PR-Agent completely offline with local models?
Qodo PR-Agent supports integration with local LLM providers like Ollama for fully offline operation. Configuration may require careful setup to prevent fallbacks to external APIs. For guaranteed offline operation, consider platforms like Gitar that offer enterprise deployment options with full air-gapped support.
How should I handle the increased PR volume from AI coding tools?
AI coding tools can generate many more pull requests per developer, which strains traditional review processes. Start with automated analysis tools like Qodo PR-Agent to provide fast feedback on each pull request. Then evaluate platforms that automatically implement fixes, since reducing manual work in the review cycle matters more than adding extra analysis steps.
What are the hardware requirements for self-hosting with local models?
Self-hosted deployments with local LLM inference require a minimum of about 5GB VRAM for CodeLlama-7B using Q4 quantization. Docker deployments also need enough CPU and memory for concurrent pull request analysis. For production use, plan for engineering resources for ongoing maintenance and time for initial setup of complex integrations.
Should I use Docker Compose or direct Docker commands for production?
Use Docker Compose for production deployments that need persistent webhook servers, automatic restarts, and integration with services like Ollama. Direct Docker commands work well for one-off analysis or CI pipeline integration where you analyze specific pull requests instead of running a continuous service. Compose offers better orchestration for multi-service setups and simpler configuration management.