Railway

Deploy pr-af

AI Powered Pull Request Reviews

Deploy pr-af

Agentfield Control Plane

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

Deploy and Host pr-af on Railway

PR-AF is an open-source, agentic pull-request reviewer built on AgentField. Instead of running a single LLM pass over a diff with a fixed checklist, it builds a custom review strategy for every PR — spawning parallel reviewer agents with runtime-crafted prompts, grounding each finding in real code pulled via AST extraction, adversarially challenging its own conclusions, and posting evidence-backed inline GitHub review comments.

About Hosting pr-af

Hosting pr-af means running a Python agent that registers with an AgentField control plane and exposes an HTTP API for triggering reviews. When a review is requested, pr-af clones the target repository, compiles review dimensions specific to that PR, drives an LLM through the opencode harness, verifies each finding against the extracted code, and posts the surviving findings back to GitHub as inline comments. The service runs from a single Dockerfile, listens on port 8004, exposes a /health endpoint, keeps per-review workspaces on a persistent volume, and reads its configuration from environment variables. This template provisions pr-af alongside an AgentField control plane so the two communicate over Railway's private network out of the box.

Common Use Cases

  • Run pr-af as a deep-review CI/CD gate that audits every pull request before merge, posting line-anchored findings with severity, evidence, and suggested fixes.
  • Self-host agentic code review under your own keys (BYOK) instead of paying a per-seat SaaS subscription.
  • Surface compound risks — systemic issues that only emerge when several smaller anomalies across different files are evaluated together, which single-pass reviewers miss.

Dependencies for pr-af Hosting

  • An AgentField control plane that pr-af registers with and routes through. This template deploys it as a sibling service, so no separate setup is required.
  • An OpenRouter API key for LLM calls (the default provider; any LiteLLM-compatible provider works).
  • A GitHub token — or GitHub App credentials — so pr-af can clone repositories and post review comments.

Deployment Dependencies

  • Source repository: github.com/Agent-Field/pr-af
  • Framework: github.com/Agent-Field/agentfield

Implementation Details

Only two environment variables need to be set when deploying — everything else ships with sensible defaults you can override later.

VariablePurpose
OPENROUTER_API_KEYLLM provider key used for the review pipeline.
GH_TOKENGitHub token used to clone the target repo and post review comments. Needs pull_requests:read+write and contents:read.

To authenticate as a GitHub App instead of a personal access token, set GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY in place of GH_TOKEN.

Once both services are up, trigger a review with a single API call against the pr-af service:

curl -X POST http://:8004/api/v1/execute/async/pr-af.review \
  -H "Content-Type: application/json" \
  -d '{"input": {"pr_url": "https://github.com/owner/repo/pull/123"}}'

Other configuration worth knowing:

  • PR_AF_MODEL — the model pr-af uses; the container defaults to openrouter/moonshotai/kimi-k2.5.
  • AGENTFIELD_SERVER — URL of the control plane service pr-af registers with (wired to the sibling service by this template).
  • Healthcheck path is /health; the service listens on port 8004.

Why Deploy pr-af on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying pr-af on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
17
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
47