From ff3151afe5f7168ebf14140f777b13c55bdc6230 Mon Sep 17 00:00:00 2001 From: chinmaychahar Date: Mon, 12 Oct 2026 15:15:56 +0530 Subject: [PATCH 1/4] add runtime-image-codex conref Signed-off-by: chinmaychahar --- .github/workflows/update-ref-docs.yaml | 9 ++++++++- .../assets/kagent-docs/versions/runtime-image-codex.md | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 docs-site/assets/kagent-docs/versions/runtime-image-codex.md diff --git a/.github/workflows/update-ref-docs.yaml b/.github/workflows/update-ref-docs.yaml index 5a1ae932..b5125fcf 100644 --- a/.github/workflows/update-ref-docs.yaml +++ b/.github/workflows/update-ref-docs.yaml @@ -486,7 +486,8 @@ jobs: # conref basename : GHCR repository RUNTIME_IMAGES="runtime-image:kagent-dev/kagent/golang-adk - runtime-image-claude:kagent-dev/kagent/claude-harness" + runtime-image-claude:kagent-dev/kagent/claude-harness + runtime-image-codex:kagent-dev/kagent/codex-harness" UNRESOLVED="" while IFS= read -r line; do @@ -698,6 +699,11 @@ jobs: else echo " runtime-image-claude.md: SKIPPED, unresolved digest. Left at $(cat "$VERSIONS_DIR/runtime-image-claude.md")" fi + if [ -n "${RUNTIME_IMAGE_CODEX:-}" ]; then + write_conref "$VERSIONS_DIR/runtime-image-codex.md" "$RUNTIME_IMAGE_CODEX" + else + echo " runtime-image-codex.md: SKIPPED, unresolved digest. Left at $(cat "$VERSIONS_DIR/runtime-image-codex.md")" + fi fi # Three fragments of the PR body that exist only on a 1.x run. Built here @@ -717,6 +723,7 @@ jobs: echo "| \`kagent-tools\` | \`${KAGENT_TOOLS_VERSION}\` | \`helm/kagent/Chart-template.yaml\` |" echo "| \`runtime-image\` | \`${RUNTIME_IMAGE:-unresolved}\` | GHCR, at \`${KAGENT_TAG}\` |" echo "| \`runtime-image-claude\` | \`${RUNTIME_IMAGE_CLAUDE:-unresolved}\` | GHCR, at \`${KAGENT_TAG}\` |" + echo "| \`runtime-image-codex\` | \`${RUNTIME_IMAGE_CODEX:-unresolved}\` | GHCR, at \`${KAGENT_TAG}\` |" echo "ROWS_EOF" } >> $GITHUB_ENV else diff --git a/docs-site/assets/kagent-docs/versions/runtime-image-codex.md b/docs-site/assets/kagent-docs/versions/runtime-image-codex.md new file mode 100644 index 00000000..87cdfb2f --- /dev/null +++ b/docs-site/assets/kagent-docs/versions/runtime-image-codex.md @@ -0,0 +1 @@ +ghcr.io/kagent-dev/kagent/codex-harness@sha256:2c43e1bfce6d0acc59dfe6dac4732371106579398f29fda2b63ecf8b43ffff70 \ No newline at end of file From 12ca8839cda0f0c5343b1c32a0c07262fe9cad20 Mon Sep 17 00:00:00 2001 From: chinmaychahar Date: Mon, 12 Oct 2026 15:15:57 +0530 Subject: [PATCH 2/4] add codex and claude harness examples Signed-off-by: chinmaychahar --- .../kagent/1.x/agents/agent-harness.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/docs-site/content/kagent/1.x/agents/agent-harness.md b/docs-site/content/kagent/1.x/agents/agent-harness.md index 7a52fff1..ba024191 100644 --- a/docs-site/content/kagent/1.x/agents/agent-harness.md +++ b/docs-site/content/kagent/1.x/agents/agent-harness.md @@ -65,6 +65,107 @@ The `kagent` and `byo` runtimes compile through the same path, so they accept th The agent chat in the kagent UI allows file attachments only on the `kagent` runtime, so an agent on a `byo`, `codex`, or `claude` Harness has no attachment option in the chat. For the file types and size limits that the UI enforces, see [Attach files to a message]({{< link path="observability/launch-ui#attach-files-to-a-message" >}}). +### Codex and Claude examples + +A `codex` or `claude` Harness has the same shape as a `kagent` one. It differs only in the runtime block, the image, and the ModelConfigs that it accepts. For the providers and settings that each runtime accepts, see [Model provider support](#model-provider-support). + +{{< tabs >}} +{{% tab name="Codex" %}} +The ModelConfig reads its API key from the `kagent-openai` Secret that the [OpenAI]({{< link path="setup/model-providers/openai" >}}) guide creates. +```yaml +kubectl apply -f - <}} + substrate: + workerPoolRef: + name: kagent-default + snapshotPolicy: + location: s3://ate-snapshots/kagent/ +--- +apiVersion: api.kagent.dev/v1alpha3 +kind: Agent +metadata: + name: codex-agent + namespace: kagent +spec: + template: + modelConfig: + name: codex-model-config + systemPrompt: You are a concise, helpful coding assistant. + harnessRef: + name: codex-harness +EOF +``` +{{% /tab %}} +{{% tab name="Claude" %}} +The ModelConfig reads its API key from the `kagent-anthropic` Secret that the [Anthropic]({{< link path="setup/model-providers/anthropic" >}}) guide creates. +```yaml +kubectl apply -f - <}} + substrate: + workerPoolRef: + name: kagent-default + snapshotPolicy: + location: s3://ate-snapshots/kagent/ +--- +apiVersion: api.kagent.dev/v1alpha3 +kind: Agent +metadata: + name: claude-agent + namespace: kagent +spec: + template: + modelConfig: + name: claude-model-config + systemPrompt: You are a concise, helpful coding assistant. + harnessRef: + name: claude-harness +EOF +``` +{{% /tab %}} +{{< /tabs >}} + ### Runtime-specific settings `spec.kagent` is the only runtime block that takes settings of its own. The rest are empty. From f6afdc675c684c0e875ad1f0547e3c9d5767723f Mon Sep 17 00:00:00 2001 From: chinmaychahar Date: Mon, 12 Oct 2026 15:15:57 +0530 Subject: [PATCH 3/4] address review feedback Signed-off-by: chinmaychahar --- .github/workflows/update-ref-docs.yaml | 18 ++-- .../kagent/1.x/agents/agent-harness.md | 83 +++++++++++-------- 2 files changed, 59 insertions(+), 42 deletions(-) diff --git a/.github/workflows/update-ref-docs.yaml b/.github/workflows/update-ref-docs.yaml index b5125fcf..c17a5ced 100644 --- a/.github/workflows/update-ref-docs.yaml +++ b/.github/workflows/update-ref-docs.yaml @@ -432,11 +432,12 @@ jobs: # --------------------------------------------------------------------- # Runtime image conrefs. # - # versions/runtime-image.md and versions/runtime-image-claude.md hold a - # FULL digest-pinned reference (repository@sha256:...), not a version, - # because a Harness `workload.image` rejects a bare tag -- a revision has - # to be reproducible. Pages reuse the whole string, so the repository name - # is not hardcoded on any page either. + # versions/runtime-image.md, versions/runtime-image-claude.md and + # versions/runtime-image-codex.md hold a FULL digest-pinned reference + # (repository@sha256:...), not a version, because a Harness + # `workload.image` rejects a bare tag -- a revision has to be + # reproducible. Pages reuse the whole string, so the repository name is + # not hardcoded on any page either. # # A digest exists only once the image is pushed, so unlike every value # above this one is read from the REGISTRY rather than from a file in the @@ -444,13 +445,14 @@ jobs: # `git describe` on main: that conref names the release the docs describe, # so resolving against it is what keeps the image a reader pins consistent # with the chart version the install page tells them to install. It also - # means these two follow automatically whenever kagent.md is bumped by + # means these three follow automatically whenever kagent.md is bumped by # hand, which is the reason that one stays editorial. # # Image names are NOT the ones the kagent tree suggests. The kagent # runtime is golang-adk (values.yaml calls it `agentImage`); the claude - # runtime is claude-harness. The `claude-adk` and `codex-adk` strings in - # kagent are build stages, and nothing is published under those names. + # and codex runtimes are claude-harness and codex-harness. The + # `claude-adk` and `codex-adk` strings in kagent are build stages, and + # nothing is published under those names. # # 0.x needs no equivalent: it predates Harness and pins no runtime image. # --------------------------------------------------------------------- diff --git a/docs-site/content/kagent/1.x/agents/agent-harness.md b/docs-site/content/kagent/1.x/agents/agent-harness.md index ba024191..4ae914cc 100644 --- a/docs-site/content/kagent/1.x/agents/agent-harness.md +++ b/docs-site/content/kagent/1.x/agents/agent-harness.md @@ -65,13 +65,35 @@ The `kagent` and `byo` runtimes compile through the same path, so they accept th The agent chat in the kagent UI allows file attachments only on the `kagent` runtime, so an agent on a `byo`, `codex`, or `claude` Harness has no attachment option in the chat. For the file types and size limits that the UI enforces, see [Attach files to a message]({{< link path="observability/launch-ui#attach-files-to-a-message" >}}). +### Runtime-specific settings + +`spec.kagent` is the only runtime block that takes settings of its own. The rest are empty. + +```yaml +spec: + kagent: + memory: + modelConfigRef: + name: embedding-model-config + ttlDays: 30 +``` + +| Field | Description | +| ----- | ----------- | +| `memory.modelConfigRef.name` | The ModelConfig supplying the embedding model, in the Harness's namespace. Required when `memory` is set. | +| `memory.ttlDays` | How many days a stored memory entry stays valid. Minimum 1. When omitted, the server applies a default of 15 days. | + +Setting `memory` gives every agent on this Harness memory that persists across conversations. For how agents store and retrieve it, see [Agent memory]({{< link path="agents/agent-memory" >}}). + +Setting `compaction` summarizes older session events so an agent's prompt stays bounded as a conversation grows. For the two strategies and the rules the API server enforces, see [Context management]({{< link path="agents/context-management" >}}). + ### Codex and Claude examples -A `codex` or `claude` Harness has the same shape as a `kagent` one. It differs only in the runtime block, the image, and the ModelConfigs that it accepts. For the providers and settings that each runtime accepts, see [Model provider support](#model-provider-support). +A `codex` or `claude` Harness has the same shape as a `kagent` one, and differs in the runtime block, the image, and the ModelConfigs that it accepts. For the providers and settings that each runtime accepts, see [Model provider support](#model-provider-support), and for the limits each one places on an AgentTemplate, see [Tool and skill support](#tool-and-skill-support). {{< tabs >}} {{% tab name="Codex" %}} -The ModelConfig reads its API key from the `kagent-openai` Secret that the [OpenAI]({{< link path="setup/model-providers/openai" >}}) guide creates. +The ModelConfig reads its API key from the `kagent-openai` Secret that the [OpenAI]({{< link path="setup/model-providers/openai#create-the-modelconfig" >}}) guide creates. The key must be entitled to the model that you name. A key without access to it fails the turn with `Codex execution failed`. ```yaml kubectl apply -f - <}}) guide creates. +The ModelConfig reads its API key from the `kagent-anthropic` Secret that the [Anthropic]({{< link path="setup/model-providers/anthropic#create-the-modelconfig" >}}) guide creates. ```yaml kubectl apply -f - <}} -### Runtime-specific settings - -`spec.kagent` is the only runtime block that takes settings of its own. The rest are empty. - -```yaml -spec: - kagent: - memory: - modelConfigRef: - name: embedding-model-config - ttlDays: 30 -``` - -| Field | Description | -| ----- | ----------- | -| `memory.modelConfigRef.name` | The ModelConfig supplying the embedding model, in the Harness's namespace. Required when `memory` is set. | -| `memory.ttlDays` | How many days a stored memory entry stays valid. Minimum 1. When omitted, the server applies a default of 15 days. | - -Setting `memory` gives every agent on this Harness memory that persists across conversations. For how agents store and retrieve it, see [Agent memory]({{< link path="agents/agent-memory" >}}). - -Setting `compaction` summarizes older session events so an agent's prompt stays bounded as a conversation grows. For the two strategies and the rules the API server enforces, see [Context management]({{< link path="agents/context-management" >}}). - ## Model provider support The runtime that a Harness selects decides which ModelConfig an Agent that runs on it can use. This table covers every value that the ModelConfig `provider` field accepts, including the four that kagent 1.0 rejects on every runtime. From ea3bea62b329840a6bb92acef249e58876b4e94d Mon Sep 17 00:00:00 2001 From: chinmaychahar Date: Mon, 12 Oct 2026 15:15:57 +0530 Subject: [PATCH 4/4] bump codex conref to alpha9 Signed-off-by: chinmaychahar --- docs-site/assets/kagent-docs/versions/runtime-image-codex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/assets/kagent-docs/versions/runtime-image-codex.md b/docs-site/assets/kagent-docs/versions/runtime-image-codex.md index 87cdfb2f..17ec3b2a 100644 --- a/docs-site/assets/kagent-docs/versions/runtime-image-codex.md +++ b/docs-site/assets/kagent-docs/versions/runtime-image-codex.md @@ -1 +1 @@ -ghcr.io/kagent-dev/kagent/codex-harness@sha256:2c43e1bfce6d0acc59dfe6dac4732371106579398f29fda2b63ecf8b43ffff70 \ No newline at end of file +ghcr.io/kagent-dev/kagent/codex-harness@sha256:aef1e913671c65721af8003494afbeacc6c81e41309afbbb1e8d888e1868d8ce \ No newline at end of file