Skip to main content
Glama

agentctl

K8s 原生的代理/模型工作负载 operator,支持 SAM mesh 注册和 MCP 运维平面。

用声明式 K8s 资源取代进程启动型编排器(vllm-orchestrator)。 每个操作都作为 MCP 工具暴露,用于 LangGraph/LangChain 工作流编排。

架构

LangGraph agent ──MCP──▶ agentctl ops plane (:8091)
                              │
                    ┌─────────┼─────────┐
                    ▼         ▼         ▼
              workload_*   fleet_*   sam_*
              tools        tools     tools
                    │         │         │
                    ▼         ▼         ▼
              K8s API    K8s API   SAM node
              (CRDs)    (pods)    (discovery)

Related MCP server: Hatchet MCP

安装

pip install agentctl
# or
uv pip install agentctl

安装(集群)

kubectl apply -f https://github.com/moreWax/agentctl/releases/latest/download/install.yaml

这会将 CRD、operator 和 MCP 运维平面安装到 agentctl-system 中。运维平面可在集群内通过 http://agentctl-mcp.agentctl-system.svc.cluster.local:8091/mcp 访问(无状态 Streamable HTTP)。

用法

部署示例工作负载

kubectl apply -f examples/qwen3.8-27b.yaml        # Qwen3.8-27B, TP2 on 2 GPUs
kubectl apply -f examples/qwen3.8-27b-fp8.yaml    # FP8 variant, single GPU
kubectl apply -f examples/litellm-gateway.yaml    # LiteLLM proxy gateway

从源码(开发)

uv venv && uv pip install -e ".[dev]"
kubectl apply -f crd/agentctl-crd.yaml
agentctl serve          # operator (kopf controllers)
agentctl mcp --port 8091  # MCP ops-plane server (stateless Streamable HTTP)

部署模型工作负载

kubectl apply -f examples/qwen3.8-27b.yaml        # Qwen3.8-27B, TP2 on 2 GPUs
kubectl apply -f examples/qwen3.8-27b-fp8.yaml    # FP8 variant, single GPU
kubectl apply -f examples/litellm-gateway.yaml     # LiteLLM proxy gateway

LiteLLM 网关将 OpenAI 兼容的请求路由到 vLLM 后端。将你的代理指向 http://litellm-gateway:4000/v1,并使用类似 qwen3.8-27bqwen3.8-27b-fp8 的模型名称。

MCP 工具(用于 LangGraph / 代理组合)

所有 20 个工具都是无状态的,返回结构化 JSON,并将破坏性操作置于批准标志之后。

集群查询

Tool

Description

fleet_status

聚合视图:按阶段的工作负载、GPU 总数

fleet_gpus

每节点 GPU 容量 / 已分配 / 空闲 + 消费者

fleet_pods

每 Pod 详情:节点、启动阶段、GPU、重启次数

footprint_check

预演:哪些节点可容纳 N 个 GPU — 启动前调用

health_check

每个服务的端点就绪状态

sam_services

发现 SAM mesh 服务

工作负载生命周期

Tool

Description

workload_list

列出工作负载及其阶段、GPU、固定状态

workload_status

完整详情,包括每个 Pod 的启动阶段

workload_logs

每个 Pod 的最近容器日志

workload_scale

缩放副本(0 = 暂停;除非 force=true,否则拒绝缩放已固定的工作负载)

workload_delete

删除工作负载 — 需要 approved=true

deploy_model

创建模型工作负载(幂等)

undeploy_model

移除模型工作负载

kill_pod

强制删除挂起的 Pod — 需要 approved=true;Deployment 会重新创建它

model_pin / model_unpin

固定可防止缩放(保持模型驻留)

model_sleep / model_wake

挂起/唤醒。FMA 工作负载(sleepWake.enabled):通过 llm-d fast-model-actuation 实现秒级挂起,GPU 释放给其他模型 — 参见 docs/fma.md。原生工作负载:完全停止 / 冷启动

启动编排

Tool

Description

boot_model

部署 + 可选的服务器端等待(wait_seconds);返回 outcome: ready/failed/timeout

boot_status

轮询启动进度:Pod 阶段 + vLLM 日志标记(LoadingWeightsSizingKVCacheCapturingGraphsServing)+ 百分比

代理启动等待模式(LangGraph 循环):

boot_model(model_id="qwen38-27b", image="vllm/vllm-openai:v0.18.0", gpu_count=2)
while True:
    s = boot_status(model_id="qwen38-27b")
    if s["ready"]:  break          # proceed to inference
    if s["failed"]: ...            # inspect s["pods"], kill_pod + retry
    time.sleep(10)                 # poll again

开发

uv venv && uv pip install -e ".[dev]"
pytest tests/ -q

许可证

MIT

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables management of Mistral AI agents through MCP tools including creating, listing, searching, viewing details, and deleting agents. Integrates with Mistral API to provide agent management capabilities through natural language interactions.
    1
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables running durable, traceable AI agents via LangGraph through a universal MCP interface, integrating with Hatchet for orchestration, logging, and retries. Provides tools for knowledge management (ingestion, RAG) and Kubernetes operations (diagnosis, auto-fix).
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered Kubernetes management using natural language, supporting kubectl, Helm, diagnostics, and port forwarding via MCP protocol.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/moreWax/agentctl'

If you have feedback or need assistance with the MCP directory API, please join our Discord server