D-08 Plugin Runtime
Brick D: Tools, skills, plugins, MCP, connectors. French version: D-08-plugin-runtime
1. Role and responsibilities
Installs and runs plugins in Kubernetes with sandbox isolation.
- Deploy the plugin (Deployment + runtimeClass)
- Register exposed tools in D-01
- Uninstall cleanly
2. Position in the architecture and interactions
- Callers: tenant_admin via the portal.
- Execution path: Asynchronous (install), status by polling.
- Every interaction goes through the Control Plane API v1 (
/v1) behind the API Gateway (D-14).
3. Open source component and developed part
- Open source: Kubernetes, gVisor / Kata
- Developed: Install operator.
- External integration through an adapter
eai/integrations/<system>.pywith an in-process fallback when the URL is not configured.
4. Data model
Tables (schema eai, tenant_id RLS):
eai.plugins(install_status)
Common columns: id uuid, tenant_id uuid NOT NULL, created_at, updated_at; RLS policy current_setting('app.tenant_id', true)::uuid.
5. Contract
- Applied contract: plugin-manifest
- JSON Schema:
contracts/v1/plugin-manifest.schema.json - Key fields:
spec.sandbox, spec.capabilities - Validation:
POST /v1/contracts/{name}/validate; manifest apply:POST /v1/manifests/apply.
6. API endpoints
POST /v1/plugins/{name}/installPOST /v1/plugins/{name}/uninstallGET /v1/plugins/{name}/status
Request POST /v1/plugins/{name}/install:
{
"version": "0.4.0",
"environment": "prod"
}
Response:
{
"name": "sap-tools",
"install_status": "installing"
}
7. SDK examples
Python:
from enterprise_ai import EnterpriseAI
client = EnterpriseAI(base_url="<control-plane-url>", api_key="eai_xxx_secret")
client.plugins.install("sap-tools")
client.plugins.status("sap-tools")
TypeScript:
import { EnterpriseAI } from "@enterprise-ai/sdk";
const client = new EnterpriseAI({ baseUrl: "<control-plane-url>", apiKey: process.env.EAI_API_KEY });
await client.plugins.install("sap-tools", { version: "0.4.0" });
Java:
EnterpriseAIClient client = EnterpriseAIClient.builder()
.baseUrl("<control-plane-url>")
.apiKey(System.getenv("EAI_API_KEY"))
.build();
client.plugins().install("sap-tools");
Go:
c, _ := eai.NewClient(eai.WithBaseURL("<control-plane-url>"), eai.WithAPIKey(os.Getenv("EAI_API_KEY")))
c.Plugins.Install(ctx, "sap-tools", "0.4.0")
8. Configuration
- Environment variables:
EAI_DATABASE_URL - Helm values keys:
sandbox.enabled,sandbox.runtimeClasses
9. Security controls
- No network access to the Control Plane except the API
- Approval for a prod install
- Every request carries the tenant resolved from the credential; PostgreSQL RLS
- Every mutation and policy decision writes a hash-chained audit event
10. Observability
- Prometheus metrics:
eai_plugin_installs_total{result},eai_plugin_pod_restarts - Traces: OpenTelemetry spans with GenAI semantic conventions (
gen_ai.operation.name,gen_ai.agent.id,gen_ai.tool.name), attributeseai.tenant_id,eai.run_id,traceparentpropagation. - Audit actions:
plugin.install,plugin.uninstall
11. FinOps units
- Plugin pod CPU / memory.
- Emitted as Usage Event (
POST /v1/finops/usage) with tenant, project, agent and run.
12. Failure modes and resilience
- Install idempotent by (name, version)
- Readiness failure -> rollback
- Normalized errors (error envelope, message_i18n en/fr)
13. Standalone adoption (client of a client)
- enterprise_ai.plugins + Kubernetes.
- SDK:
enterprise_ai.tools / mcp / skills / plugins / connectors / channels - Minimal deployment: Helm chart with
controlPlane.enabled=trueand PostgreSQL; disabled external components use their in-process fallback.
14. Acceptance tests
- Install then status ready
- Uninstall removes the tools
- Cross-tenant access refused
- Error returned in fr with Accept-Language: fr