Skip to content

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.

ToolPurposeRequired arguments
create_workloadCreate a workload; return UID and Pending phasename, objective
get_workload_statusRead phase and workflow stepsname
list_workloadsList workloads; all namespaces when omittedNone
get_workload_logsTail runtime pod logsname
get_workload_costRead tokens and USD for today and month to datename
delete_workloadDelete idempotently; return deleted=false when absentname

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:

bash
export CLAWDLINUX_MCP_TOKEN=$(uuidgen)
agentctl mcp serve --addr :8765 --default-namespace agentic-system

HTTP 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.

Apache-2.0 licensed open-source core.