Skip to main content

On-Prem Agent Installation Guide

Swimm's On-Prem Agent is a dedicated server running in a container within your company's network. It is responsible for granting Swimm access to services that you have your own instance off, such as Azure OpenAI, that you wouldn't want to otherwise share their keys directly with Swimm. Keeping your keys confidential and private.

Prerequisetes

Before deploying the On-Prem Agent, ensure you have:

  1. Azure OpenAI models for GPT-4.1, GPT-4.1 mini, and GPT-3.5 Turbo Instruct if deploying for AI features:

    • API Key
    • Deployment URL

    See:

  2. The server is required to be deployed with HTTPS/TLS configured with a certificate trusted by your organization's computers. See TLS Configuration.

  3. The deployed container will be exposed to the Swimm IDE extension and web page in order to bridge Azure OpenAI with Swimm. Make sure that your network allows inbound traffic to this container from the developers' machines.

  4. The server requires access to the domain https://app.swimm.io to function correctly, please make sure that is allowed.

  5. If you direct the agent to connect to Azure OpenAI via a forward/reverse proxy/VPN, and that proxy/VPN does TLS Man-in-the-Middle (MITM), you will need to configure the On-Prem Agent to trust the certificate of the proxy/VPN. You can configure an additional certificate bundle that the On-Prem Agent will use by using the NODE_EXTRA_CA_CERTS environment variable. See the FAQ for more details.

  6. Swimm uses Azure OpenAI streaming API, the On-Prem Agent will stream the responses from the Azure OpenAPI instance using SSE (Server-Sent Events) the same as a direct streaming request to Azure OpenAI. Make sure that your network, load balancer/proxy, and container orchestration platform allows SSE. You can verify this by checking documentation of your load balancer/proxy/container orchestration platform, or by asking the relevant personnel at your organization that is responsible for it.

Technical Details

  • The server listens on port 24605 inside the container by default, this can be overriden using the PORT environment variable. Though you can also always remap the outside port using Docker port mapping.
  • The server has an HTTP health check endpoint at /health.
  • The path to the configuration file inside the container defaults to /etc/swimm/onprem-agent.yaml, but can be overriden using the CONFIG_PATH environment variable.

Deploying Models

To use Swimm's On-Prem Agent with your own Azure OpenAI instance, you need to deploy the required models in your Azure OpenAI resource.

Microsoft documentation: How to deploy Azure OpenAI models with Azure AI Foundry

  1. Enter Azure AI Foundry, creating or selecting the correct Azure OpenAI resources at the top.

    Or enter Azure Portal → Azure OpenAI → Create/Select OpenAI Resource → Explore Azure AI Foundry Portal

  2. Select Deployments in the sidebar.

  3. Select Deploy model.

  4. Deploy gpt-4.1, gpt-4.1-mini and gpt-35-turbo-instruct with a name of your choice.

How to get the deployment URL

Click your deployed model in the Azure AI Foundry portal to see its target URI. The URL you need is without the /chat/completions and ?api-version=* suffixes. For example:

URL
Good ✅https://ai-resource.openai.azure.com/openai/deployments/{deployment-name}
Bad ❌https://ai-resource.openai.azure.com/openai/deployments/{deployment-name}/chat/completions?api-version=2025-01-01-preview

Installation

Step 1 - Pull the Docker Image

If needed, pull the latest version of the image using:

docker pull swimmio/onprem-agent:3 # From Docker Hub
# Or
docker pull us-docker.pkg.dev/swimmio/public/onprem-agent:3 # From Google Artifact Registry

The image is on Docker Hub swimmio/onprem-agent and Google Artifact Registry. You can see the available tags there if you want to pin the version to have more control over updates. We publish the following tags:

  • latest - Always the latest version.
  • 3, 2, 1 - The latest release for each major version (e.g., 3 is the latest major version 3).
  • 3.0.0 - A specific version.

In case you don't want to, or have no access, to use Docker Hub or Google Artifact Registry, you can also mirror the image:

Mirroring
docker save swimmio/onprem-agent:3 --platform linux/amd64 -o swimm-onprem-agent-3.tar # From Docker Hub
# Or
docker save us-docker.pkg.dev/swimmio/public/onprem-agent:3 --platform linux/amd64 -o swimm-onprem-agent-3.tar # From Google Artifact Registry

And then to load the image:

docker load -i swimm-onprem-agent-3.tar

And if needed you can also push it to a registry:

docker tag <image> <your-registry>/<image> # e.g. docker tag swimmio/onprem-agent:latest registry.foo.test/swimmio/onprem-agent:latest
docker push <your-registry>/<image> # e.g. docker push registry.foo.test/swimmio/onprem-agent:latest

Step 2 - Configure the Agent

Configuring On-prem Enterprise Git Provider (if needed)

info

The git section in the swimm-onprem-agent.yaml file is only relevant for workspaces using on-premises git providers: GitHub Enterprise Server and GitLab Server.

For more information on how to create a Swimm OAuth App for your on-prem Git hosting, please refer to the following instructions:

note

Bitbucket Data Center does not require the On-Prem Agent configuration. Instead, send Swimm your Client ID, Client Secret, and Bitbucket Data Center URL for your setup.

Creating the Configuration File

Create your configuration file using the template below:

IDE Support: VS CODE

For enhanced YAML editing experience with autocompletion and validation:

  1. Install the YAML extension
  2. Include the yaml-language-server comment at the top of the configuration file with the JSON Schema: https://docs.swimm.io/schemas/onprem-agent-config.json

Configuration sections:

git

  • GitHub Enterprise Server and GitLab Server only.
  • If you're using on-premises Bitbucket Data Center or cloud-hosted git providers (GitHub.com, GitLab.com, Bitbucket Cloud and Azure DevOps), you should remove the entire git section.

ai

  • Configure your Azure OpenAI deployments and API credentials for AI features.
  • If you're not using on-premises AI features, you should remove the entire ai section.
swimm-onprem-agent.yaml
# yaml-language-server: $schema=https://docs.swimm.io/schemas/onprem-agent-config.json

# For single-tenant customers only, configure the URL of your Swimm instance (e.g. https://foo-bar-swimm.com)
# swimmBaseUrl: <swimm_instance_url>

# For configuring On-Prem/Enterprise Git Provider authentication (GitHub Enterprise Server / GitLab Server only), remove if Bitbucket Data Center or cloud git providers are used
git:
provider: <github | gitlab>
host: <git_server_url>
oauth:
clientId: <client_id>
clientSecret: <client_secret>

# For configuring AI features, remove if not used
ai:
models:
short:
provider: azureOpenAI
deployment: <gpt-4.1-mini-deployment-name>
model: gpt-4.1-mini
long:
provider: azureOpenAI
deployment: <gpt-4.1-deployment-name>
model: gpt-4.1
completion:
provider: azureOpenAI
deployment: <gpt-35-turbo-instruct-deployment-name>
model: gpt-3.5-turbo-instruct

providers:
azureOpenAI:
endpoint: https://<azure-openai-resource>.openai.azure.com
apiKey: <azure_openai_api_key>

Step 3 - Deploy the Agent

The On-Prem Agent is a Docker container that can be deployed on any platform. Choose your deployment method:

Assuming your configuration file is in the current working directory and named swimm-onprem-agent.yaml.

docker run -d \
-p 24605:24605 \
-v $PWD/swimm-onprem-agent.yaml:/etc/swimm/onprem-agent.yaml:ro \
-e CONFIG_PATH=/etc/swimm/onprem-agent.yaml \
swimmio/onprem-agent:3
note

The path on the left hand side of -v must be absolute, we use $PWD to make it absolute.

note

Depending on your deployment method you will need to configure a load balancer/reverse proxy in front of the container to handle TLS/HTTPS, or to mount your own certificate and private key to the container, and specify them in the configuration file.

Step 4 - Verify the Installation

In your browser on the client machines that are going to connect to the onprem-agent, browse to:

https://<your-service-url>/status

This should let you know if the service is up and running, and if the configuration is working correctly to communicate with your Azure OpenAI deployment.

You can also try from a terminal:

curl -v https://<your-service-url>/health

Step 5 - Provide Service URLs to Swimm

FINAL STEP - ACTION REQUIRED

Send the following service URL(s) to your contact at Swimm to complete the setup:

Once Swimm configures these URLs in your workspace, you'll be ready to start using the On-Prem Agent!

Setting Up a Budget Alert

The Azure Open AI token is not technically limited to a certain amount of API calls or budget, so it's better to have an alert for unusual/unauthorized usage.

Here is a short video that shows how to do that: