KAOS – Kubernetes 代理协调系统
KAOS – The Kubernetes Agent Orchestration System

原始链接: https://github.com/axsaucedo/kaos

## KAOS:Kubernetes原生AI代理编排 KAOS是一个在Kubernetes上部署和管理AI代理的框架。它简化了代理工作流的构建,具有**代理图**用于分布式网络、通过标准**模型上下文协议 (MCP)** 实现**工具访问**,以及支持**多代理协调**,包括具有自动委托的层级系统等功能。 KAOS代理可以作为Kubernetes资源轻松部署,使用专用的**CLI**和**可视化仪表盘**进行监控和调试。代理暴露一个**兼容OpenAI的`/v1/chat/completions`端点**,方便无缝集成。 安装涉及安装CLI (`pip install kaos-cli`)并通过Helm部署KAOS Operator。配置通过YAML文件完成,定义代理、工具(MCP服务器)和模型API(如Ollama)。 KAOS提供了单代理、多代理系统和层级结构的示例,以及全面的测试流程。它采用Apache 2.0许可证发布。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 KAOS – Kubernetes 代理编排系统 (github.com/axsaucedo) 17 分,axsaucedo 发表于 7 小时前 | 隐藏 | 过去 | 收藏 | 4 条评论 _pdp_ 发表于 5 小时前 | 下一个 [–] 说实话,这个项目解决的是容易的部分,即在哪里运行代理的计算问题。代理真正发挥作用的部分,对于大多数组织来说,价值的 99% 尚未解决。回复 dpflan 发表于 4 小时前 | 父评论 | 下一个 [–] 您能详细阐述您的想法吗?我很想知道是否有帮助解决此问题的项目。回复 swaits 发表于 3 小时前 | 上一个 | 下一个 [–] Kubernetes 在“使与 Kubernetes 合作成为可能”的工具激增方面处于领先地位。回复 hiprob 发表于 5 小时前 | 上一个 [–] 不要与 KaOS 混淆,KaOS 是一个基于 Arch 的发行版,专注于仅 KDE Plasma 桌面。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

Deploy, manage, and orchestrate AI agents on Kubernetes


KAOS is a Kubernetes-native framework for deploying and orchestrating AI agents with tool access, multi-agent coordination, and seamless LLM integration.

Feature Description
Agentic Graphs Deploy distributed agents networks as Kubernetes resources
MCP Primitives Tool integration via the Model Context Protocol standard
Multi-Agent Support Hierarchical agent systems with automatic delegation
OpenAI-Compatible All agents expose /v1/chat/completions endpoints
KAOS CLI Install and manage agents and environments with kaos CLI
Visual Dashboard UI to monitor agents, test chat, debug memory and tools
  • Kubernetes cluster
  • kubectl configured
  • helm installed
# Install the CLI
pip install kaos-cli

# Install KAOS in your cluster
kaos install

# Open the UI
kaos ui

The UI opens at axsaucedo.github.io/kaos-ui. For CLI/UI documentation, see the CLI Guide.

# Add the Helm repository
helm repo add kaos https://axsaucedo.github.io/kaos/charts
helm repo update

# Install the operator
helm install kaos kaos/kaos-operator -n kaos-system --create-namespace
# simple-agent.yaml
apiVersion: kaos.tools/v1alpha1
kind: ModelAPI
metadata:
  name: ollama
spec:
  mode: Hosted
  hostedConfig:
    model: "smollm2:135m"

---
apiVersion: kaos.tools/v1alpha1
kind: MCPServer
metadata:
  name: echo-tools
spec:
  type: python-runtime
  config:
    tools:
      fromString: |
        def echo(message: str) -> str:
            """Echo back the message."""
            return f"Echo: {message}"

---
apiVersion: kaos.tools/v1alpha1
kind: Agent
metadata:
  name: assistant
spec:
  modelAPI: ollama
  mcpServers:
    - echo-tools
  config:
    description: "AI assistant with echo tools"
    instructions: "You are a helpful assistant."
    env:
      - name: MODEL_NAME
        value: "ollama/smollm2:135m"
kubectl apply -f simple-agent.yaml

# Wait for pods to be ready
kubectl wait --for=condition=ready pod -l agent=assistant --timeout=120s

# Port-forward and test
kubectl port-forward svc/agent-assistant 8000:8000
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "assistant", "messages": [{"role": "user", "content": "Hello!"}]}'

KAOS supports hierarchical multi-agent systems where a coordinator delegates tasks to specialist agents:

apiVersion: kaos.tools/v1alpha1
kind: Agent
metadata:
  name: coordinator
spec:
  modelAPI: ollama
  config:
    description: "Coordinator that delegates to specialists"
    instructions: "Delegate research to researcher, calculations to analyst."
  agentNetwork:
    access:
      - researcher
      - analyst

See operator/config/samples/ for complete multi-agent examples.

flowchart TB
    subgraph operator["KAOS Operator"]
        ac["Agent Controller"]
        mc["MCPServer Controller"]
        mac["ModelAPI Controller"]
    end
    
    subgraph resources["Managed Resources"]
        agent["Agent Pod<br/>Agent Runtime"]
        mcp["MCP Server Pod<br/>MCP Tools"]
        model["ModelAPI Pod<br/>Ollama/LiteLLM"]
    end
    
    ac --> agent
    mc --> mcp
    mac --> model
    agent --> mcp
    agent --> model
Loading
# Python tests
cd python && uv sync && uv run pytest tests/ -v

# Go tests  
cd operator && make test

# E2E tests (requires kind)
cd operator && make kind-create
cd operator && make kind-e2e-run-tests

See operator/config/samples/ for examples:

  1. Simple Agent - Single agent with echo MCP tool
  2. Multi-Agent - Coordinator with worker agents
  3. Hierarchical - Multi-level agent hierarchy
  4. Custom Tools - Dynamic tool creation with tools.fromString

Apache 2.0

联系我们 contact @ memedata.com