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.
1. Reference architecture
Section titled “1. Reference architecture”A production AgentCube deployment has four parts, all running inside your environment:
| Component | Role | State |
|---|---|---|
| Context Engine (CE) | The single MCP endpoint your AI platform connects to; registers connectors, routes calls, presents a small, generic tool surface | Stateful — backed by PostgreSQL |
| Connector(s) | One per Oracle system (Planning, FCCS, Essbase); translate CE calls into native Oracle REST | Stateless |
| PostgreSQL | Holds 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 data | Persistent, must be backed up. Requires the pgvector extension (CREATE EXTENSION vector;) |
| Licensing service | The 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.
Network requirements
Section titled “Network requirements”| Direction | Endpoint | Required? |
|---|---|---|
| Inbound to CE | Public HTTPS (443) from your AI platform, plus your administrators for the admin console and API | Yes |
| CE → PostgreSQL | Your database, TLS | Yes |
| CE → connectors | Internal HTTPS, inside your environment | Yes |
| Connectors → Oracle EPM | Your {connector_url} → Oracle Planning / FCCS / Essbase | Yes |
| All → container registry | GitHub Container Registry, image pulls at deploy time | Yes (deploy time) |
| CE → identity provider | Your IdP’s OIDC discovery and signing-key endpoints, HTTPS (443) | Only if CE single sign-on is enabled |
| CE → licensing service | https://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).
2. Choosing an orchestrator
Section titled “2. Choosing an orchestrator”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.
| Platform | Model | HA / rolling deploys | Best when | Guide |
|---|---|---|---|---|
| Azure Container Apps | Managed | Built in (set min replicas ≥ 2) | You are on Azure and want the least operational overhead | Azure Container Apps |
| AKS / vanilla Kubernetes | Customer-managed | Yes, you configure it | You already run Kubernetes and want full control | On-Premise / Docker (Kubernetes section) |
| AWS ECS / Fargate | Managed | Yes (service desired-count ≥ 2) | You are on AWS | AWS ECS |
| Google Cloud Run | Managed | Yes (min instances ≥ 1, scales out) | You are on GCP | (use the container spec from Container Images) |
| OCI Container Instances | Managed | Limited — no native rolling deploy | Co-located with Oracle EPM on OCI | OCI Container Instances |
| Docker / Docker Compose | Single host | No | On-prem evaluation, or a single-server deployment that accepts a single point of failure | On-Premise / Docker |
3. Sizing tiers
Section titled “3. Sizing tiers”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.
| Tier | Concurrent users | CE replicas | CE CPU / memory | PostgreSQL | Connector replicas |
|---|---|---|---|---|---|
| Small | ≤ 50 | 2 | 1.0 vCPU / 2 GiB | Burstable | 2 |
| Medium | ≤ 500 | 2–3 | 2.0 vCPU / 4 GiB | General purpose | 2–3 |
| Large | 1000+ | 3–5 | 2.0 vCPU / 4 GiB | Memory optimized | 3–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_connectionsheadroom, 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.
Metadata size
Section titled “Metadata size”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_DIRto 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.
4. High availability & scaling
Section titled “4. High availability & scaling”- 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.
5. Operational runbook
Section titled “5. Operational runbook”What to monitor
Section titled “What to monitor”| Signal | Why it matters | Where |
|---|---|---|
| Memory utilization | The clearest scale-up trigger; sustained high memory means size up or add replicas | Platform metrics |
| Request latency | Rising latency under steady load is your scale-out signal | Platform metrics |
| Replica restart count | Repeated restarts point at memory pressure or a failing dependency | Platform metrics |
/health license block | license.status other than valid, or data_source_provisioning: "blocked_by_license", means new data sources cannot be added until the license validates | Health Monitoring |
| Database connections in use | Approaching the ceiling predicts failed deploys and dropped queries | Your 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.
When to scale up vs out
Section titled “When to scale up vs out”- 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.
Rolling back a bad deploy
Section titled “Rolling back a bad deploy”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.
Backup & recovery
Section titled “Backup & recovery”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:
- 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.
- The CE’s nightly export. The CE’s built-in
database_backupjob writes a compressedpg_dumpto 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 ownpg_dumpexports instead.
To set up the nightly export:
- Create a StorageV2 storage account (geo-redundant, public blob access off) and a blob container,
agentcube-ce-backupsby default. Add a lifecycle policy that moves older exports to cooler tiers and deletes them at the end of your retention period. - 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_KEYfrom it. - Set
AGENTCUBE_CE_BACKUP_BLOB_ACCOUNT_URL(andAGENTCUBE_CE_BACKUP_BLOB_CONTAINERif you chose another name). See Environment Variables. - 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.gzfile 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.