ibm-b2bi-sfg-agents

by joaquinito2051

Helm chartv1.0.0App 1.0.0.0Apache-2.0

Agentic Foundation Service (multi-agent host) + MCP tool server for IBM Sterling B2B Integrator / File Gateway. Deploys the agent workload and its co-located MCP server as a single release, per Agent Hub OCP Deployment Specification Pattern B (agent chart "includes MCP server").

About this chart

IBM Sterling B2B Integrator and File Gateway Agents 1.0.0.0

Deploys the IBM Sterling B2B Integrator and File Gateway Agents (multi-agent host) and its co-located b2bi-mcp-server tool server as a single Helm release, per agent-hub/ocp/Agent-Deployment-Spec-v0.5.md section 8 (Pattern B: "agent chart includes MCP server"), packaged for OCP/Kubernetes.

Prerequisites

  • Helm >= 4.2.3
  • OpenShift Client (oc) >= 4.22
  • Kubernetes >= 1.32 / OpenShift >= 4.19 & <=4.22
  • All pods must be able to run under the restricted-v2 SCC (OCP) / restricted Pod Security Standard (vanilla Kubernetes) — this chart does not request elevated permissions.
  • Recommended with AgentHub deployed on OCP: OpenShift Service Mesh (Istio) >= 3.4. Since istio.enabled=true is this chart's default, sidecar injection must be enabled on the target namespace before installing, or agent/ mcp-server pods will get stuck waiting on a proxy that never starts (no sidecar was injected, yet this chart's PeerAuthentication still requires STRICT mTLS). Enable it with whichever mechanism your mesh installation uses — check with your platform/mesh administrator:
    kubectl label namespace <your-namespace> istio-injection=enabled
    # or, for revision-based injection (common on newer OSSM 3 / Sail Operator setups):
    kubectl label namespace <your-namespace> istio.io/rev=<your-istio-revision-name>
    
    If istiod runs in a different namespace than this release (typical), also set istio.controlPlaneNamespace — see Network policy below, and Istio vs. native mTLS below.
  • A reachable B2BI/SFG instance and credentials for mcpServer.b2bi.baseUrl. The B2BI/SFG user that AgentHub impersonates must be granted APIUser, or the specific GET/POST/PUT/DELETE API permissions matching whichever B2BI/SFG REST APIs the agent needs to invoke. Refer to the B2BI/SFG product documentation for how to assign these permissions.
  • An ingress NetworkPolicy (or equivalent firewall rule) added on the B2BI/SFG side that allows inbound traffic from this release's namespace on the B2BI API port (mcpServer.b2bi.baseUrl's port) — this chart's own NetworkPolicy resources (see Network policy) only manage egress from the agent/mcp-server pods; they cannot open ingress on the B2BI side, which lives outside this chart's control and must be configured separately.
  • A reachable model gateway address for agents.modelGateway.url — required whenever agents.modelGateway.mode=hub (the default). Left empty, the agent starts but every LLM call fails with MODEL_GATEWAY_MODE=hub but HUB_MODEL_GATEWAY_URL not set. If the gateway requires an API key (agents.modelGateway.auth=api_key), pre-create a Secret for it before installing — see Model gateway.

Quick start

your-namespace below is just a placeholder — use the same namespace used for the AgentHub deployment which generally defaults to agenthub.

Both examples below rely on agents.mode (hub by default, or standalone): hub mode registers this deployment with the Agent Hub at agents.hub.registryUrl and lets the Hub route requests to it; standalone mode skips Hub registration entirely and routes internally, with no Hub dependency at all.

With Istio (the default — enable sidecar injection on the namespace first, see Prerequisites, or pods will hang instead of becoming Ready):

kubectl create namespace your-namespace
kubectl label namespace your-namespace istio-injection=enabled

helm install my-agents ./ibm-b2bi-sfg-agents \
  --namespace your-namespace \
  --set global.license=true \
  --set istio.installed=true \
  --set agents.hub.registryUrl=https://agent-hub:8443/v1/registry/agents \
  --set agents.modelGateway.url=https://gateway-ibm-agenthub-gateway:8002/v1 \
  --set mcpServer.b2bi.baseUrl=https://your-b2bi-host:9080 \
  --set mcpServer.b2bi.username=admin \
  --set mcpServer.b2bi.password=changeme

The examples above set agents.modelGateway.url since agents.modelGateway.mode defaults to hub — see Model gateway for the gateway's auth options (including API-key Secret setup) and the direct alternative.

Run helm test my-agents -n your-namespace afterwards to verify both /health endpoints respond.

Configuration

ValueDefaultPurpose
agents.preferDataUserPromptfalseQuery source for POST /message:send — true prefers message.parts[].data.user_prompt, false prefers message.parts[].text (the orchestrator's execution plan). Toggle to test both payload shapes with AgentHub until their text-part handling is fixed. Sets the PREFER_DATA_USER_PROMPT container env var.
agents.mcpDiscoverMaxRetries3Max attempts for the initial MCP tools/list discovery handshake at startup. Increase if MCP server pods are slow to become Ready behind their Service. Sets the MCP_DISCOVER_MAX_RETRIES container env var.

Agents

The agents image is a multi-agent package — one combined Deployment hosts every bundled agent, not one Deployment per agent. agents.* is therefore mostly common config for that single instance (image, port, hub, modelGateway, resources, probes, etc.), with one exception: nested per-agent-ID entries (e.g. agents.b2bi_resolution_v1.enabled, matching the agent ID baked into the image) are enable/disable bookkeeping only — they do not gate the Deployment/Service/HPA/PDB/NetworkPolicy/Istio policies, which always exist as long as this release is installed. Reserved for future per-agent filtering once the service supports selectively activating bundled agents; not yet consumed by the running service.

Istio vs. native mTLS

istio.enabled=true (default)istio.enabled=false
mTLSSTRICT, enforced by the mesh sidecar (PeerAuthentication)App-level TLS via agents.nativeTls (mounted cert/key/CA Secret)
App listenerPlain HTTP (sidecar terminates mTLS)HTTPS (agent only — see Dockerfile)
Identity/authzAuthorizationPolicy (mesh principals)agents.authMode=mtls (custom X-Client-Cert-DN header)
PrerequisiteOpenShift Service Mesh installed + namespace enrolled; istio.installed=true to acknowledgeNone

This chart does not hard-require Istio. istio.enabled=true is recommended on OCP with OSSM already available (it's the same mesh the Agent Hub platform itself requires); istio.enabled=false is for clusters without a service mesh. Do not set agents.authMode=mtls while istio.enabled=true — Istio emits X-Forwarded-Client-Cert, not the X-Client-Cert-DN header the app checks for; use agents.authMode=none and rely on the mesh's AuthorizationPolicy for identity instead (the chart's default).

Secrets

This chart never accepts plaintext credentials as first-class values (OWASP A02/A05) except as an explicit, documented quick-start convenience:

ValuePurposePreferred
mcpServer.b2bi.existingSecretNameB2BI credentials (B2BI_USERNAME/B2BI_PASSWORD or B2BI_API_TOKEN) for a user with the APIUser permission — see PrerequisitesPre-create the Secret and reference it here
mcpServer.logExtraction.downloadApiSecretNameShared HMAC secret (key DOWNLOAD_API_SECRET, fixed) for signing download_logs links — see Download linksAlways pre-create — must match B2BI/SFG's own download.api.secret byte-for-byte
agents.nativeTls.existingSecretNamemTLS agent.crt/agent.key/hub-ca.crt (native TLS mode)Always pre-create — this chart never generates certs
agents.apiKeyExistingSecretNameAPI_KEY (when authMode=api_key)Always pre-create
agents.modelGateway.apiKeyExistingSecretNameMODEL_GATEWAY_API_KEY (when agents.modelGateway.auth=api_key)Always pre-create — see Model gateway
sharedCacheStore.passwordExistingSecretNameSHARED_CACHE_PASSWORD (redis/valkey auth, when sharedCacheStore.enabled=true)Always pre-create — see Shared cache

Shared cache (Valkey)

Pending human-in-the-loop approvals and similar cross-request state use a generic, backend-agnostic shared cache (sharedCacheStore) rather than in-process memory, so state survives across the agent's multiple replicas. It is disabled by default — the agent falls back to an in-memory cache (not safe across replicas, but requires no external dependency) when sharedCacheStore.enabled=false.

Two ways to enable it:

1. Bring your own (recommended for production) — point at an externally-managed, clustered/HA redis/valkey/memcached instance:

sharedCacheStore:
  enabled: true
  backend: valkey
  url: my-external-valkey:6379
  passwordExistingSecretName: my-external-valkey-password

For redis/valkey, prefer passwordExistingSecretName (an existing Secret with a password key, wired in as SHARED_CACHE_PASSWORD) over embedding a password in url directly. Not applicable for memcached (no AUTH mechanism).

2. Use the bundled single-instance Valkey — a quick-start/dev option with no external dependency (no clustering/HA; a best-effort cache, not a source of truth, backed by a PVC so data survives pod restarts):

sharedCacheStore:
  enabled: true
  bundled:
    enabled: true
    image:
      repository: cp.icr.io/cp/ibm-b2bi-sfg-agents/b2bi-valkey
      tag: "8.1.10"

sharedCacheStore.url is left blank in this case — it defaults to the bundled Valkey Service's in-cluster DNS name automatically.

A pre-built b2bi-valkey image is shipped for this chart, and sharedCacheStore.bundled.image.repository defaults to it (cp.icr.io/cp/ibm-b2bi-sfg-agents/b2bi-valkey). Override repository/.tag only if you mirror the image to a private registry or build your own (see deploy/valkey/README.md).

The bundled Valkey Deployment/Service/PVC are only rendered when sharedCacheStore.bundled.enabled=true; the NetworkPolicy rules restricting access to it (see Network policy) only render alongside it.

MCP server wiring

agents.mcpServers renders config/mcp_servers.yaml for the agent container. Leave it empty (default) to auto-wire to this chart's own co-located mcpServer Service. Set it explicitly to point at additional/external MCP servers:

agents:
  mcpServers:
    - name: b2bi
      transport: http
      url: http://my-agents-ibm-b2bi-sfg-agents-mcp-server:8090/mcp
      auth: none

MCP server OAuth2 authentication

Setting mcpServer.authMode=oauth2 makes b2bi-mcp-server an OAuth2 resource server — it validates every inbound request's Authorization: Bearer token (signature, issuer, audience, expiry) against an identity provider's JWKS before allowing the call through:

ValueDefaultPurpose
mcpServer.oauth.issuer""Required. The identity provider's OAuth2 issuer URL.
mcpServer.oauth.audience"b2b-client"Required. Expected aud claim on inbound tokens. Identity-services commonly set aud to the calling client's own client_id (not a fixed service name) — set this to match the client_id configured in agents.mcpOAuth's secret.
mcpServer.oauth.jwksUri""Override the JWKS endpoint; defaults to {issuer}/.well-known/jwks.json when empty.
mcpServer.oauth.clockSkewSeconds60Leeway for exp/nbf validation.
mcpServer.oauth.jwksCacheTtlSeconds300How long the JWKS signing keys are cached before refreshing.

To enable OAuth authentication/authorization for the Agent Hub user impersonating B2BI user on the B2BI APIs side, mcpServer.b2bi.authStrategy should be set to relay, in which case the MCP server relays the OAuth token to B2BI APIs. On the B2BI APIs side, it should also be configured for OAuth authentication as per the B2BI/SFG product documentation. If configured for OAuth, the APIs validate the token on every inbound request and authorize based on the permissions assigned to the user.

ValueDefaultPurpose
mcpServer.b2bi.authStrategystaticSet to Static or Relay. Should be set to relay to pass the OAuth token to B2BI APIs

The agent, in turn, needs to obtain and send that Bearer token — it acts as an OAuth2 client using the client-credentials grant. For the auto-wired co-located mcpServer entry (agents.mcpServers left empty), set:

ValuePurpose
agents.mcpOAuth.tokenUrlThe identity provider's token endpoint
agents.mcpOAuth.existingSecretNameName of a pre-created Secret with keys client_id and client_secret — always pre-create, this chart never generates it
agents.mcpOAuth.scopeOptional space-separated scopes to request

mcpServer.oauth.issuer, agents.mcpOAuth.tokenUrl, and mcpServer.oauth.jwksUri are all derived from the same identity-service base address — <protocol>://<identity-service-FQDN>:<identity-service-port> — with a fixed path appended for the token and JWKS endpoints:

issuer   = https://identity-service.example.com:8443
tokenUrl = https://identity-service.example.com:8443/oauth2/token
jwksUri  = https://identity-service.example.com:8443/oauth2/jwks

Note that the mcp-oauth-creds secret should have the same client_id and client_secret values as configured on the B2BI deployment side.

kubectl create secret generic mcp-oauth-creds \
  --namespace your-namespace \
  --from-literal=client_id=b2b-client \
  --from-literal=client_secret=b2b-secret

helm upgrade --install my-agents ./ibm-b2bi-sfg-agents \
  --namespace your-namespace \
  --set mcpServer.authMode=oauth2 \
  --set mcpServer.oauth.issuer=https://identity-service.example.com:8443 \
  -

Deploy ibm-b2bi-sfg-agents with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-b2bi-sfg-agents on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-b2bi-sfg-agents is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply