diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f340d66b..b7055b8a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,8 +2,7 @@ pkg/compose/* @docker/compose-maintainers pkg/model/* @docker/ai-models-infra pkg/buildx/* @docker/build -pkg/cagent/* @docker/ai-agent-team +pkg/agent/* @docker/ai-agent-team pkg/containerd/* @docker/engine pkg/docker-cli/* @docker/engine pkg/docker-engine/* @docker/engine - diff --git a/.github/labeler.yml b/.github/labeler.yml index 6e7aa80a..16da7df9 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -17,9 +17,9 @@ area/pkg/buildx: - changed-files: - any-glob-to-any-file: 'pkg/buildx/**' -area/pkg/cagent: +area/pkg/agent: - changed-files: - - any-glob-to-any-file: 'pkg/cagent/**' + - any-glob-to-any-file: 'pkg/agent/**' area/pkg/compose: - changed-files: @@ -44,4 +44,3 @@ area/pkg/docker-engine: area/pkg/model: - changed-files: - any-glob-to-any-file: 'pkg/model/**' - diff --git a/.github/workflows/build-cagent.yml b/.github/workflows/build-agent.yml similarity index 66% rename from .github/workflows/build-cagent.yml rename to .github/workflows/build-agent.yml index f4a20e76..b85f36cd 100644 --- a/.github/workflows/build-cagent.yml +++ b/.github/workflows/build-agent.yml @@ -1,4 +1,4 @@ -name: build-cagent +name: build-agent concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -8,27 +8,27 @@ on: push: branches: - 'main' - - 'cagent/[0-9]+.[0-9]+' + - 'agent/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - - '.github/workflows/build-cagent.yml' + - '.github/workflows/build-agent.yml' - 'hack/scripts/**' - - 'pkg/cagent/**' + - 'pkg/agent/**' - 'docker-bake.hcl' pull_request: branches: - 'main' - - 'cagent/[0-9]+.[0-9]+' + - 'agent/[0-9]+.[0-9]+' paths: - '.github/workflows/.build.yml' - - '.github/workflows/build-cagent.yml' + - '.github/workflows/build-agent.yml' - 'hack/scripts/**' - - 'pkg/cagent/**' + - 'pkg/agent/**' - 'docker-bake.hcl' jobs: run: uses: ./.github/workflows/.build.yml with: - name: cagent + name: agent secrets: inherit diff --git a/.github/workflows/release-cagent.yml b/.github/workflows/release-agent.yml similarity index 97% rename from .github/workflows/release-cagent.yml rename to .github/workflows/release-agent.yml index 51540f9a..0aa6d23b 100644 --- a/.github/workflows/release-cagent.yml +++ b/.github/workflows/release-agent.yml @@ -1,4 +1,4 @@ -name: release-cagent +name: release-agent concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -42,7 +42,7 @@ jobs: release: uses: ./.github/workflows/.build.yml with: - name: cagent + name: agent release: ${{ inputs.release }} distros: ${{ inputs.distros }} envs: | diff --git a/docker-bake.hcl b/docker-bake.hcl index 648f6bf1..671557f9 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -52,7 +52,7 @@ variable "PKGS" { "docker-cli", "docker-engine", "model", - "cagent" + "agent" ] } @@ -574,12 +574,12 @@ target "_pkg-model" { } } -target "_pkg-cagent" { +target "_pkg-agent" { args = { - PKG_NAME = PKG_NAME != null && PKG_NAME != "" ? PKG_NAME : "cagent" - PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/cagent.git" + PKG_NAME = PKG_NAME != null && PKG_NAME != "" ? PKG_NAME : "docker-agent-plugin" + PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/docker-agent.git" PKG_REF = PKG_REF != null && PKG_REF != "" ? PKG_REF : "main" - GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.26.0" # https://github.com/docker/cagent/blob/main/Dockerfile + GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.26.0" # https://github.com/docker/docker-agent/blob/main/Dockerfile GO_IMAGE_VARIANT = GO_IMAGE_VARIANT != null && GO_IMAGE_VARIANT != "" ? GO_IMAGE_VARIANT : "bookworm" PKG_DEB_EPOCH = PKG_DEB_EPOCH != null && PKG_DEB_EPOCH != "" ? PKG_DEB_EPOCH : "" PKG_REMOTE_DOCKERFILE = "Dockerfile" @@ -605,8 +605,8 @@ function "pkgPlatforms" { docker-engine = ["linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64", "linux/ppc64le", "linux/s390x", "windows/amd64", "windows/arm64"] # https://github.com/docker/model-runner/blob/039f7a31c0365f9161c9b9b6bb3888161d16e388/cmd/cli/Makefile#L39-L43 model = ["darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "linux/arm/v7", "windows/amd64", "windows/arm64"] - # https://github.com/docker/cagent/blob/1a83a28df2b0769e8cb14d54ac409bdbb98e254c/Taskfile.yml#L66 - cagent = ["darwin/amd64", "linux/arm/v7", "darwin/arm64", "linux/amd64", "linux/arm64", "windows/amd64", "windows/arm64"] + # https://github.com/docker/docker-agent/blob/5b9feaabe743a5ad577f2247ed55d5dcb2678e8b/Taskfile.yml#L79 + agent = ["darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "windows/amd64", "windows/arm64"] }, pkg, []) } diff --git a/pkg/cagent/Dockerfile b/pkg/agent/Dockerfile similarity index 92% rename from pkg/cagent/Dockerfile rename to pkg/agent/Dockerfile index 9348579b..edafd3d1 100644 --- a/pkg/cagent/Dockerfile +++ b/pkg/agent/Dockerfile @@ -23,9 +23,9 @@ ARG DISTRO_ID="12" ARG DISTRO_SUITE="bookworm" ARG DISTRO_IMAGE="debian:bookworm" -ARG PKG_NAME="cagent" -ARG PKG_REPO="https://github.com/docker/cagent.git" -ARG PKG_REF="master" +ARG PKG_NAME="docker-agent-plugin" +ARG PKG_REPO="https://github.com/docker/docker-agent.git" +ARG PKG_REF="main" ARG GO_IMAGE="golang" ARG GO_VERSION="1.26.0" @@ -59,8 +59,8 @@ ARG PKG_REF RUN git fetch origin "${PKG_REF}" +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD FROM src-base AS src-tgz -RUN --mount=from=src,source=/src,target=/cagent \ - mkdir /out && tar -C / -zcf /out/cagent.tgz --exclude .git cagent +RUN --mount=from=src,source=/src,target=/agent \ + mkdir /out && tar -C / -zcf /out/agent.tgz --exclude .git agent # metadata FROM src-base AS metadata-builder @@ -115,9 +115,9 @@ RUN --mount=type=bind,source=scripts/pkg-deb-build.sh,target=/usr/local/bin/pkg- --mount=type=bind,from=scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ --mount=type=bind,from=scripts,source=gen-deb-changelog.sh,target=/usr/local/bin/gen-deb-changelog \ --mount=type=bind,from=scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,from=src,source=/src,target=/root/package/cagent,rw \ + --mount=type=bind,from=src,source=/src,target=/root/package/agent,rw \ --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ - OUTDIR=/out SRCDIR=./cagent pkg-deb-build + OUTDIR=/out SRCDIR=./agent pkg-deb-build # rpm FROM ${DISTRO_IMAGE} AS builder-rpm @@ -151,10 +151,10 @@ ARG SOURCE_DATE_EPOCH RUN --mount=type=bind,source=scripts/pkg-rpm-build.sh,target=/usr/local/bin/pkg-rpm-build \ --mount=type=bind,from=scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ --mount=type=bind,from=scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,from=src-tgz,source=/out/cagent.tgz,target=/root/rpmbuild/SOURCES/cagent.tgz \ - --mount=type=bind,from=src,source=/src,target=/usr/local/src/cagent \ + --mount=type=bind,from=src-tgz,source=/out/agent.tgz,target=/root/rpmbuild/SOURCES/agent.tgz \ + --mount=type=bind,from=src,source=/src,target=/usr/local/src/agent \ --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ - OUTDIR=/out SRCDIR=/usr/local/src/cagent pkg-rpm-build + OUTDIR=/out SRCDIR=/usr/local/src/agent pkg-rpm-build # static FROM --platform=$BUILDPLATFORM ${DISTRO_IMAGE} AS builder-static @@ -192,10 +192,10 @@ ARG TARGETPLATFORM RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/pkg-static-build \ --mount=type=bind,from=scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ --mount=type=bind,from=scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ - --mount=type=bind,from=src,source=/src,target=/usr/local/src/cagent \ + --mount=type=bind,from=src,source=/src,target=/usr/local/src/agent \ --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ --mount=type=bind,from=osxcross,src=/osxsdk,target=/xx-sdk \ - OUTDIR=/out BUILDDIR=/build SRCDIR=/usr/local/src/cagent pkg-static-build + OUTDIR=/out BUILDDIR=/build SRCDIR=/usr/local/src/agent pkg-static-build FROM builder-${DISTRO_TYPE} AS build-pkg ARG BUILDKIT_SBOM_SCAN_STAGE=true diff --git a/pkg/agent/deb/control b/pkg/agent/deb/control new file mode 100644 index 00000000..586de83a --- /dev/null +++ b/pkg/agent/deb/control @@ -0,0 +1,24 @@ +Source: docker-agent-plugin +Section: admin +Priority: optional +Maintainer: Docker +Homepage: https://www.docker.com +Vcs-Browser: https://github.com/docker/docker-agent +Vcs-Git: git://github.com/docker/docker-agent.git +Standards-Version: 3.9.6 +Build-Depends: bash, + gcc, + debhelper-compat (= 12) + +Package: docker-agent-plugin +Priority: optional +Architecture: linux-any +Replaces: cagent +Breaks: cagent +Enhances: docker-ce-cli +Description: Docker Agent plugin for the Docker CLI. + . + This plugin provides the 'docker agent' subcommand. + . + The binary can also be run standalone as 'docker-agent'. +Homepage: https://github.com/docker/docker-agent diff --git a/pkg/agent/deb/docs b/pkg/agent/deb/docs new file mode 100644 index 00000000..98c4dac9 --- /dev/null +++ b/pkg/agent/deb/docs @@ -0,0 +1 @@ +agent/README.md diff --git a/pkg/cagent/deb/rules b/pkg/agent/deb/rules similarity index 55% rename from pkg/cagent/deb/rules rename to pkg/agent/deb/rules index f4cbcd21..4b8f4f97 100644 --- a/pkg/cagent/deb/rules +++ b/pkg/agent/deb/rules @@ -7,12 +7,13 @@ override_dh_builddeb: override_dh_auto_build: set -x; \ - cd $(CURDIR)/cagent && \ - go build -trimpath -ldflags="-w -X 'github.com/docker/cagent/pkg/version.Version=$(VERSION)' -X 'github.com/docker/cagent/pkg/version.Commit=$(REVISION)'" -o /usr/bin/cagent . + install -d /usr/libexec/docker/cli-plugins && \ + cd $(CURDIR)/agent && \ + go build -trimpath -ldflags="-w -X 'github.com/docker/docker-agent/pkg/version.Version=$(VERSION)' -X 'github.com/docker/docker-agent/pkg/version.Commit=$(REVISION)'" -o /usr/libexec/docker/cli-plugins/docker-agent . override_dh_auto_test: - ver="$$(/usr/bin/cagent version | grep 'cagent version' | awk '{print $$3}')"; \ - test "$$ver" = "$(VERSION)" && echo "PASS: cagent version OK" || (echo "FAIL: cagent version ($$ver) did not match" && exit 1) + ver="$$(/usr/libexec/docker/cli-plugins/docker-agent docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \ + test "$$ver" = "$(VERSION)" && echo "PASS: docker-agent version OK" || (echo "FAIL: docker-agent version ($$ver) did not match" && exit 1) override_dh_strip: # Go has lots of problems with stripping, so just don't @@ -24,7 +25,7 @@ override_dh_dwz: @# https://packages.ubuntu.com/debhelper override_dh_auto_install: - install -D -p -m 0755 /usr/bin/cagent debian/cagent/usr/bin/cagent + install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-agent debian/docker-agent-plugin/usr/libexec/docker/cli-plugins/docker-agent override_dh_installinit: dh_installinit diff --git a/pkg/cagent/deb/source/format b/pkg/agent/deb/source/format similarity index 100% rename from pkg/cagent/deb/source/format rename to pkg/agent/deb/source/format diff --git a/pkg/agent/rpm/docker-agent-plugin.spec b/pkg/agent/rpm/docker-agent-plugin.spec new file mode 100644 index 00000000..e3e225d1 --- /dev/null +++ b/pkg/agent/rpm/docker-agent-plugin.spec @@ -0,0 +1,63 @@ +%global debug_package %{nil} + +Name: docker-agent-plugin +Version: %{_version} +Release: %{_release}%{?dist} +Epoch: 0 +Source0: agent.tgz +Summary: Docker Agent plugin for the Docker CLI +Group: Tools/Docker +License: Apache-2.0 +URL: https://github.com/docker/docker-agent +Vendor: Docker +Packager: Docker + +Enhances: docker-ce-cli +Provides: cagent = %{epoch}:%{version}-%{release} +Obsoletes: cagent < %{epoch}:%{version}-%{release} + +BuildRequires: bash +BuildRequires: gcc + +%description +Docker Agent plugin for the Docker CLI. + +This plugin provides the 'docker agent' subcommand. + +The binary can also be run standalone as 'docker-agent'. + +%prep +%setup -q -c -n src -a 0 + +%build +pushd ${RPM_BUILD_DIR}/src/agent + mkdir -p bin && \ + go build -trimpath -ldflags="-w -X github.com/docker/docker-agent/pkg/version.Version=%{_origversion} -X github.com/docker/docker-agent/pkg/version.Commit=%{_commit}" -o bin/docker-agent . +popd + +%check +ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-agent docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \ + test "$ver" = "%{_origversion}" && echo "PASS: docker-agent version OK" || (echo "FAIL: docker-agent version ($ver) did not match" && exit 1) + +%install +pushd ${RPM_BUILD_DIR}/src/agent + install -D -p -m 0755 bin/docker-agent ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-agent +popd +for f in LICENSE README.md; do + install -D -p -m 0644 "${RPM_BUILD_DIR}/src/agent/$f" "docker-agent-plugin-docs/$f" +done + +%files +%doc docker-agent-plugin-docs/* +%license docker-agent-plugin-docs/LICENSE +%{_libexecdir}/docker/cli-plugins/docker-agent + +%post + +%preun + +%postun + +%changelog +* Wed Mar 17 2026 Docker - %{version}-%{release} +- Rename the package to docker-agent-plugin and obsolete cagent diff --git a/pkg/cagent/scripts/pkg-deb-build.sh b/pkg/agent/scripts/pkg-deb-build.sh similarity index 97% rename from pkg/cagent/scripts/pkg-deb-build.sh rename to pkg/agent/scripts/pkg-deb-build.sh index c64a10a7..ad7c173c 100755 --- a/pkg/cagent/scripts/pkg-deb-build.sh +++ b/pkg/agent/scripts/pkg-deb-build.sh @@ -69,4 +69,4 @@ set -x chmod -x debian/control debian/docs VERSION=${GENVER_VERSION} REVISION=${GENVER_COMMIT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch) -cp /root/cagent* "${pkgoutput}"/ +cp /root/docker-agent-plugin* "${pkgoutput}"/ diff --git a/pkg/cagent/scripts/pkg-rpm-build.sh b/pkg/agent/scripts/pkg-rpm-build.sh similarity index 100% rename from pkg/cagent/scripts/pkg-rpm-build.sh rename to pkg/agent/scripts/pkg-rpm-build.sh diff --git a/pkg/cagent/scripts/pkg-static-build.sh b/pkg/agent/scripts/pkg-static-build.sh similarity index 87% rename from pkg/cagent/scripts/pkg-static-build.sh rename to pkg/agent/scripts/pkg-static-build.sh index 6394e75b..61e63bc0 100755 --- a/pkg/cagent/scripts/pkg-static-build.sh +++ b/pkg/agent/scripts/pkg-static-build.sh @@ -56,9 +56,9 @@ mkdir -p ${BUILDDIR}/${PKG_NAME} ( set -x pushd ${SRCDIR} - go build -trimpath -ldflags "-w -X 'github.com/docker/cagent/pkg/version.Version=${GENVER_VERSION}' -X 'github.com/docker/cagent/pkg/version.Commit=${GENVER_COMMIT}'" -o "${BUILDDIR}/${PKG_NAME}/cagent${binext}" . + go build -trimpath -ldflags "-w -X 'github.com/docker/docker-agent/pkg/version.Version=${GENVER_VERSION}' -X 'github.com/docker/docker-agent/pkg/version.Commit=${GENVER_COMMIT}'" -o "${BUILDDIR}/${PKG_NAME}/docker-agent${binext}" . popd - xx-verify "${BUILDDIR}/${PKG_NAME}/cagent${binext}" + xx-verify "${BUILDDIR}/${PKG_NAME}/docker-agent${binext}" ) pkgoutput="$OUTDIR/static/$(xx-info os)/$(xx-info arch)" diff --git a/pkg/cagent/verify.Dockerfile b/pkg/agent/verify.Dockerfile similarity index 95% rename from pkg/cagent/verify.Dockerfile rename to pkg/agent/verify.Dockerfile index 080a103f..b5d2595e 100644 --- a/pkg/cagent/verify.Dockerfile +++ b/pkg/agent/verify.Dockerfile @@ -53,7 +53,7 @@ RUN --mount=from=bin,target=/build < -Homepage: https://www.docker.com -Vcs-Browser: https://github.com/docker/cagent -Vcs-Git: git://github.com/docker/cagent.git -Standards-Version: 3.9.6 -Build-Depends: bash, - gcc, - debhelper-compat (= 12) - -Package: cagent -Priority: optional -Architecture: linux-any -Description: cagent is a powerful multi-agent AI runtime that enables you to - create, configure, and orchestrate specialized AI agents that work together to - solve complex problems. Each agent can be equipped with specific tools, - knowledge domains, and capabilities. - . - Key features: - * Multi-agent architecture with hierarchical task delegation - * Declarative YAML-based agent configuration - * MCP (Model Context Protocol) integration for extensible tooling - * Support for multiple AI providers (OpenAI, Anthropic, Google Gemini, Docker Model Runner) - * Built-in reasoning tools (think, todo, memory) for complex problem-solving - * Docker Hub integration for sharing and distributing agent configurations - * Event-driven streaming architecture for real-time responses - . - cagent makes it easy to build agent teams where specialized agents collaborate, - each bringing their own expertise and tools to handle specific aspects of user - requests. Perfect for developers building AI-powered workflows and automation. -Homepage: https://github.com/docker/cagent diff --git a/pkg/cagent/deb/docs b/pkg/cagent/deb/docs deleted file mode 100644 index a0efafee..00000000 --- a/pkg/cagent/deb/docs +++ /dev/null @@ -1 +0,0 @@ -cagent/README.md diff --git a/pkg/cagent/rpm/cagent.spec b/pkg/cagent/rpm/cagent.spec deleted file mode 100644 index f1c7ab98..00000000 --- a/pkg/cagent/rpm/cagent.spec +++ /dev/null @@ -1,69 +0,0 @@ -%global debug_package %{nil} - -Name: cagent -Version: %{_version} -Release: %{_release}%{?dist} -Epoch: 0 -Source0: cagent.tgz -Summary: TODO -Group: Tools/Docker -License: Apache-2.0 -URL: https://github.com/docker/cagent -Vendor: Docker -Packager: Docker - -BuildRequires: bash -BuildRequires: gcc - -%description -cagent is a powerful multi-agent AI runtime that enables you to create, -configure, and orchestrate specialized AI agents that work together to solve -complex problems. Each agent can be equipped with specific tools, knowledge -domains, and capabilities. - -Key features: - * Multi-agent architecture with hierarchical task delegation - * Declarative YAML-based agent configuration - * MCP (Model Context Protocol) integration for extensible tooling - * Support for multiple AI providers (OpenAI, Anthropic, Google Gemini, Docker Model Runner) - * Built-in reasoning tools (think, todo, memory) for complex problem-solving - * Docker Hub integration for sharing and distributing agent configurations - * Event-driven streaming architecture for real-time responses - -cagent makes it easy to build agent teams where specialized agents collaborate, -each bringing their own expertise and tools to handle specific aspects of user -requests. Perfect for developers building AI-powered workflows and automation. - -%prep -%setup -q -c -n src -a 0 - -%build -pushd ${RPM_BUILD_DIR}/src/cagent - mkdir bin && \ - go build -trimpath -ldflags="-w -X github.com/docker/cagent/pkg/version.Version=%{_origversion} -X github.com/docker/cagent/pkg/version.Commit=%{_commit}" -o bin/cagent . -popd - -%check -ver="$(${RPM_BUILD_ROOT}%{_bindir}/cagent version | grep 'cagent version' | awk '{print $3}')"; \ - test "$ver" = "%{_origversion}" && echo "PASS: cagent version OK" || (echo "FAIL: cagent version ($ver) did not match" && exit 1) - -%install -pushd ${RPM_BUILD_DIR}/src/cagent - install -D -p -m 0755 bin/cagent ${RPM_BUILD_ROOT}%{_bindir}/cagent -popd -for f in LICENSE README.md; do - install -D -p -m 0644 "${RPM_BUILD_DIR}/src/cagent/$f" "cagent-docs/$f" -done - -%files -%doc cagent-docs/* -%license cagent-docs/LICENSE -%{_bindir}/cagent - -%post - -%preun - -%postun - -%changelog