pr-agent Docker & Self-Hosted Deployment

GitHub

PR Agent: The Original Open-Source PR Reviewer. This project is not the Qodo free tier.

16,785 stars Python Python 1 file ยท ~130,481 tokens #ai#anthropic#code-review#coding-assistant#devtools#ollama#openai#pull-request
RAW Compose
1. Pull Image (DOCKERHUB) docker pull registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent
2. Docker Run (1-Click Launch) docker run -d --name pr-agent -p 23000:23000 --restart always registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent:0.41.0-mosaico_agent
3. Podman Run podman run -d --name pr-agent -p 23000:23000 --restart always registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent:0.41.0-mosaico_agent
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent:0.41.0-mosaico_agent
5. ORAS Pull (OCI Artifact) oras pull registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent:0.41.0-mosaico_agent
6. Compose Deployment docker compose up -d
docker/mosaico/docker-compose.pr-agent.yml
Download .yml
# PR-Agent MOSAICO solution-agent overlay. Canonical source is docker/mosaico/ in
# github.com/The-PR-Agent/pr-agent - edit it there, never in a copy.
# Copy into the demonstrator's `compose/` dir, next to `base-definitions.yml`, so the
# `extends:` refs resolve; see ./README.md for the full wiring steps.
#
# Mirrors the demonstrator's `ip-solution-agent` pair: in-process A2A server on container
# port 9000 + ENDPOINT registration, so PR-Agent is treated like any other task agent.
services:
  pr-agent-solution-agent:
    extends:
      file: base-definitions.yml
      service: agent
    image: registry.eclipse.org/eclipse-research-labs/mosaico-project/qodo-pr-agent:0.41.0-mosaico_agent
    ports:
      - ${PR_AGENT_PORT:-23000}:9000
    environment:
      AGENT_CARD_HOST: ${PR_AGENT_HOST:-${DEFAULT_TASK_AGENT_HOST}}
      AGENT_CARD_PORT: ${PR_AGENT_PORT:-23000}
      MODEL_NAME: ${PR_AGENT_MODEL}
      # Client credential for the live healthcheck when server bearer auth is configured.
      MOSAICO_BEARER_TOKEN: ${PR_AGENT_BEARER_TOKEN:-}
    # Mirrors the peer agents' probe. /health is a live LLM check, so no LLM means no
    # registration - intended: a registered card with a dead LLM is worse.
    # PORT comes from base-definitions.yml's `agent` service; the :-9000 fallback keeps
    # the probe correct even if this overlay is composed without it.
    # timeout=25 sits between /health's own 10s LLM timeout and Docker's 30s default
    # healthcheck timeout, so a stalled probe fails as unhealthy rather than being killed.
    healthcheck:
      test: ["CMD-SHELL", "python -c \"import os, urllib.request; token=os.getenv('MOSAICO_BEARER_TOKEN'); request=urllib.request.Request('http://localhost:$${PORT:-9000}/health', headers={'Authorization': 'Bearer '+token} if token else {}); urllib.request.urlopen(request, timeout=25)\""]

  pr-agent-solution-agent-registration:
    extends:
      file: base-definitions.yml
      service: agent-registration
    environment:
      AGENT_NAME: pr-agent-solution-agent
      AGENT_JSON: /app/pr-agent-solution-agent.json
      # Stored in the repository and fetched by out-of-Docker clients, so it must be
      # host-reachable, not a compose service name.
      AGENT_CARD_URL: http://${PR_AGENT_HOST:-${DEFAULT_TASK_AGENT_HOST}}:${PR_AGENT_PORT:-23000}/.well-known/agent-card.json
    depends_on:
      pr-agent-solution-agent:
        condition: service_healthy

networks:
  agents_net: