AGenNext CodeReview (agentnxt/code-reviewer) is a production-oriented code review service with a typed FastAPI backend, SQLite persistence, review lifecycle tracking, and a Claude Agent SDK integration boundary.
AGenNext CodeReview helps teams submit code diffs, execute policy-guided reviews, inspect findings, and capture feedback for controlled quality improvements.
- Landing page:
GET / - Web console (implemented UI):
GET /app - API docs in repository:
docs/products/code-reviewer-api.md - Runtime start command:
python -m codereviewer.main
A GitHub Actions baseline is available at .github/workflows/ci.yml and includes:
- Python setup and dependency installation.
pytestexecution.- Python package build validation (
python -m build). - Container build validation using
deploy/code-reviewer/Dockerfile.
pip install -e .[dev]
pytest -q- FastAPI backend with review, runtime profile, memory, and feedback APIs.
- Durable SQLite persistence for runtime profiles, review jobs, feedback events, and memory records.
- Review job lifecycle with
queued,running,completed,failedstates and timestamps. - Deterministic local reviewer adapter with explicit Claude Agent SDK integration boundary.
- Web UI console plus a branded landing page.
- Context-budget manager for prioritized diff chunk selection.
- Shared core:
src/codereviewer/core(Pydantic models + scoring logic). - Services: orchestration, runtime-profile validation, context budgeting, feedback ingestion.
- Persistence:
src/codereviewer/infra/repositories.pywith SQLite-backed repositories. - API + web:
src/codereviewer/api/app.pyandsrc/codereviewer/web/*.
- Provider selection is separate from model selection.
- Supported providers:
anthropic,bedrock,vertex,foundry. - Runtime profiles validate provider/model compatibility and support default profile behavior.
| Surface | Status | What exists now |
|---|---|---|
| AGenNext CodeReview Web | implemented | FastAPI + landing page + web console for submission/history/profile flows |
| AGenNext CodeReview Desktop | scaffolded | Adapter definition in apps/desktop/README.md |
| AGenNext CodeReview Mobile | scaffolded | Adapter definition in apps/mobile/README.md |
| AGenNext CodeReview VS Code | scaffolded | Adapter definition in apps/vscode/README.md |
| AGenNext CodeReview Slack | scaffolded | Adapter definition in apps/slack/README.md |
| AGenNext CodeReview GitHub | scaffolded | Adapter definition in apps/github/README.md |
| AGenNext CodeReview Chrome | planned | Planning stub in apps/chrome/README.md |
- Product name is locked as
AGenNext CodeReview. - Repo slug is locked as
code-reviewer. - Web brand assets are served from
src/codereviewer/web/static/logo.svgandsrc/codereviewer/web/static/favicon.svg.
- API routes are currently unauthenticated (single-team controlled environments only).
- SQLite is suitable for single-instance deployments, not high-concurrency multi-worker scale.
- Queue-backed async execution, retries, and cancellation are not implemented yet.
pip install -e .[dev]
pytest -q
python -m codereviewer.mainUse these steps to install and run AGenNext CodeReview on macOS.
- Install Python 3.11+ and build tools:
brew update
brew install python@3.11- Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip- Install AGenNext CodeReview with development dependencies:
pip install -e .[dev]- Run tests and start the app:
pytest -q
python -m codereviewer.main- Open the UI:
- Landing page:
http://127.0.0.1:8080/ - Web console:
http://127.0.0.1:8080/app
Notes:
- If your shell cannot find
python3, restart terminal after Homebrew install. - For Bedrock-backed reviews on macOS, keep using the same
LITELLM_*and runtime-profile configuration documented below.
All container runtime configuration is environment-driven.
- Copy
deploy/code-reviewer/.env.exampletodeploy/code-reviewer/.env. - Set values for:
HOSTPORTPORT_STARTPORT_ENDAPP_PORTCODEREVIEWER_DB_PATHSIGNOZ_ENABLEDSIGNOZ_SERVICE_NAMESIGNOZ_OTLP_TRACES_ENDPOINTNOTIFICATIONS_ENABLEDNOTIFICATION_CHANNELSSMTP_HOSTSMTP_PORTSMTP_USERNAMESMTP_PASSWORDSMTP_FROMSMTP_TOSMTP_USE_TLSSMTP_USE_SSLSSO_ENABLEDSSO_PROVIDERSSO_ISSUER_URLSSO_CLIENT_IDSSO_CLIENT_SECRETSSO_AUDIENCESSO_REDIRECT_URISSO_SCOPESCLAUDE_AGENT_SDK_ENABLEDCLAUDE_AGENT_SDK_STRICTCLAUDE_AGENT_SDK_MODELCLAUDE_AGENT_SDK_MAX_TOKENSCLAUDE_AGENT_SDK_TEMPERATURECLAUDE_API_KEYLITELLM_ENABLEDLITELLM_BASE_URLLITELLM_API_KEYLITELLM_MODELLITELLM_PROVIDER_PREFIX_MAP
Then run:
docker compose -f deploy/code-reviewer/docker-compose.yml up --buildPOST /api/notifications/testsends a test notification when SMTP is configured and notifications are enabled.
GET /api/sso/configreturns effective SSO runtime configuration (secret value is not returned).
SECURITY_HARDENING_ENABLED=trueenables hardened security response headers (default: enabled).API_BEARER_AUTH_ENABLED=trueenforces bearer-token auth on/api/*routes.API_BEARER_TOKEN=<strong-random-token>is required when bearer auth is enabled.- Tenant header validation is enforced:
X-Tenant-IDmust be 2-63 chars using[a-zA-Z0-9_.:-].
- Set
CLAUDE_AGENT_SDK_ENABLED=trueto enable real Claude-backed review calls. - Set
CLAUDE_API_KEY(or use a runtime profile auth reference that already contains ansk-ant-key). CLAUDE_AGENT_SDK_STRICT=truemakes SDK failures fail the review job instead of falling back to local deterministic rules.- Set
LITELLM_ENABLED=trueto route calls through a LiteLLM gateway (LITELLM_BASE_URL). - With LiteLLM enabled, model resolution uses runtime profile model (converted to
anthropic/<model>when needed) orLITELLM_MODEL. LITELLM_PROVIDER_PREFIX_MAPcontrols provider-to-prefix routing (JSON map), e.g.{"vertex":"vertex_ai/","bedrock":"bedrock/","anthropic":"anthropic/"}.- Runtime profile metadata supports overrides:
litellm_model: use exact LiteLLM model route (highest priority)litellm_provider: choose provider key from prefix map for model prefixing
Use this when you want AGenNext CodeReview to run Claude via AWS Bedrock instead of direct Anthropic API calls.
- Enable Claude runtime and LiteLLM routing:
CLAUDE_AGENT_SDK_ENABLED=trueLITELLM_ENABLED=true
- Point LiteLLM to your gateway that is configured for AWS credentials/role access:
LITELLM_BASE_URL=http://<litellm-host>:4000LITELLM_API_KEY=<optional-if-your-gateway-requires-it>
- Keep Bedrock routing in provider prefix map (default already supports this):
LITELLM_PROVIDER_PREFIX_MAP={"bedrock":"bedrock/","anthropic":"anthropic/","vertex":"vertex_ai/","foundry":"azure/"}
- Create a runtime profile with Bedrock provider + Bedrock Claude model id:
{
"name": "bedrock-claude-review",
"provider": "bedrock",
"model_id": "anthropic.claude-sonnet-4",
"auth_reference": "aws-iam",
"temperature": 0.1,
"max_tokens": 4096,
"is_default": true
}Notes:
- Provider and model are validated as a typed pair by the runtime profile service.
- For Bedrock,
auth_referenceis a tenant-owned reference label (for exampleaws-iam), while actual AWS credentials should stay in your runtime/secret manager path. - Optional override: set runtime profile metadata
litellm_modelto force an exact route likebedrock/anthropic.claude-sonnet-4.
- Tenant scope header:
X-Tenant-ID(defaults todefault). - Agent identity header:
X-Agent-ID. - If
X-Tenant-IDis absent andX-Agent-IDis provided, tenant is derived asagent:<agent_id>. - Set
MULTITENANCY_REQUIRE_AGENT_IDENTITY=trueto requireX-Agent-IDon API requests.
Deploying via Coolify is the preferred production path on this host.
- Image:
ghcr.io/agentnxt/code-reviewer:latest - Container port:
8080 - Domain:
codereviewer.agnxxt.com - SSL: Let's Encrypt (enable in Coolify)
Required environment variables:
PYTHONPATH=/app/srcPORT=8080
Health check:
- Path:
/healthz - Expected:
200with{"status":"ok"}
- Coolify deployment steps for AGenNext CodeReview using GHCR image tags.
- Domain and TLS setup for
codereviewer.agnxxt.com. - Required runtime environment variables and health check contract.
- Organization-wide deployment policy.
- DNS provider-specific account automation.
- Non-CodeReviewer service orchestration details.
When deployment or execution guidance here reveals reusable patterns, upstream them to openautonomyx/common-instructions so other repos can reuse the same instruction layer.
If usage patterns reveal repeated friction, convert the lesson into a reusable instruction pattern and upstream it to openautonomyx/common-instructions.
Track recurring operational prompts in a lightweight registry. Upstream reusable prompts to openautonomyx/common-instructions with clear purpose, trigger, inputs, and output contract.
CodeReviewer workflows should generate per-subagent evaluation and feedback for every reviewed subagent contribution, including decision summary, key findings, and concrete follow-up actions.
Production deployment must be CI/CD-only. Direct server deployment is not allowed.
See docs/products/code-reviewer-deployment-policy.md.
- No context switching during active execution unless priorities are explicitly changed.
- Maintain strict priority order from the active task list.
- Track work with explicit task states:
pending,in_progress,blocked,done. - For long-running tasks, run them in background jobs and continue non-blocking foreground tasks.
- Keep responses concise and to the point.
- Respond after research/verification.
- Clarify when unclear; do not guess.
- Check available past memory/context before asking follow-up questions.
Use established session context by default so users do not need to repeat stable details in every call. Request context only when missing, conflicting, or stale.
Status must be continuously tracked in GitHub. Primary tracker: PROJECT_STATUS.md (optionally mirrored to GitHub Projects).
Always consolidate services and avoid duplicates. Extend existing services by default; do not introduce parallel duplicate service implementations without explicit approval.
Before any new task is started, provide a best-fit LLM model recommendation balancing cost, speed, and benchmark quality, with one primary choice and optional fallback.
Before any new project starts, perform deep research and state the recommended approach with rationale (architecture options, risks, cost/speed tradeoffs, operational complexity) before execution.
Do not reinvent the wheel. Reuse proven solutions by default; implement custom components only when necessary and justified.
This repository follows a one-product-per-repo model and requires complete product artifacts (PRD, design, HLD, DB schema, prompts, seed-data docs). See docs/products/repository-governance-policy.md.
Environment variable policy:
- Use
.env.exampleas the non-secret variable template. - Keep secrets in secret manager/platform secrets, never in git.
All production services must provide SSO, mail, notifications, error monitoring, telemetry, and analytics as baseline capabilities.
code-deploy is responsible for CI/CD setup and deployment automation, not manual production deploy steps.
code-assist: writes and maintains project documents.code-reviewer: reviews PRD, HLD, LLD, and code.code-tester: validates documents and test outcomes.- Reviewer feedback should be instructional to improve subagent capability over time.
All reviews must be logged. Every action must include an action ID and trace metadata so workflows are fully traceable.
All review/action logs must include agent_id.
All key entities/actions must have unique IDs; mutable entities must carry explicit versions.
Resolve all reusable items from registries first. If missing, register first (model/skill/prompt/service-image) before use.
Registries must expose canonical IDs; operational workflows should reference canonical IDs, not display names.
Registry publishing must go through GitHub PR review and CI workflow gates; no direct manual publishing.
POST /api/agents/spawn-allreturns the active roster used by UI/terminal chat.GET /api/agentslists available agents.POST /api/agents/chatroutes a message to a selected agent and returns response prefixed with agent name.- Web UI now includes Agent Chat panel on
/app.
-
Service name:
agentnxt-codereviewer -
Unit path:
/etc/systemd/system/agentnxt-codereviewer.service -
Runtime bind:
0.0.0.0:8787 -
Health check:
curl http://127.0.0.1:8787/healthz -
AGENT_MAX_IDLE_SECONDScontrols max idle time before agent is auto-disabled (default:1800).