Skip to main content

Configure an agent with Moddy support

This guide will walk you through how to configure the Moderne agent to enable support for Moddy, Moderne's multi-repo AI agent. Moddy employs a bring-your-own model (BYOM) approach, which allows you to connect whichever large language model (LLM) you have approved for use within your company.

Prerequisites

  • You will need an API key from your chosen LLM provider (OpenAI, Anthropic, Google, or Mistral)

Supported LLM providers

The Moderne agent currently supports the following LLM providers:

ProviderModel UsedAPI Endpoint
OpenAIgpt-4ohttps://api.openai.com/v1
AnthropicClaude 3.5 Sonnethttps://api.anthropic.com/v1
Google GeminiGemini 2.5 Flash Litehttps://generativelanguage.googleapis.com/v1beta
MistralMistral Small Latesthttps://api.mistral.ai/v1

If you need a model or LLM provider that isn't listed here, please contact Moderne support.

Configuring the Moderne agent

The following table contains all of the variables/arguments you need to add to your Moderne agent run command in order to enable Moddy. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne agent guide.

Environment variables:

Variable NameRequiredDefaultDescription
MODERNE_AGENT_LLM_PROVIDERtrueThe LLM provider to use. Options: OPEN_AI, ANTHROPIC, GEMINI, MISTRAL
MODERNE_AGENT_LLM_APIKEYtrueThe API key for the specified LLM provider
MODERNE_AGENT_LLM_PROXY_URLfalseProxy URL if the LLM API needs to be accessed through a proxy
MODERNE_AGENT_LLM_PROXY_USERNAMEfalseUsername for proxy authentication
MODERNE_AGENT_LLM_PROXY_PASSWORDfalsePassword for proxy authentication

Example:

export MODERNE_AGENT_LLM_APIKEY=...

docker run \
# ... other configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=ANTHROPIC \
-e MODERNE_AGENT_LLM_APIKEY \
# ... rest of configuration ...
moderne-agent:latest

Provider-specific examples

OpenAI

export MODERNE_AGENT_LLM_APIKEY=...

docker run \
# ... other required agent configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=OPEN_AI \
-e MODERNE_AGENT_LLM_APIKEY \
# ... rest of configuration ...
moderne-agent:latest

Anthropic (Claude)

export MODERNE_AGENT_LLM_APIKEY=...

docker run \
# ... other required agent configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=ANTHROPIC \
-e MODERNE_AGENT_LLM_APIKEY \
# ... rest of configuration ...
moderne-agent:latest

Google Gemini

export MODERNE_AGENT_LLM_APIKEY=...

docker run \
# ... other required agent configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=GEMINI \
-e MODERNE_AGENT_LLM_APIKEY \
# ... rest of configuration ...
moderne-agent:latest

Mistral

export MODERNE_AGENT_LLM_APIKEY=...

docker run \
# ... other required agent configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=MISTRAL \
-e MODERNE_AGENT_LLM_APIKEY \
# ... rest of configuration ...
moderne-agent:latest

Proxy configuration

If your organization requires LLM API access through a proxy:

export MODERNE_AGENT_LLM_APIKEY=...
export MODERNE_AGENT_LLM_PROXY_PASSWORD=...

docker run \
# ... other required agent configuration ...
-e MODERNE_AGENT_LLM_PROVIDER=ANTHROPIC \
-e MODERNE_AGENT_LLM_APIKEY \
-e MODERNE_AGENT_LLM_PROXY_URL=http://proxy.company.com:8080 \
-e MODERNE_AGENT_LLM_PROXY_USERNAME=proxyuser \
-e MODERNE_AGENT_LLM_PROXY_PASSWORD \
# ... rest of configuration ...
moderne-agent:latest

Complete example with multiple configurations

Here's a complete example showing an agent configured with GitHub, Artifactory, and Moddy support:

export MODERNE_AGENT_CRYPTO_SYMMETRICKEY=...
export MODERNE_AGENT_TOKEN=...
export MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTID=...
export MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTSECRET=...
export MODERNE_AGENT_ARTIFACTORY_0_USERNAME=...
export MODERNE_AGENT_ARTIFACTORY_0_PASSWORD=...
export MODERNE_AGENT_LLM_APIKEY=...

docker run \
-e MODERNE_AGENT_APIGATEWAYRSOCKETURI=https://api.tenant.moderne.io/rsocket \
-e MODERNE_AGENT_CRYPTO_SYMMETRICKEY \
-e MODERNE_AGENT_NICKNAME=prod-1 \
-e MODERNE_AGENT_TOKEN \
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTID \
-e MODERNE_AGENT_GITHUB_0_OAUTH_CLIENTSECRET \
-e MODERNE_AGENT_GITHUB_0_URL=https://myorg.github.com \
-e MODERNE_AGENT_GITHUB_0_ALLOWABLE_ORGANIZATIONS_0=moderne \
-e MODERNE_AGENT_GITHUB_0_OAUTH_INCLUDEPRIVATEREPOS=true \
-e MODERNE_AGENT_ARTIFACTORY_0_URL=https://myartifactory.example.com/artifactory/ \
-e MODERNE_AGENT_ARTIFACTORY_0_USERNAME \
-e MODERNE_AGENT_ARTIFACTORY_0_PASSWORD \
-e MODERNE_AGENT_ARTIFACTORY_0_ASTQUERYFILTERS_0='"name":{"$match":"*-ast.jar"}' \
-e MODERNE_AGENT_LLM_PROVIDER=ANTHROPIC \
-e MODERNE_AGENT_LLM_APIKEY \
-p 8080:8080 \
moderne-agent:latest

Verifying the configuration

After starting the agent with the new configuration, "Moddy" will be displayed in the navigation bar in the SaaS:

moddy-nav-bar.png
"Moddy" displayed in the nav bar

You can then click "Moddy" and begin asking it questions about your code base.