A02 - Control Plane API
| Group | Technology | Status | Service | Roadmap phase | Contracts |
|---|---|---|---|---|---|
| A - Governance, identity and security | FastAPI | to develop | control-plane | 1 | common |
Role and responsibilities
Single source of truth API for every registry, policy, quota and audit trail.
Position in the architecture and interactions
Every portal screen, CLI command and SDK call goes through it. It owns registries, policies, quotas and audit; runtimes and gateways read their configuration from it and report back usage and audit.
Data model
Tables (schema eai, every tenant table carries tenant_id uuid NOT NULL with an RLS policy on current_setting('app.tenant_id', true)::uuid): eai.schema_migrations, eai.audit_events.
API endpoints
GET /healthzGET /readyzGET /v1/metaGET /v1/catalog/bricksGET /v1/catalog/bricks/{id}GET /v1/roadmapGET /v1/contractsPOST /v1/contracts/{name}/validatePOST /v1/manifests/applyGET /v1/manifests/{kind}/{name}
POST /v1/contracts/{name}/validate HTTP/1.1
Host: <control-plane-host>
X-API-Key: eai_xxx_secret
Accept-Language: en
Content-Type: application/json
{"apiVersion": "enterprise-ai.io/v1", "kind": "Agent", "metadata": {"name": "invoice-assistant", "tenant": "acme", "version": "1.2.0", "owner": "team-finance@acme.example"}, "spec": {"description": "Checks supplier invoices against purchase orders.", "risk_level": "high", "runtime": {"engine": "langgraph"}, "models": [{"model_id": "claude-sonnet-eu", "role": "primary"}], "permissions": {"data_classification_max": "confidential"}, "autonomy": {"level": "supervised"}}}
{"contract": "agent-manifest", "valid": true, "errors": []}
Errors use the common envelope {"error": {"code", "message", "message_i18n", "details", "request_id"}}; lists are paginated with limit and cursor.
SDK usage
Python (enterprise_ai):
from enterprise_ai import EnterpriseAI
client = EnterpriseAI(base_url="<control-plane-url>", api_key="eai_xxx_secret")
items = client.system.meta()
TypeScript (@enterprise-ai/sdk):
import { EnterpriseAI } from "@enterprise-ai/sdk";
const eai = new EnterpriseAI({ baseUrl: "<control-plane-url>", apiKey: process.env.EAI_API_KEY });
const items = await eai.meta.get();
Java (enterprise-ai-java):
EnterpriseAIClient client = EnterpriseAIClient.builder()
.baseUrl("<control-plane-url>")
.apiKey(System.getenv("EAI_API_KEY"))
.build();
var items = client.meta().get();
Go (enterprise-ai-go):
client, _ := eai.NewClient(eai.WithBaseURL("<control-plane-url>"), eai.WithAPIKey(os.Getenv("EAI_API_KEY")))
items, err := client.Meta.Get(ctx)
Configuration
- Environment:
EAI_DATABASE_URL,EAI_OTEL_EXPORTER_OTLP_ENDPOINT. - Helm values:
control-plane.enabled,control-plane.replicas,control-plane.resources.
Security controls
- Authentication by OIDC JWT, tenant API key with scopes, or SPIFFE mTLS; tenant resolved from the credential, never from the body.
- Authorization through OpenFGA and OPA decisions; every mutation and decision writes a hash-chained
eai.audit_eventsrow. - Secrets never returned by the API; TLS everywhere; Cilium network policies restrict who can reach the service.
Observability
- Metrics:
eai_control_plane_api_requests_total,eai_control_plane_api_errors_total,eai_control_plane_api_latency_seconds(Prometheus). - Traces: OpenTelemetry spans
eai.meta.*with W3Ctraceparentpropagation, AI spans forwarded to Opik. - Audit actions:
manifest.apply,audit.export,policy.evaluate.
FinOps aspects
Operating cost is allocated per tenant and project through labels on Usage Events and Kubernetes resource requests; no direct per-call cost.
Failure modes and resilience
- Stateless replicas behind the API Gateway, PostgreSQL HA for state; readiness probe
GET /readyzremoves unhealthy pods. - External system unavailable: fail closed for security decisions, explicit error code, no silent bypass.
Standalone adoption (client of a client)
A client of a client can adopt this brick alone with the Python SDK sub-client client.system (TS eai.meta, Java client.system.meta(), Go client.Meta). Minimal deployment: Control Plane API + PostgreSQL + Keycloak (or API keys), the Control Plane loads every domain of services/control-plane/src/eai/domains; the optional chart components are switched off in deploy/helm/enterprise-ai/values.yaml (vllm.enabled, qdrant.enabled, nats.enabled, workers.enabled).
Acceptance tests
- A tenant cannot read or modify another tenant's resources (RLS test).
- Every mutation produces an audit event verifiable by
GET /v1/audit/verify. - Errors are returned in English and French according to
Accept-Language.