> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/agentic-features-architecture.md).

# Agentic features architecture

The components you add to SonarQube Server 2026.5 to run the agentic features, and the resources each one needs.

## Overview <a href="#overview" id="overview"></a>

This architecture extends a reference architecture rather than replacing one. Start from the context that matches your code base, either [Up to 10 M LOC](https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/up-to-10m-loc.md) or [Up to 50 M LOC](https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/up-to-50m-loc.md), then add the components described here.

The agentic features covered are Hunter Agent, Remediation Agent, and Sonar Vortex. They require the Enterprise or Data Center edition, and each agent requires a separate subscription. You can add them to an existing installation at any time, or leave them out.

Three properties shape the architecture:

* The components run as containers. SonarQube Server itself can still run from a ZIP file, from a Docker image, or on Kubernetes, but these components are available as containers only.
* Jobs run in sandboxed runtime containers. The runtimes are long-lived and scale out with the job queue, so you size for concurrent jobs rather than for total jobs.
* The components exchange data through shared storage that you provision and maintain, in the same way that you provision the database.

Sizing is driven by how many agentic jobs you run and how large your repositories are, not by the number of lines of code in your instance.

{% hint style="info" %}
This page describes a single-node Enterprise edition deployment.
{% endhint %}

The following diagram shows which components you deploy and how they connect to an existing installation. The components you add are outlined in blue. Sandboxed runtime containers, each running one job at a time, have a dashed border.

```mermaid
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#F1F6FC', 'primaryBorderColor': '#126ED3', 'primaryTextColor': '#0A0A0A', 'lineColor': '#126ED3', 'secondaryColor': '#F4F6F8', 'tertiaryColor': '#F4F6F8', 'clusterBkg': '#F4F6F8', 'clusterBorder': '#D4D4D4', 'edgeLabelBackground': '#FFFFFF'}}}%%
flowchart LR
    subgraph existing["Existing installation"]
        subgraph host["SonarQube Server host"]
            SQ["SonarQube Server<br/>including the Agentic API"]
        end
        DB[("SonarQube Server<br/>database")]
    end

    subgraph deploy["AI components you deploy"]
        AO["Agent Orchestrator"]
        HRT["Hunter Agent runtime"]
        RRT["Remediation Agent runtime"]
        PROXY["Egress proxy"]
        VX["Sonar Vortex"]
    end

    STORE["Shared storage<br/>object storage or shared filesystem"]
    LLM["Your LLM provider"]
    SCM["Your DevOps platform"]

    SQ -->|"Trigger job"| AO
    SQ <-->|"Analyzer context"| STORE
    AO -->|"Job state"| DB
    AO -->|"Dispatch job"| HRT
    AO -->|"Dispatch job"| RRT
    AO -->|"Clone code, open pull requests"| SCM
    HRT --> PROXY
    RRT --> PROXY
    PROXY -->|"Prompts"| LLM
    SQ <-->|"Analysis requests"| VX
    deploy <-->|"Stage code, read and write results"| STORE

    classDef neutral fill:#FFFFFF,stroke:#D4D4D4,color:#0A0A0A
    classDef external fill:#F4F6F8,stroke:#D4D4D4,color:#0A0A0A
    classDef subject fill:#FFFFFF,stroke:#126ED3,color:#0A0A0A
    classDef sandbox fill:#FFFFFF,stroke:#126ED3,color:#0A0A0A,stroke-dasharray: 5 5
    class SQ,DB neutral
    class LLM,SCM external
    class AO,VX,PROXY,STORE subject
    class HRT,RRT sandbox
    style existing fill:#FFFFFF,stroke:#D4D4D4
    style host fill:#F4F6F8,stroke:#D4D4D4
    style deploy fill:#F1F6FC,stroke:#126ED3
```

All runtime traffic leaves through the egress proxy on both deployment methods. On Kubernetes, network policies on the runtimes constrain them so they have no other route out, rather than replacing the proxy. The runtimes are also kept apart from each other: the same network policies do that on Kubernetes, and on Docker Compose you give each runtime its own network.

## Components <a href="#components" id="components"></a>

| Component          | Runs as                                                           | Purpose                                                                                                                                                                                             |
| ------------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Agentic API        | A process inside SonarQube Server                                 | Exposes the agentic features to the UI and to automation. Needs no separate deployment                                                                                                              |
| Agent Orchestrator | A long-lived container, with optional autoscaling on Kubernetes   | Coordinates every agentic job: stages the source code, dispatches the job to a runtime, tracks progress, and processes the results                                                                  |
| Agent runtime      | Long-lived sandboxed containers that scale out with the job queue | Runs agentic jobs, reading the staged code and calling your LLM provider                                                                                                                            |
| Egress proxy       | A container, on both Docker Compose and Kubernetes                | Restricts what a runtime container can reach to an allow list, and blocks everything else                                                                                                           |
| Sonar Vortex       | Long-lived containers, 3 recommended                              | Analyzes single files on demand for SonarQube Server, including verifying Remediation Agent's fixes. Remediation Agent requires it                                                                  |
| Shared storage     | Object storage or a shared filesystem that you provide            | Carries source code snapshots and job results between the Orchestrator and the runtime containers. Also holds the Sonar Vortex analyzer context, and the agent job logs that SonarQube Server reads |

One Agent Orchestrator serves both agents, so you deploy it once regardless of how many agents you use. Remediation Agent depends on Sonar Vortex, so enabling that agent means provisioning Sonar Vortex as well.

For what each component does and how to deploy it, see [Installation overview](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/installation-overview.md).

## Deployment methods <a href="#deployment-methods" id="deployment-methods"></a>

| Method                           | Agent Orchestrator           | Egress proxy                                                                             | Job capacity                                                                               |
| -------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| Kubernetes, using the Helm chart | Runs as a Deployment         | A container to deploy and size, with network policies forcing runtime traffic through it | Fixed pool of 1 replica per runtime family by default, or 2 to 25 with autoscaling enabled |
| Docker Compose                   | Runs as a long-lived service | A container to deploy and size                                                           | Fixed pool                                                                                 |

Kubernetes is the recommended method for production, because job capacity can grow and shrink with demand once you enable autoscaling. Docker Compose runs a fixed pool that you size for your peak, and is supported for environments that do not run Kubernetes.

*The agentic features are available as containers only.* They cannot run from a ZIP installation, because the sandbox needs a container runtime. You can still run SonarQube Server itself from the ZIP file and deploy these components alongside it as containers, see [Deploying alongside a ZIP installation](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/deploying-alongside-zip-installation.md).

The hosts running these containers have their own requirements, including a minimum Linux kernel version and a sandbox runtime. Docker Desktop cannot run the agent runtimes in a sandbox. On macOS, you can use it for evaluation only, see [Setting up the sandbox runtime](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/sandbox-runtime.md#without-sandbox). On OpenShift, they are sandboxed with Kata Containers rather than gVisor, which requires the OpenShift sandboxed containers operator. The gVisor default needs no hardware virtualization, so it runs on standard cloud instances, while another sandboxed runtime class may require more. See [Before you start](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/before-you-start.md).

Traffic between SonarQube Server, the Agent Orchestrator, and the runtimes is unencrypted by default, on the basis that these components sit on a private network or cluster. Terminate transport encryption yourself if you need it. On Kubernetes, you can encrypt it with Istio mutual TLS, see [Deploying with a Kubernetes or OpenShift installation](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/deploying-with-kubernetes-or-openshift-installation.md#tls).

The host specifications on this page are the figures you plan a deployment around. For the full per-container requests and limits, the autoscaling ranges, and what load testing found, see [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md).

## Agent Orchestrator <a href="#agent-orchestrator" id="agent-orchestrator"></a>

The Orchestrator is a long-lived container. For each job it clones the repository and builds an archive of it, both in its temporary space, so its resource use depends on repository size as well as on the number of projects that have an agent enabled.

<details>

<summary>Host specification</summary>

|         | vCPU | Memory | Ephemeral storage |
| ------- | ---- | ------ | ----------------- |
| Request | 250m | 512 MB | 512 MB            |
| Limit   | 1    | 1 GB   | 2 GB              |

These are the defaults. The Orchestrator bursts between the request and the limit as demand grows. Measured sizes by number of active projects are not available yet, so revise these figures against your own usage, see [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md#orchestrator-by-project-count).

Run one Orchestrator deployment per instance. On Kubernetes, it can autoscale from 2 to 5 replicas, see [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md#autoscaling). It needs access to the SonarQube Server database and to shared storage.

The Orchestrator reads SonarQube Server's schema and does not run migrations itself, so SonarQube Server has to be running, and migrated after an update, before the Orchestrator starts. On Kubernetes the Helm chart waits for that; on Docker Compose you sequence it yourself.

</details>

## Agent runtimes <a href="#agent-runtimes" id="agent-runtimes"></a>

A runtime container handles one job at a time, so these figures are per concurrent job. Multiply them by the number of jobs you expect to run at the same time to get the capacity you need to reserve.

<details>

<summary>Hunter Agent host specification</summary>

| Repository size         | vCPU | Memory | Ephemeral storage |
| ----------------------- | ---- | ------ | ----------------- |
| Default                 | 2    | 8 GB   | 15 GB             |
| Very large repositories | 4    | 8 GB   | 20 GB             |

Memory stays at 8 GB in both cases. Start with the default, and raise the vCPU count and ephemeral storage only if you analyze repositories of several hundred megabytes.

</details>

<details>

<summary>Remediation Agent host specification</summary>

The project sizes are the size of the project a job runs on, not the total size of your instance.

|                                              | vCPU | Memory | Ephemeral storage |
| -------------------------------------------- | ---- | ------ | ----------------- |
| Request, small and moderate projects         | 1    | 2 GB   | 10 GB             |
| Limit, large projects up to 1M lines of code | 4    | 8 GB   | 50 GB             |

The container bursts between the request and the limit as a job needs it, rather than being resized for each project. Projects above 1M lines of code have not been profiled, so monitor jobs that run on repositories larger than that.

</details>

On Kubernetes, if you use the chart's gVisor installer, also reserve up to 0.5 vCPU and 256 MB on each node, with requests of 100m and 128 MB. This cost is per node, not per job. The installer does not run on OpenShift, where the runtimes use Kata Containers, or on managed nodes with an immutable OS.

### Estimating concurrent jobs <a href="#concurrent-jobs" id="concurrent-jobs"></a>

Job duration shapes how much runtime capacity you need at once:

* A Hunter Agent job takes 2 to 3 hours on a medium-size repository. The runtime stops the agent after 12 hours
* A scheduled Remediation Agent run covers up to 5 issues by default, and you can raise that to 50. A manual run covers up to 20 issues. The runtime stops the agent after 15 minutes, and the job fails without opening a pull request

The Agent Orchestrator marks a job failed a little later, after 12 hours and 20 minutes for Hunter Agent and after 1 hour for Remediation Agent. See [Installation overview](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/installation-overview.md#timeouts).

Each runtime family runs 1 replica by default. Once you enable autoscaling, it scales on the depth of the job queue, from 2 to 25 replicas by default. A replica handles one job at a time, so your replica count is the ceiling on concurrent jobs per family.

To estimate the Hunter Agent replicas you need, work from job duration. One replica completes roughly 8 jobs a day at a 3-hour average, which gives you:

```
Hunter Agent replicas ≈ (jobs per day ÷ 8) + margin for on-demand runs
```

**Example:** 200 projects analyzed weekly is about 29 jobs a day. That's 29 ÷ 8, plus a margin of 2, so reserve capacity for 6 concurrent replicas.

## Egress proxy <a href="#egress-proxy" id="egress-proxy"></a>

The egress proxy forwards traffic rather than analyzing it, so it's the smallest of these components. You add your LLM provider to its allow list, plus your object storage endpoint if that is your backend. The Remediation Agent runtime's route to SonarQube Server is part of the proxy configuration. A shared filesystem is mounted rather than reached over the network.

<details>

<summary>Host specification</summary>

| Category | Requirement    |
| -------- | -------------- |
| vCPU     | 0.25           |
| Memory   | 128 MB maximum |

These are per container. On Kubernetes the proxy runs as a pair for availability, so reserve twice these figures.

</details>

## Sonar Vortex <a href="#sonar-vortex" id="sonar-vortex"></a>

Sonar Vortex runs continuously rather than per job, and it serves analysis requests from SonarQube Server.

<details>

<summary>Host specification</summary>

| Category          | Requirement                                       |
| ----------------- | ------------------------------------------------- |
| vCPU              | 2 per replica                                     |
| Memory            | 8 GB per replica                                  |
| Ephemeral storage | 2 GB per replica                                  |
| Replicas          | 1 by default, or 3 to 20 with autoscaling enabled |
| Shared storage    | About 300 MB per project                          |

We recommend running 3 replicas. The Helm chart runs 1 replica by default. With autoscaling enabled, it scales from 3 to 20 replicas by default. The autoscaling minimum must be at least 2, except when `vortexAnalysis.autoscaling.aggregateAcrossReplicas` is `false`, where it must be exactly 1. See [Deploying with a Kubernetes or OpenShift installation](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/deploying-with-kubernetes-or-openshift-installation.md#autoscaling). Each replica handles up to three concurrent requests, and autoscaling adds a replica when the average reaches two per replica. Ephemeral storage holds working files that are deleted when an analysis finishes.

</details>

## Shared storage <a href="#shared-storage" id="shared-storage"></a>

Two figures matter, and they behave differently.

Durable capacity accumulates. Each completed job leaves roughly 1 MB of results, logs, and issue detail, and it stays until your retention policy removes it:

```
Durable capacity ≈ jobs per day × retention period in days × 1 MB
```

Peak capacity is what you need at any one moment, and it scales with the concurrency you configure rather than with job volume. While a job runs, a compressed archive of the repository sits in storage as well:

```
Peak capacity ≈ concurrent jobs × average compressed repository size
```

Add the two figures together, then add the Sonar Vortex footprint of about 300 MB per project if you deploy it.

### Worked examples <a href="#worked-examples" id="worked-examples"></a>

These examples cover Remediation Agent jobs with a 14-day retention period, the same assumption as the examples in [Setting up shared storage](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/shared-storage.md#sizing) and [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md#worked-example). The default retention period is 30 days, which roughly doubles the durable capacity. Replace them with your own project count, job frequency, retention, and repository size.

| Dimension                          | Small            | Medium            | Large             |
| ---------------------------------- | ---------------- | ----------------- | ----------------- |
| Projects using an agent            | 20               | 500               | 11,500            |
| Jobs per day                       | 20               | 500               | 5,000             |
| Average compressed repository size | 20 MB            | 50 MB             | 80 MB             |
| Durable capacity                   | \~280 MB         | \~7 GB            | \~70 GB           |
| Sonar Vortex storage, if deployed  | \~6 GB           | \~150 GB          | \~3.4 TB          |
| Database growth                    | \~15 MB per year | \~365 MB per year | A few GB per year |

If you deploy Sonar Vortex, its storage is the figure that determines the size of your backend. It scales with the number of projects rather than with job volume, so it grows independently of your retention policy, though it stays bounded, because context is purged for old analyses and for anything older than three months.

{% hint style="warning" %}
These figures are a starting point, not a commitment. They come from measurements on a validation instance at low job volume, so revise them against your own usage once you have it.
{% endhint %}

{% hint style="info" %}
Retention is what keeps storage bounded. Job artifacts are deleted automatically after 30 days by default, and you set the period under **General settings** > **Housekeeping** > **Agentic**. A lifecycle policy on the storage backend is worth adding as a backup, not as the mechanism. See [Setting up shared storage](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/shared-storage.md#retention).
{% endhint %}

The database holds job metadata, with no large objects, plus a small permanent record for every issue that has been remediated, so it grows slowly and predictably. It's worth monitoring on very active instances, but it is not the figure that determines your storage.

### Storage classes <a href="#storage-classes" id="storage-classes"></a>

Agentic jobs read and write job artifacts in bursts, so general-purpose tiers suit them and archival tiers do not. For the storage services to use on each cloud provider, see [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md#backend-by-provider).

A single-node fileshare suits only a Docker Compose deployment on one host. On Kubernetes, a shared filesystem needs the `ReadWriteMany` access mode, because the Orchestrator and the runtimes mount it at the same time, so use a multi-node fileshare. See [Setting up shared storage](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/shared-storage.md#shared-filesystem).

On Azure, choose the Premium (SSD-backed) tiers rather than Standard if your repositories are very large.

Avoid infrequent-access and archival storage classes, such as S3 Glacier, Cloud Storage Nearline and Coldline, and Azure Blob Storage Cool and Archive. Their retrieval characteristics do not suit agentic jobs.

For how to configure a backend and set retention, see [Setting up shared storage](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/shared-storage.md).

## Scalability <a href="#scalability" id="scalability"></a>

* On Kubernetes, each runtime family runs a fixed pool of 1 replica by default. Autoscaling is off until you enable it, and it needs KEDA installed on the cluster. Once enabled, a family scales on the depth of the job queue rather than on CPU, because a job spends most of its time waiting on the LLM, and it scales out to 25 replicas by default. It never scales below 2.
* On Docker Compose, the pool of runtime containers is fixed. Size it for your peak concurrency, because jobs queue once the pool is full.
* With autoscaling enabled, Sonar Vortex scales by replica count, from 3 replicas to 20 by default, because each replica handles up to three concurrent requests, and autoscaling adds a replica when the average reaches two per replica. On Kubernetes, adding replicas raises throughput only with per-request (Layer 7) load balancing, such as Istio. A `ClusterIP` service balances per connection, so traffic can concentrate on a few replicas. See [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md#load-test-findings).
* The Agent Orchestrator's resource use grows with the number of active projects and with the size of the repositories its jobs clone. On Kubernetes, it can autoscale, by default on CPU utilization, from 2 to 5 replicas.

## Resiliency <a href="#resiliency" id="resiliency"></a>

These components are not a high-availability configuration. An interrupted job can be run again, so the priority is protecting job state and storage rather than keeping the components continuously available:

* Job state lives in the SonarQube Server database, so your existing database backups cover job history
* The shared signing secret exists only where you keep it, and every component key is derived from it. Back it up, see [Backup and restore](https://docs.sonarsource.com/sonarqube-server/server-update-and-maintenance/maintenance/backup-and-restore.md#agentic-features)
* Shared storage holds job inputs and results. Back it up according to how long you need past results, and monitor free space, because jobs fail when storage is exhausted
* Sonar Vortex analyzer context must persist across restarts and updates. Include it in your backup: losing it costs analysis precision, not correctness
* Jobs already running in the runtimes keep running while the Agent Orchestrator restarts, and it picks them up when it is back. Completed job records are unaffected

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Up to 10 M LOC](https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/up-to-10m-loc.md)
* [Up to 50 M LOC](https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/up-to-50m-loc.md)
* [Deploying AI agents](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents.md)
* [Before you start](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/before-you-start.md)
* [Capacity planning](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/capacity-planning.md)
* [Setting up shared storage](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/shared-storage.md)
* [Monitoring the agentic components](https://docs.sonarsource.com/sonarqube-server/server-installation/ai-agents/monitoring-agentic-components.md)
* [Updating the agentic components](https://docs.sonarsource.com/sonarqube-server/server-update-and-maintenance/update/updating-agentic-components.md)
* [Server host requirements](https://docs.sonarsource.com/sonarqube-server/server-installation/server-host-requirements.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/server-installation/reference-architectures/agentic-features-architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
