Skip to main content

Platform architecture

French version: ../ARCHITECTURE.md. Earlier architecture: ../overview.en.md, ../overview.html.

Every item cites a path verified in the repository. Control Plane code lives in services/control-plane/src/eai/ (shortened eai/; domains under eai/domains/).

Diagrams​

The ten planes (kit section 2.1)​

PlaneCodeIntegrations and deployment
Experienceportal/ (Next.js), navin-manager/ui/ (Vite)portal/src/locales, docs/
Platform Managementnavin-manager/server, agent-go, operator, catalog, packagingcatalog/components (ManagedComponent), release/
Identity/Governance/Policydomains/identity, authz, context, delegation, policies, approvals, governancedeploy/keycloak, deploy/spire, deploy/policies/opa, deploy/policies/openfga
Agent Executiondomains/agents, mcp, tools, sdks/python/src/enterprise_ai/loop and runtimeintegrations/nats.py, temporal.py, sandbox.py, deploy/apisix
Modeldomains/llm, finopsdeploy/litellm, integrations/litellm.py, vllm.py
Data/Privacydomains/knowledge, privacy, storage, lineage, retention ; sql/postgreseai/storage (S3, Azure, GCS), integrations/qdrant.py, presidio.py, docling.py, ocr.py
Multimodaldomains/multimodal, realtime ; media_worker.pydeploy/livekit, tools/multimodal
Observability/Audit/SOCeai/audit.py, domains/evidence, soc, incidents, observabilitydeploy/observability (opik, opensearch, jaeger, prometheus, alertmanager, otel-collector), deploy/runtime-security
Infrastructure/DevSecOpsdeploy/helm, gitops, argocd, cilium, keda, cert-manager, velero, terraform, policies/kyvernodeploy/ci, .forgejo/workflows/ci.yml, .gitlab-ci.yml
Commercialdomains/licensing, tools/license-issuerrelease/lock-manifest.json, release/sbom

Flows​

  1. Request: client or portal -> APISIX API Gateway (deploy/apisix) -> Control Plane (python -m eai.main) -> authentication (eai/auth.py), tenant taken from the credential, db.tx(principal) transaction under RLS.
  2. Policy decision: eai/policy.py and integrations/opa.py (OPA), require_relation through integrations/openfga.py; then /v1/delegations/authorize computes the user, agent, delegation intersection (domains/delegation/runtime.py). Default: deny.
  3. Model: Model Gateway /v1/gateway/* (domains/llm/gateway.py) -> LiteLLM -> local vLLM or approved provider; quota reserved before the call (domains/finops/reservation.py).
  4. Audit: every mutation writes a chained event (eai/audit.py), outbox and seals (V150, V151), evidence (domains/evidence).
  5. Three separate flows (kit section 11): sampleable OTel telemetry (eai/tracing.py, Opik, Jaeger, Prometheus); security.* events written in their own transaction (eai/security, OpenSearch SIEM); unsampled critical audit in PostgreSQL.
  6. Release: catalog/components manifests, release/lock-manifest.json, release/sbom SBOMs (tools/components/sbom.sh), offline bundle navin-manager/packaging/offline/build-bundle.py and verify-bundle.py, Argo CD GitOps (deploy/gitops/<env>).

Trust boundaries​

  • Browser to API: the frontend is never an authorization source, every route is checked by the backend.
  • Tenant to tenant: forced RLS (ADR-0106).
  • Platform to Internet: only eai.security.egress goes out (ADR-0121).
  • Manager to hosts: the agent opens connections, mTLS + HMAC (ADR-0119).
  • Untrusted content (RAG, tools, MCP, memory): injection detection and wrapping.
  • Secrets: OpenBao or client vault, never in the repository, logs or traces (ADR-0112).

Forbidden design choices (kit section 2.2) and enforcement​

ForbiddenWhere enforced
Drag-and-drop builder as corecode-first development: SDKs sdks/, CLI, packs packs/; the portal only renders topology graphs (portal/tests/topology.test.ts)
Foreign framework imposed on NavinADR-0102, sdks/python/src/enterprise_ai/runtime/ (optional adapters)
Direct LLM callADR-0104, domains/llm/gateway.py, domains/llm/embedder.py
Uncontrolled MCP, RAG, sensitive service accessdomains/mcp, domains/knowledge/governance.py, eai/security/egress.py, tests/test_gateway_pep_untrusted.py
Hard-coded credentials or raw tokencredential_ref in manifests, domains/secrets, CI gitleaks (.forgejo/workflows/ci.yml)

Machine management, HA, backup and DR (addendum 20)​

Three control levels: SSH for the initial installation, agents and operator for operations, HA, backup and DR controllers for continuity (../diagrams/infrastructure-manager.html).

FunctionWhere in the repositoryDecision
SSH bootstrap, preflight, enrolment, signed commandsnavin-manager/server/src/navin_manager/hosts, infrastructure, agentapiADR-0124
Go Node Agent (systemd)navin-manager/agent-goADR-0124, ADR-0119
Cluster Agent and Platform Operatornavin-manager/cluster-agent, navin-manager/operator, navin-manager/server/src/navin_manager/kubernetesADR-0124
Ownership, deployment modes, placementnavin-manager/server/src/navin_manager/availabilityADR-0125
HA groups, leases, fencing, failure testsnavin-manager/server/src/navin_manager/availability, deploy/helm/enterprise-ai/values-ha.yamlADR-0126
Backups, restores, disaster recoverynavin-manager/server/src/navin_manager/backup, recovery, deploy/veleroADR-0127
Operation engine of the Manager (resume, attempts, rollback) instead of Temporalnavin-manager/server/src/navin_manager/engineADR-0150
Compatibility matrix in the signed catalognavin-manager/catalog, navin-manager/server/src/navin_manager/services/upgrades.pyADR-0151
Portal frontend stack (design system, generated API client, shared components)portal/src/components, portal/src/libADR-0148
Portal Platform Manager space: backup and DR, configuration center, deep linksservices/control-plane/src/eai/domains/platform_manager, portal/src/screens/platform-manager.tsxADR-0162
One dedicated test per portal screen, plugin builderportal/tests/screens-spaces.test.ts, portal/src/screens/studio.tsxADR-0163
Navin library (skills, plugins, commands, agents, MCP presets, channels) activated per project, project rulescatalog/navin, tools/navin_library/sync.py, services/control-plane/src/eai/domains/navin_library, navin-manager/server/src/navin_manager/api/mcp.pyADR-0164
MCP hosting in the Navin Manager (service mcp-host) and isolation per project of the MCP gatewaynavin-manager/mcp-host, navin-manager/catalog/services/mcp-host.yaml, services/control-plane/src/eai/domains/mcp/gateway.py, services/control-plane/src/eai/domains/mcp/hosted.pyADR-0165
High availability declared per service in the Manager catalog, HA install checks, mandatory ClamAV and YARA-X file scanning before any ingestionnavin-manager/catalog/schema/service.schema.json, navin-manager/server/src/navin_manager/services/ha_checks.py, navin-manager/catalog/services/clamav.yaml, navin-manager/catalog/services/yara-x.yaml, services/control-plane/src/eai/domains/file_securityADR-0166
MCP Runtime: MCP instances isolated per tenant, project and user on the ToolHive Kubernetes Operator, created on demand and destroyed after useservices/control-plane/src/eai/domains/mcp_runtime, deploy/toolhive, deploy/policies/kyverno/mcp-runtime.yaml, deploy/cilium/mcp-runtime.yamlADR-0167
No online MCP server, company MCP catalogue in SeaweedFS, destroyed on failure and woken on call, traceability by default of the MCP Runtimeservices/control-plane/src/eai/domains/mcp_runtime/service.py, services/control-plane/src/eai/domains/mcp_runtime/controller.py, services/control-plane/src/eai/domains/mcp_runtime/templates.py, services/control-plane/src/eai/domains/mcp/gateway.py, sql/postgres/V201__mcp_runtime_lifecycle.sqlADR-0170
Managed local inference engines vLLM and Ollama behind LiteLLMnavin-manager/catalog/services/vllm.yaml, navin-manager/catalog/services/ollama.yamlADR-0168
Perses and Infisical OSS removed: dashboards in the Navin Manager and the portal, secrets in OpenBao or the client vault, packs without dashboardsnavin-manager/server/src/navin_manager/services/dashboard.py, services/control-plane/src/eai/domains/platform_manager/config_center.py, sdks/python/src/enterprise_ai/packsADR-0169
Hardened installation for banking production: isolated network, Quadlet, security profiles, Trusted Hub, rollbacknavin-manager/server/src/navin_manager/catalog/render.py, navin-manager/catalog/templates/_common/ADR-0171
Data labeling (Label Studio) and model fine-tuning (LLaMA-Factory) in the catalog, exported model served by vLLM behind LiteLLMnavin-manager/catalog/services/label-studio.yaml, navin-manager/catalog/services/llama-factory.yamlADR-0172
Bounded span summary, SLO objectives in the database (eai.telemetry_spans, eai.service_slos)services/control-plane/src/eai/domains/observabilityADR-0157
SLSA provenance, G6/G9 gates, pack contents (eai.marketplace_assets), kill switch, supervision, offline importservices/control-plane/src/eai/domains/marketplaceADR-0158
Single change management pipeline (eai.change_requests)services/control-plane/src/eai/domains/marketplace/changes.pyADR-0159
Tenant hierarchy (organizations, business units), stamped common fields, separate runtime loginservices/control-plane/src/eai/domains/tenancy, services/control-plane/src/eai/db.pyADR-0156
Audit index partitioned by event_time, chain keys eai.audit_event_keys, view eai.audit_indexsql/postgres/V186__audit_events_partitioned.sql, sql/postgres/V187__audit_index_view.sqlADR-0154
Worker planes (audit, SOC, telemetry), operation_id of long operations, compensation of external actionsservices/control-plane/src/eai/worker.py, services/control-plane/src/eai/domains/operationsADR-0155

The real state of each requirement (HOST, CLUS, HAVA, BACK, DR, INFUI, INFSDK) is in ../../implementation/en/STATUS.md.

Decisions​

See ../ADRs/ and ../../implementation/en/DECISIONS.md.