TramAI - governed AI workflows for Java and Kotlin

Configuration Reference

This page documents the Spring Boot property surface that exists in TramAI 0.6.0. Every key below is bound by a @ConfigurationProperties class in the release; nothing is aspirational.

The Spring binding lives in tramai-spring-core (framework-level keys), the provider adapter modules (tramai-spring-provider-openai, tramai-spring-provider-anthropic, tramai-spring-provider-ollama), the secret backends (tramai-spring-secrets-file, -vault, -aws), and the sovereign modules (tramai-spring-sovereign, tramai-spring-boot-starter-sovereign-*).

tramai.profile

Selects the runtime profile. This is the sole runtime selector.

ValueRuntime
(missing)standard
standardstandard
sovereignsovereign
  • Matching is case-insensitive.
  • Any other value fails at startup with Unsupported tramai.profile '<value>'. Supported values: standard, sovereign. There is never a silent fallback.
  • Exactly one runtime authority is active; standard and sovereign never coexist.
  • tramai.sovereign.enabled: false is rejected at startup. The compatibility switch is retained but can only be true (or absent); select the standard runtime with tramai.profile: standard instead.
tramai:
  profile: sovereign

Standard Runtime Keys

Bound by TramaiProperties (@ConfigurationProperties("tramai")):

KeyDefaultMeaning
tramai.default-providernullProvider used when no model mapping applies
tramai.models.<logical-model>–Maps a logical model name to a registered provider name
tramai.fallbacks.<model>[].provider / .model–Ordered fallback routes for a requested model
tramai.resilience.circuit-breaker.enabledfalseEngine-owned provider health protection
tramai.resilience.circuit-breaker.failure-threshold3Failures before the route opens
tramai.resilience.circuit-breaker.open-duration-millis30000How long an open route stays open
tramai.resilience.retry.max-retry-after-millis30000Cap applied to provider-supplied Retry-After
tramai.resilience.retry.jitter-ratio0.2Positive jitter added to scheduled retry delays
tramai.cost.token-budget.hard-max-tokens-per-attemptnullFails a single provider attempt when reported usage exceeds it
tramai.cost.token-budget.hard-max-tokens-per-operationnullFails a logical operation when cumulative reported usage exceeds it
tramai.cost.token-budget.soft-max-tokens-per-operationnullEmits an engine event without failing the call
tramai.cache.in-memory.enabledfalseIn-memory cache for cacheable non-streaming operations
tramai.cache.in-memory.max-entries1000Cache capacity
tramai.security.classification.enabledfalseData-classification rules
tramai.security.classification.default-classificationINTERNALClassification applied when no rule matches
tramai.security.classification.max-text-length100000Text length considered for classification
tramai.security.classification.rules[].id / .classification / .priority / .pattern / .metadata-equals–Declarative classification rules
tramai.security.model-registry.enabledfalseApproved-model registry enforcement

Provider names in models and in fallback routes must match registered provider names. A fallback route for a model requires an explicit primary route for that model; a duplicate primary route for the same model is a configuration error, not a silent replacement.

Provider Properties

Each Spring provider adapter binds its own namespace and registers a provider under the matching name.

OpenAI (tramai-spring-provider-openai)

KeyDefaultMeaning
tramai.providers.openai.api-keynullStatic API key
tramai.providers.openai.api-key-secret-refnullSecret reference resolved instead of api-key
tramai.providers.openai.bearer-tokennullExplicit bearer token
tramai.providers.openai.bearer-token-secret-refnullSecret reference for the bearer token
tramai.providers.openai.base-urlhttps://api.openai.com/v1API base URL
tramai.providers.openai.organizationnullOrganization header
tramai.providers.openai.projectnullProject header
tramai.providers.openai.codex-auth.enabledfalseExperimental local Codex auth-file token source
tramai.providers.openai.codex-auth.auth-filenullPath to the Codex auth.json
tramai:
  providers:
    openai:
      api-key-secret-ref: env:OPENAI_API_KEY
      base-url: https://api.openai.com/v1

OpenAI-compatible (tramai-spring-provider-openai)

Binds tramai.providers.openai-compatible.* with the same fields as OpenAI plus provider-name (default openai-compatible), and registers the provider under that name. base-url is required here — without it the adapter produces no provider. The same applies to tramai.providers.ollama.base-url.

tramai:
  providers:
    openai-compatible:
      provider-name: compatible
      bearer-token-secret-ref: env:COMPATIBLE_API_TOKEN
      base-url: https://compatible.example.com/v1

Anthropic (tramai-spring-provider-anthropic)

tramai.providers.anthropic.api-key, .api-key-secret-ref, .base-url (default https://api.anthropic.com).

Ollama (tramai-spring-provider-ollama)

tramai.providers.ollama.base-url. The base URL is required for the adapter to produce a provider — without it, startup fails under sovereign validation with no provider available.

tramai:
  providers:
    ollama:
      base-url: http://localhost:11434

Gemini, Bedrock, Azure OpenAI, and DeepSeek ship as standalone adapters. Register them as ModelProvider beans in Spring; there is no property namespace for them in 0.6.0. See Providers.

Secrets

KeyMeaning
tramai.secrets.file.allowed-directoryDirectory that file: secret references are confined to
tramai.secrets.vault.enabledEnables the Vault resolver
tramai.secrets.vault.base-url / .token / .token-secret-ref / .namespace / .mount-path / .kv-version / .default-fieldVault connection and read shape (mount-path default secret, kv-version default 2, default-field default value)
tramai.secrets.aws-secrets-manager.enabledEnables the AWS Secrets Manager resolver
tramai.secrets.aws-secrets-manager.region / .endpoint / .access-key-id / .access-key-id-secret-ref / .secret-access-key / .secret-access-key-secret-ref / .session-token / .session-token-secret-ref / .default-fieldAWS connection and read shape

Reference schemes resolved by the bundled resolvers:

SchemeResolver
env:NAMEEnvironment variable (always available)
file:pathLocal file; requires tramai.secrets.file.allowed-directory, and paths outside it are rejected
vault:path#fieldRequires tramai-spring-secrets-vault + tramai.secrets.vault.*
aws-secretsmanager:secret-id#fieldRequires tramai-spring-secrets-aws + tramai.secrets.aws-secrets-manager.*

A field cannot be configured with a direct value and its *-secret-ref at the same time — that combination fails fast, as does a reference no resolver can resolve.

Complete Standard Example

tramai:
  profile: standard

  default-provider: openai
  models:
    gpt-4o: openai
    gpt-4o-mini: openai
    claude-sonnet-4-20250514: anthropic
    llama3.2: ollama
  fallbacks:
    gpt-4o:
      - provider: openai
        model: gpt-4o-mini
      - provider: ollama
        model: llama3.2

  resilience:
    circuit-breaker:
      enabled: true
      failure-threshold: 3
      open-duration-millis: 30000
    retry:
      max-retry-after-millis: 20000
      jitter-ratio: 0.1

  cost:
    token-budget:
      hard-max-tokens-per-attempt: 4000
      hard-max-tokens-per-operation: 12000
      soft-max-tokens-per-operation: 8000

  cache:
    in-memory:
      enabled: true
      max-entries: 1000

  security:
    classification:
      enabled: false
      default-classification: INTERNAL
      max-text-length: 100000
    model-registry:
      enabled: false

  secrets:
    file:
      allowed-directory: /etc/tramai/secrets
    vault:
      enabled: false
      base-url: https://vault.example.com
      token-secret-ref: env:VAULT_TOKEN
      mount-path: secret
      kv-version: 2
      default-field: value
    aws-secrets-manager:
      enabled: false
      region: eu-west-1
      access-key-id-secret-ref: env:AWS_ACCESS_KEY_ID
      secret-access-key-secret-ref: env:AWS_SECRET_ACCESS_KEY
      default-field: value

  providers:
    openai:
      api-key-secret-ref: env:OPENAI_API_KEY
      base-url: https://api.openai.com/v1
    openai-compatible:
      provider-name: compatible
      bearer-token-secret-ref: env:COMPATIBLE_API_TOKEN
      base-url: https://compatible.example.com/v1
    anthropic:
      api-key-secret-ref: env:ANTHROPIC_API_KEY
      base-url: https://api.anthropic.com
    ollama:
      base-url: http://localhost:11434

Sovereign Runtime

The sovereign runtime is selected with tramai.profile: sovereign and configured under tramai.sovereign.*. The allowlists are mandatory: missing allowed models, missing allowed providers, a provider without a trust zone, a model without a route, or a route that points at a non-allowed provider all fail startup.

KeyMeaning
tramai.sovereign.enabledCompatibility switch; may only be true
tramai.sovereign.allowed-modelsModels whose invocation is permitted; each must appear as a key in models
tramai.sovereign.allowed-providersProviders that may be used; each must have a provider-zones entry
tramai.sovereign.allowed-toolsTools whose execution is permitted
tramai.sovereign.allowed-permissionsTool permissions that are granted
tramai.sovereign.provider-zones.<provider>Trust zone: LOCAL, EU_CLOUD, or GLOBAL_CLOUD
tramai.sovereign.models.<logical-model>Provider route for each allowed model
tramai:
  profile: sovereign

  providers:
    ollama:
      base-url: http://localhost:11434

  sovereign:
    allowed-models:
      - llama3.2
    allowed-providers:
      - ollama
    allowed-tools:
      - schedule-payment
    allowed-permissions:
      - payment.schedule
    provider-zones:
      ollama: LOCAL
    models:
      llama3.2: ollama

Sovereign Persistence

tramai-spring-boot-starter-sovereign-persistence-file and -jdbc bind the same prefix:

KeyMeaning
tramai.sovereign.persistence.typememory (default), file, or jdbc
tramai.sovereign.persistence.base-dirBase directory for the file-backed store
tramai.sovereign.persistence.jdbc.claim-lease-durationClaim lease duration (default 5m)
tramai.sovereign.persistence.jdbc.max-claim-limitMaximum claims per poll (default 500)
tramai.sovereign.persistence.encryption.key-envEnvironment variable holding the base64 256-bit key
tramai.sovereign.persistence.encryption.key-fileFile holding the key
tramai.sovereign.persistence.encryption.key-idKey identifier (default default)
tramai:
  sovereign:
    persistence:
      type: file
      base-dir: ./data/tramai-sovereign
      encryption:
        key-env: TRAMAI_SOVEREIGN_STORE_KEY

Sovereign Ops

Bound by tramai-spring-boot-starter-sovereign-ops (the worker-status endpoint property is owned by tramai-spring-boot-starter-sovereign-ops-actuator):

KeyMeaning
tramai.sovereign.ops.enabledEnables the ops surfaces (default true)
tramai.sovereign.ops.mutations-enabledAllows administrative mutations such as denying an approval (default false)
tramai.sovereign.ops.max-page-sizePage size cap (default 100)
tramai.sovereign.ops.outbox.worker.*Audit outbox worker: enabled, initial-delay, interval, batch-size, recover-prepared, dispatch-pending, fail-on-missing-dispatcher, lease-enabled, lease-name, worker-id, lease-duration, lease-heartbeat-interval
tramai.sovereign.ops.approved-resume-worker.*Approved-continuation resume worker: enabled, lifecycle-enabled, worker-id, batch-size, interval, lease-duration, lease-heartbeat-interval, retry-delay, conflict-retry-delay
tramai.sovereign.ops.actuator.worker-status.enabledActuator worker status endpoint (default false)
tramai:
  sovereign:
    ops:
      outbox:
        worker:
          enabled: true
          lease-enabled: true
      approved-resume-worker:
        enabled: true

What Is Not Configurable In 0.6.0

These do not exist as properties, in either profile:

  • provider-level timeout or retry-policy configuration — timeouts and retries are per operation via @Operation(timeoutMillis = ..., providerRetries = ...)
  • framework-level default max tokens or temperature
  • streaming configuration — streaming is inferred from the return type
  • preflight token estimation before a provider call is sent