商业产业 Hacker News Agent 2026-10-07T17:48 正文 ok 374 words

Docker Agent:用声明式 YAML 配置构建、运行和分享 AI Agent

英文标题:🔶 Docker Agent

Docker 发布了 docker-agent,一个可通过 `docker agent` 命令运行的 Docker CLI 插件,用于以声明式 YAML 配置创建和编排 AI Agent。该工具支持多 Agent 自动委派、内置工具与 MCP 服务器接入,并兼容 OpenAI、Anthropic、Gemini、AWS Bedrock、Mistral、xAI 及 Docker Model Runner 等模型提供方。开发者可将 Agent 打包并推送至任意 OCI 注册表,再在其他环境中拉取运行。Docker Desktop 4.63 及以上版本已预装该插件,项目也提供 Homebrew、二进制发布包和完整文档。
打开原文相关 3 · 机会 1
media4.4 KB media554.7 KB media75.8 KB

中文

使用声明式 YAML 配置、丰富的工具生态和多 Agent 编排,构建、运行并分享 AI Agent。

运行中的 docker agent

docker-agent 让你能够创建并运行可协作解决复杂问题的智能 AI Agent——无需编写代码。

docker-agent 是一个 docker CLI 插件,可通过 docker agent 运行。

使用 YAML 定义 Agent,为其赋予工具,然后让它们开始工作。

agents:
  root:
    model: openai/gpt-5-mini
    description: A helpful AI assistant
    instruction: |
      You are a knowledgeable assistant that helps users with various tasks.
      Be helpful, accurate, and concise in your responses.
    toolsets:
      - type: mcp
        ref: docker:duckduckgo

docker agent run agent.yaml
  • 多 Agent 架构 —— 创建由专业 Agent 组成的团队,自动委派任务
  • 丰富的工具生态 —— 内置工具,以及任意 MCP 服务器(本地、远程或基于 Docker)
  • 不绑定 AI 提供商 —— 支持 OpenAI、Anthropic、Gemini、AWS Bedrock、Mistral、xAI、Docker Model Runner 等
  • YAML 配置 —— 声明式、可进行版本管理、可分享
  • 高级推理能力 —— 内置 think、todo 和 memory 工具
  • RAG —— 可插拔检索能力,支持 BM25、嵌入、混合搜索和重排序
  • 打包与分享 —— 将 Agent 推送至任意 OCI 注册表,并可在任何地方拉取和运行

Docker Desktop(4.63+)—— 已预装 docker-agent CLI 插件。只需运行 docker agent。

Homebrew —— brew install docker-agent。可直接运行 docker-agent,或者将二进制文件创建符号链接至 ~/.docker/cli-plugins/docker-agent,然后运行 docker agent。

二进制发布包 —— 从 GitHub Releases 下载。将 docker-agent 二进制文件创建符号链接至 ~/.docker/cli-plugins/docker-agent,即可使用 docker agent;也可直接使用 docker-agent。

至少设置一个 API 密钥(或使用 Docker Model Runner 运行本地模型):

export OPENAI_API_KEY=sk-...        # or ANTHROPIC_API_KEY, GOOGLE_API_KEY, etc.

有关两种路径(云端 API 密钥或本地模型)的完整操作说明,请参阅设置模型。

# Run the default agent
docker agent run

# Run from an OCI registry
docker agent run myorg/agent:tag

# Generate a new agent interactively
docker agent new

# Run your own config
docker agent run agent.yaml

更多示例位于 examples/ 目录。

📖 完整文档

阅读贡献指南即可开始参与。我们使用 docker-agent 来构建 docker-agent:

docker agent run ./golang_developer.yaml

我们收集匿名使用数据以改进该工具。详见遥测数据。

社区

Docker Community Slack · #docker-agent 频道

English / 原文

Build, run, and share AI agents with a declarative YAML config, rich tool ecosystem, and multi-agent orchestration.

docker agent in action

docker-agent lets you create and run intelligent AI agents that collaborate to solve complex problems — no code required.

docker-agent is a docker CLI plugin and can be run with docker agent.

Define agents in YAML, give them tools, and let them work.

agents:
  root:
    model: openai/gpt-5-mini
    description: A helpful AI assistant
    instruction: |
      You are a knowledgeable assistant that helps users with various tasks.
      Be helpful, accurate, and concise in your responses.
    toolsets:
      - type: mcp
        ref: docker:duckduckgo


docker agent run agent.yaml
  • Multi-agent architecture — Create teams of specialized agents that delegate tasks automatically
  • Rich tool ecosystem — Built-in tools + any MCP server (local, remote, or Docker-based)
  • AI provider agnostic — OpenAI, Anthropic, Gemini, AWS Bedrock, Mistral, xAI, Docker Model Runner, and more
  • YAML configuration — Declarative, versionable, shareable
  • Advanced reasoning — Built-in think, todo, and memory tools
  • RAG — Pluggable retrieval with BM25, embeddings, hybrid search, and reranking
  • Package & share — Push agents to any OCI registry, pull and run them anywhere

Docker Desktop (4.63+) — docker-agent CLI plugin is pre-installed. Just run docker agent.

Homebrew — brew install docker-agent. Run docker-agent directly or symlink the binary to ~/.docker/cli-plugins/docker-agent and run docker agent.

Binary releases — Download from GitHub Releases. Symlink the docker-agent binary to ~/.docker/cli-plugins/docker-agent to be able to use docker agent, or use docker-agent directly.

Set at least one API key (or use Docker Model Runner for local models):

export OPENAI_API_KEY=sk-...        # or ANTHROPIC_API_KEY, GOOGLE_API_KEY, etc.

See Set Up a Model for the full walkthrough of both paths (cloud API key or local model).

# Run the default agent
docker agent run

# Run from an OCI registry
docker agent run myorg/agent:tag

# Generate a new agent interactively
docker agent new

# Run your own config
docker agent run agent.yaml

More examples in the examples/ directory.

📖 Full documentation

Read the Contributing guide to get started. We use docker-agent to build docker-agent:

docker agent run ./golang_developer.yaml

We collect anonymous usage data to improve the tool. See Telemetry.

Community

Docker Community Slack · #docker-agent channel