AgentSkillsCN

agentic-ecosystem-docker

当用户希望以 Docker Compose 将多服务的代理生态系统(UI + 代理管理服务器,可选启动器/数据导入器)容器化时,应使用此技能,同时确保仅保留本地主机的安全性、正确的容器内网络配置、集中式的日志卷挂载,以及可用的 Codex/Claude CLI。

SKILL.md
--- frontmatter
name: agentic-ecosystem-docker
description: This skill should be used when containerizing a multi-service agentic ecosystem (UI + Agent Management Server, optionally launchers/ingestors) with Docker Compose while preserving localhost-only security, correct in-container networking, centralized log volume mounts, and working Codex/Claude CLIs.

Agentic Ecosystem Docker

""" [Created by Codex: 019b78e6-c6cb-7f72-ab5a-c16c536b8e70] [Ported to Claude Code by Opus: 5f029f5d-392f-4e16-bf28-f45f9be1e3cb] """

Purpose

Provide a repeatable workflow and checklists for Dockerizing the agentic ecosystem so docker compose up --build runs the UI and AMS with working /api/agent-sdk/*, Live Logs (SSE), and agent start/stop.

When To Use

  • Need to run Agent HQ (or similar Vite UI) + AMS together via Docker Compose
  • Need localhost-only exposure (bind 127.0.0.1:PORT:PORT)
  • Seeing 403 forbidden from /api/agent-sdk/* or SSE endpoints in Docker (loopback checks)
  • Need to mount centralized logs and provider CLIs into containers

Non-Negotiable Contract

  • Publish the UI port only on loopback (example: 127.0.0.1:8037:8037)
  • Do not publish AMS port (use expose, not ports)
  • Bind Vite to 0.0.0.0 inside container
  • Use Docker hostname for AMS from the UI (http://ams:8041)
  • Run smoke tests after each phase before continuing

Workflow

  1. Load references/agentic_ecosystem_docker_playbook.md and follow phases in order.
  2. If a Linux Codex binary is required inside a container, run scripts/build_codex_linux_binary.py and mount the result into AMS.
  3. Validate with curl-based smoke tests (HTML, /api/agent-sdk/list, SSE endpoints, start/stop).

Bundled Resources

  • Step-by-step playbook: references/agentic_ecosystem_docker_playbook.md
  • Linux Codex builder helper: scripts/build_codex_linux_binary.py