Clawdlinux Operator API And MCP
Kubernetes Resources
Generated CRDs define the resource schemas:
AgentWorkload groups objectives, runtime selection, resource limits, timeouts, providers, model mappings, action policy, and collaboration settings. Registered runtime types are argo, pod, and kagent. opaPolicy selects the legacy Go evaluator; the direct action path does not execute Rego.
Inspect phase, conditions, proposedActions, executedActions, argoWorkflow, argoPhase, workflowArtifacts, modelRoutingOperationID, and agentStatuses in status. The historical argoWorkflow field also stores pod and kagent references. Its runtime field identifies the adapter.
Tenant reconciliation creates namespaces, provider Secret copies, RBAC, and CPU, memory, and pod-count ResourceQuotas. Tenant fields maxConcurrent, maxMonthlyTokens, slaTarget, and networkPolicy lack complete enforcement in the current reconciler. AgentCard records capability metadata and endpoints; it does not bind an external employee identity to a workload request.
External Orchestration With MCP
agentctl mcp serve is intended for external orchestration of AgentWorkloads. It uses Kubernetes credentials resolved from kubeconfig or an in-cluster ServiceAccount.
| Tool | Purpose | Required arguments |
|---|---|---|
create_workload | Create a workload; return UID and Pending phase | name, objective |
get_workload_status | Read phase and workflow steps | name |
list_workloads | List workloads; all namespaces when omitted | None |
get_workload_logs | Tail runtime pod logs | name |
get_workload_cost | Read tokens and USD for today and month to date | name |
delete_workload | Delete idempotently; return deleted=false when absent | name |
Cost results depend on reporting configuration. The default reporter records nothing; memory reporting is volatile.
Transport And Authentication
Set a bearer token before starting the HTTP adapter:
export CLAWDLINUX_MCP_TOKEN=$(uuidgen)
agentctl mcp serve --addr :8765 --default-namespace agentic-systemHTTP exposes GET /tools, POST /call_tool, and GET /healthz. GET /tools returns tool descriptors and JSON input schemas. The documented HTTP envelope is not MCP JSON-RPC 2.0 framing.
--transport stdio uses newline-delimited JSON requests and responses. Its list_tools pseudo-tool returns schemas; it is not an additional workload operation.
An empty CLAWDLINUX_MCP_TOKEN and empty --auth-token disable authentication. Restrict Kubernetes permissions; never grant this adapter cluster-admin. Individual actor identity propagation, full RBAC integration, and direct approval continuation are not connected end to end. Only HTTP and stdio transports are documented; gRPC and WebSocket streaming are not supported here.
See security and the agentctl MCP source guide.