Skip to content

Production Deployment & Sizing

The per-platform guides show you how to get a container running. This page is for the platform team standing up AgentCube for real workloads: how the pieces fit together in production, how big to make them, how to keep them available, and how to operate them once they are live.

The single most important framing for everything below: these are starting points, not guarantees. AgentCube is self-hosted, so the right sizing depends on your user count, query patterns, and Oracle EPM latency. Treat the numbers here as where to begin a pilot, then measure and adjust against your own traffic.

A production AgentCube deployment has four parts, all running inside your environment:

ComponentRoleState
Context Engine (CE)The single MCP endpoint your AI platform connects to; registers connectors, routes calls, presents a small, generic tool surfaceStateful — backed by PostgreSQL
Connector(s)One per Oracle system (Planning, FCCS, Essbase); translate CE calls into native Oracle RESTStateless
PostgreSQLHolds the CE’s configuration and operational state: connected systems (with encrypted credentials), data sources, mappings, metadata snapshots, jobs, admin users, API keys, the installed license, and the audit log — no Oracle cell dataPersistent, must be backed up. Requires the pgvector extension (CREATE EXTENSION vector;)
Licensing serviceThe CE validates its installed license key with the Caprus AI licensing service (https://licensing.caprus.ai)External (Caprus AI) — required

For the full topology diagram, trust boundaries, and identity flow, see Architecture. The points that drive a production deployment:

  • One Context Engine per tenant. A tenant is a single CE instance plus its own PostgreSQL database. If you run multiple tenants (for example separate business units or subsidiaries), give each its own CE and database rather than sharing one CE across tenants.
  • Admin and user connectors are separate workloads. The recommended production pattern runs each Oracle system as two connector instances: an admin instance for metadata and a user instance that reaches Oracle as each signed-in user. Plan network reachability and scaling for each independently. See Auth Modes for how to configure each.
  • The CE is the only inbound entry point. The AI platform talks only to the CE over HTTPS, and your administrators reach the CE’s admin console (/admin/) and API (/api/v1/) on the same endpoint; connectors are reachable only from the CE inside your environment.
DirectionEndpointRequired?
Inbound to CEPublic HTTPS (443) from your AI platform, plus your administrators for the admin console and APIYes
CE → PostgreSQLYour database, TLSYes
CE → connectorsInternal HTTPS, inside your environmentYes
Connectors → Oracle EPMYour {connector_url} → Oracle Planning / FCCS / EssbaseYes
All → container registryGitHub Container Registry, image pulls at deploy timeYes (deploy time)
CE → identity providerYour IdP’s OIDC discovery and signing-key endpoints, HTTPS (443)Only if CE single sign-on is enabled
CE → licensing servicehttps://licensing.caprus.ai, HTTPS (443)Yes

The CE sends the licensing service the license key, the Context Engine version and an opaque deployment identifier; never Oracle data, metadata or user information. If the license cannot be validated, adding data sources is blocked until it validates. Apart from licensing, nothing in this topology calls out to Caprus AI.

The license key is not an environment variable. After the CE is running, install it once in the admin console under Admin & Security → License, or with PUT /api/v1/license. The CE stores it encrypted with AGENTCUBE_CE_CREDENTIAL_KEY, so that key must be set before you install a license (see Backup & recovery).

AgentCube ships as standard Linux containers, so it runs on any container platform. The choice for production is mainly about who operates the control plane and what availability story you need.

PlatformModelHA / rolling deploysBest whenGuide
Azure Container AppsManagedBuilt in (set min replicas ≥ 2)You are on Azure and want the least operational overheadAzure Container Apps
AKS / vanilla KubernetesCustomer-managedYes, you configure itYou already run Kubernetes and want full controlOn-Premise / Docker (Kubernetes section)
AWS ECS / FargateManagedYes (service desired-count ≥ 2)You are on AWSAWS ECS
Google Cloud RunManagedYes (min instances ≥ 1, scales out)You are on GCP(use the container spec from Container Images)
OCI Container InstancesManagedLimited — no native rolling deployCo-located with Oracle EPM on OCIOCI Container Instances
Docker / Docker ComposeSingle hostNoOn-prem evaluation, or a single-server deployment that accepts a single point of failureOn-Premise / Docker

The tiers below are starting points to validate during your pilot, not certified capacities. Begin at the tier that matches your user count, then watch the signals in the operational runbook and adjust.

TierConcurrent usersCE replicasCE CPU / memoryPostgreSQLConnector replicas
Small≤ 5021.0 vCPU / 2 GiBBurstable2
Medium≤ 5002–32.0 vCPU / 4 GiBGeneral purpose2–3
Large1000+3–52.0 vCPU / 4 GiBMemory optimized3–5

Notes on reading the table:

  • The Small tier is the Context Engine’s minimum per replica. The Context Engine needs at least 1 vCPU / 2 GiB; connectors need at least 0.25 vCPU / 0.5 GiB (see Container Images). The Small tier adds the second replica for availability; size up from there as real concurrent traffic grows.
  • Postgres tier is driven by connection headroom, not just CPU/RAM. The CE and its background work (audit, metadata cache, OAuth handshakes) each open connections, and a rolling deploy briefly runs old and new replicas at once — so peak connection demand is higher than steady state. A small burstable database can have a connection ceiling low enough (on the order of a few dozen) to be the first thing you hit, well before CPU. When you size up, confirm the database’s max_connections headroom, not only its compute.
  • Connectors scale with query volume, not user count directly — a few power users running heavy queries can drive more connector load than many light users.

The Context Engine keeps a copy of each Planning and FCCS application’s metadata (members, aliases, hierarchy) so it can resolve and render names without calling Oracle. What that costs depends on the size of the application’s metadata export, not on user count:

  • Context Engine memory: about 35 MB per 100,000 members (rows of the export) held for each application it mirrors, per replica, and up to about 100 MB per 100,000 at the peak of a refresh, when the previous copy keeps answering until the new one is ready. An export of 50 MB zipped, about 1.1 million rows, peaks at about 1.6 GiB during a refresh and fits the Small tier’s 2 GiB on its own; plan 3–4 GiB for two applications that size.
  • Admin connector memory: independent of the export’s size; the 0.5 GiB minimum covers exports to 50 MB zipped.
  • Admin connector local disk: the connector keeps the downloaded export and an index of it on local disk, about 1.5 times the export’s unzipped size (under 1 GiB for a 50 MB zipped export). The default location is the container’s temporary directory; set AGENTCUBE_METADATA_CACHE_DIR to put it elsewhere. Make sure the container’s ephemeral storage allows for it. Nothing there needs to be kept: it is rebuilt from the export on every start and refresh.
  • Run at least two replicas of the Context Engine as your HA baseline — not for throughput, but so a single replica failing or restarting does not take the deployment down. This is a production recommendation; a single-replica deployment is fine for a lab or evaluation but has no failover.
  • Scale rules: scale out on HTTP concurrency or CPU%. Concurrency is usually the better signal for an MCP workload, where a request can sit waiting on Oracle.
  • Connectors are stateless — restart or scale them horizontally freely; no data is lost and no session is pinned to a replica.
  • The Context Engine is stateful (Postgres-backed). It scales horizontally too, but during a rolling deploy the old and new replicas overlap, so peak database connection demand is briefly higher than steady state. Size your database’s connection headroom for that overlap, or a deploy can fail to roll over when the new replica cannot get a connection.
  • Rolling deploys: an orchestrator brings up the new revision, waits for it to pass /health, then shifts traffic and retires the old one. Keep min replicas ≥ 2 so traffic always has a healthy target during the swap. A new CE version applies any pending database migrations when it starts, so during a CE upgrade the old replicas briefly run against the already-migrated schema. Take a database backup before every CE upgrade.
SignalWhy it mattersWhere
Memory utilizationThe clearest scale-up trigger; sustained high memory means size up or add replicasPlatform metrics
Request latencyRising latency under steady load is your scale-out signalPlatform metrics
Replica restart countRepeated restarts point at memory pressure or a failing dependencyPlatform metrics
/health license blocklicense.status other than valid, or data_source_provisioning: "blocked_by_license", means new data sources cannot be added until the license validatesHealth Monitoring
Database connections in useApproaching the ceiling predicts failed deploys and dropped queriesYour database metrics

See Health Monitoring for the /health endpoint shape and alerting guidance. The CE’s /health response also carries the license block above; the admin console’s License page shows the same state.

  • Scale up (bigger replicas) when a single replica is memory- or CPU-bound at its current size — typically heavier queries or larger metadata caches.
  • Scale out (more replicas) when latency rises under concurrency while individual replicas are not saturated — that is contention for request slots, which more replicas relieve. Scaling out is also what gives you availability; keep ≥ 2 regardless.

Connectors are stateless, so rolling one back is simply redeploying its previous image tag.

The Context Engine is different: upgrades apply database migrations automatically at startup, and migrations cannot be reversed. Before upgrading, take a backup (snapshot or pg_dump) of the CE database and confirm you have AGENTCUBE_CE_CREDENTIAL_KEY stored safely. To roll back, restore that pre-upgrade backup, then deploy the previous image tag with the same environment settings and the same credential key. Never start an older image against a database a newer version has migrated.

The procedure per platform, plus version-numbering guidance, is in Rollbacks and Upgrades.

The Context Engine’s PostgreSQL database is the only stateful component, and you own its backup posture. The CE persists no Oracle cell data — financials are always fetched fresh from Oracle — but the database is more than a cache: it holds your connected systems and data sources, the configuration your administrators have set up, admin users, API keys, the installed license, and the audit trail. Losing it means rebuilding that configuration, not just re-syncing.

Protect it with two layers, and set both up before go-live:

  1. Point-in-time restore (PITR) on the database. Your database platform’s built-in backups restore to any moment inside a retention window. On Azure Database for PostgreSQL Flexible Server, choose the retention window (up to 35 days, depending on tier) and geo-redundant backup when you create the server; geo-redundancy cannot be turned on afterwards. PITR covers recent mistakes, but not anything older than the window, and not the loss of the server itself.
  2. The CE’s nightly export. The CE’s built-in database_backup job writes a compressed pg_dump to Azure Blob Storage each night. Kept in a separate, geo-redundant storage account with a lifecycle policy, it gives you history beyond the PITR window and a copy that survives the database server. On a platform other than Azure, schedule your own pg_dump exports instead.

To set up the nightly export:

  1. Create a StorageV2 storage account (geo-redundant, public blob access off) and a blob container, agentcube-ce-backups by default. Add a lifecycle policy that moves older exports to cooler tiers and deletes them at the end of your retention period.
  2. Give the CE access: assign its managed identity the Storage Blob Data Contributor role on the account, or store the account key as a secret and set AGENTCUBE_CE_BACKUP_BLOB_KEY from it.
  3. Set AGENTCUBE_CE_BACKUP_BLOB_ACCOUNT_URL (and AGENTCUBE_CE_BACKUP_BLOB_CONTAINER if you chose another name). See Environment Variables.
  4. After the CE restarts, open Jobs → database_backup in the admin console. If the job is disabled (it is when the CE first started before backup storage was configured), enable it. Then choose Trigger now and confirm the run succeeds and an agentcube_ce_*.sql.gz file appears in the container.

The admin console dashboard flags a deployment whose backups are not configured. Clear that before go-live, not after.

Back up AGENTCUBE_CE_CREDENTIAL_KEY with your database backups. It is the encryption key for the secrets the CE stores in its database: the service-account credentials you enter for connected systems, and the installed license key. A database restored into a CE running a different key cannot decrypt them; you would have to re-enter each connected system’s credentials and install the license again. Keep the key in your secret manager and restore it alongside the database.


Once your deployment is live, continue with the Administration section for day-to-day connector and user management.