Enmasse - GitOps for AI integrations

Keep the whole AI configuration as one YAML file in version control.

Everything the AI layer consists of takes part in enmasse, the platform's configuration export and import tool - LLM connections under the llm section and MCP gateways under mcp_gateway. What you define in the Dashboard exports to YAML, the YAML lives in git, and importing it recreates the configuration in another environment - dev, test and production differing only in their environment variables.

The llm section

llm:

  - name: My OpenAI
    model: gpt-4o-mini
    address: https://api.openai.com/v1
    secret: Zato_Enmasse_Env.My_OpenAI_API_Key
    timeout: 30
    max_tokens: 2048
    max_history_turns: 10
    chat_expiry: 3600

  - name: My Claude
    model: Sonnet 5
    address: https://api.anthropic.com
    secret: Zato_Enmasse_Env.My_Claude_API_Key
KeyRequiredMeaning
nameYesThe connection's name - what services look up through self.llm[name]
modelYesA catalog name, e.g. Sonnet 5, or a wire id entered by hand, exactly as in the Dashboard
addressYesThe base URL of the API to call
secretNoThe API key - self-hosted endpoints may not need one
is_activeNoWhether the connection can be used, true when omitted
timeoutNoSeconds to wait for the provider's response (default: 60)
max_tokensNoThe most tokens the model may generate per reply (default: 1024)
max_history_turnsNoHow many past chat turns are sent to the provider (default: 20)
chat_expiryNoSeconds a chat's history is kept after its last message (default: 86400)

Every key the second connection above omits gets its default, so a minimal definition is a name, a model and an address.

The mcp_gateway section

mcp_gateway:

  - name: billing
    url_path: /mcp/billing
    services:
      - billing.get-invoice
      - billing.list-invoices
    security_groups:
      - partner-agents
    skills:
      - invoice-analysis
    validate_input: true
    is_audit_log_active: true
    max_response_size: 2000
    safeguards_pii_enabled: true
    safeguards_pii_lands:
      - international

Importing a gateway also creates the REST channel that makes it reachable under its URL path - there is nothing separate to define. The only required key is name, every other key gets its documented default:

KeyDefaultMeaning
url_path/mcpThe path the endpoint is exposed under
services[]The services exposed as tools
security_groups[]The names of the security groups whose members may call the gateway
skills[]The skills served as MCP prompts
is_activetrueWhether the gateway accepts requests
is_audit_log_activefalseThe per-gateway audit log toggle
validate_inputfalseArgument validation against each tool's schema
allow_agent_filtersfalseThe per-call JSONata response filter
session_ttl0Idle session TTL in seconds - zero keeps the default 30 minutes
invoke_timeout0Seconds one tools/call may run for - zero keeps the default 90

The response shaping family mirrors the wizard's step 02, all documented under response controls:

KeyDefault
max_response_size0 - no cap
size_cap_modetruncate, the other value is block
min_size_threshold0 - no threshold
characters_per_token4.0
safeguards_strip_nulls, safeguards_collapse_whitespace, safeguards_strip_base64false
safeguards_pii_enabledfalse
safeguards_pii_lands, safeguards_pii_detectors, safeguards_pii_exclude[]
safeguards_pii_validatetrue
safeguards_pii_stable_replacementsfalse
safeguards_secrets_enabledfalse
safeguards_normalize_unicode, safeguards_sanitize_markupfalse
safeguards_unicode_mode, safeguards_markup_modeclean, the other value is reject
safeguards_url_policy_enabledfalse
safeguards_url_allow_list[]
safeguards_url_moderemove - the other values are neutralize (the Defang mode) and reject

An entry with should_delete: true removes the gateway and its REST channel instead of creating or updating it.

Keep secrets out of git

The Zato_Enmasse_Env. prefix makes enmasse read the value from an environment variable of the given name where the import runs - My_OpenAI_API_Key above. The YAML in git then contains no secrets, and each environment supplies its own keys. The mechanism is the same one all enmasse sections use and it is described in the enmasse chapter.

The gateways themselves hold no secrets - their security_groups name groups whose member definitions, with their passwords and keys, are defined in the security section the same YAML file can include.

Export and import

  • To export, in the Dashboard click System > Config > Export enmasse - the resulting enmasse.yaml has the llm and mcp_gateway sections with the rest of the configuration, without any secrets, which never leave the server.
  • To import, click System > Config > Import enmasse and select the file, or mount it under /opt/hot-deploy/enmasse/enmasse.yaml inside a container for imports that run on startup, as the DevOps guide describes.

An import creates what does not exist yet and updates what does, matching by name - running it again is safe.

See also

FeatureWhat it does
Enmasse overviewThe export and import tool across every configuration section
Enmasse referenceEvery section and attribute enmasse understands
LLM connectionsThe same connections defined in the Dashboard
MCP gatewaysThe gateways the mcp_gateway section declares