Repository navigation
docs: add Codex and Claude Harness examples and a codex runtime-image conref - #566
chinmaychahar wants to merge 2 commits into
Conversation
Signed-off-by: chinmaychahar <chinmay.cc.06@gmail.com>
Signed-off-by: chinmaychahar <chinmay.cc.06@gmail.com>
Rachael-Graham
left a comment
There was a problem hiding this comment.
I ran both examples on a kind cluster running kagent 1.0.0-alpha8 with Agent Substrate 0.4.0-alpha1, applied exactly as the page renders them.
Codex. All three resources are accepted, the Agent reports Accepted, ResolvedRefs, Compatible and Ready with no warnings, the Session reaches RUNTIME_STATE_READY, and a turn returns the model's reply. The manifest is correct as written.
Claude. Same four conditions, no warnings, and the Session starts and reaches the Anthropic API. I have no Anthropic key, so the turn itself ends at Invalid API key · Fix external API key — everything up to the model call is verified, the model call is not.
Also checked: both manifests pass the alpha8 CRD schemas with no unknown or missing fields and every CEL rule satisfied, the digest you pinned is the one GHCR serves for codex-harness:1.0.0-alpha8, the Secret names and keys match the OpenAI and Anthropic guides, both provider links and the #model-provider-support anchor resolve in a local build, and the page builds clean with both tabs rendering.
The deploy check fails because a pull request from a fork cannot read CLOUDFLARE_API_TOKEN. Nothing for you to fix.
Comments inline.
|
|
||
| ### 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). |
There was a problem hiding this comment.
"It differs only in" contradicts Tool and skill support further down this page, where both runtimes also constrain what an AgentTemplate can bind.
| 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. |
There was a problem hiding this comment.
A key that cannot reach gpt-5.2-codex compiles and starts a Session, then fails the turn with nothing but Codex execution failed. Say so, and anchor the link to the section that creates the Secret.
| 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`. |
| ``` | ||
| {{% /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. |
There was a problem hiding this comment.
Anchor the link to the section that creates the Secret, so the reader lands on the step.
| The ModelConfig reads its API key from the `kagent-anthropic` Secret that the [Anthropic]({{< link path="setup/model-providers/anthropic" >}}) 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. |
| 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" |
There was a problem hiding this comment.
The comment block at L435-452 still says two conrefs hold a digest, and names only golang-adk and claude-harness. Add codex-harness there — that paragraph is the only thing stopping the next person reaching for the unpublished codex-adk.
|
|
||
| The `kagent` and `byo` runtimes compile through the same path, so they accept the same model providers and the same AgentTemplate features, except [structured output]({{< link path="agents/structured-output" >}}), which only the `kagent` runtime supports. The `codex` and `claude` runtimes are purpose-built adapters, and each accepts a narrower slice. | ||
|
|
||
| ### Codex and Claude examples |
There was a problem hiding this comment.
Nit, and it answers your placement question: this page is the right home and both runtimes belong together. Move the section below ### Runtime-specific settings so Choose a runtime reads table, prose, settings, then the worked examples.
| model: gpt-5.2-codex | ||
| provider: OpenAI | ||
| openAI: | ||
| # The only value that the codex runtime accepts. |
There was a problem hiding this comment.
Nit: this restates the codex with OpenAI row of the restriction table that the section already links to. Drop it.
| name: codex-agent | ||
| namespace: kagent | ||
| spec: | ||
| template: |
There was a problem hiding this comment.
Nit: this inlines spec.template, while every other 1.x example uses templateRef with a separate AgentTemplate, and your description says AgentTemplate. Both are valid — pick one so the tree reads consistently.
Closes #530
Adds Codex and Claude Harness examples to
agents/agent-harness.mdand aruntime-image-codexconref that the ref-docs job resolvesPlacement: both examples go on the harness page, next to the existing example and the runtime tables, so a reader can compare the runtimes in one place. Open to suggestions.
Done when
runtime-image-codex.mdexists and resolves; the other two conrefs still resolveruntime-image-claude.mdis referenced by a page againTesting
On kind with kagent
1.0.0-alpha8, both Agents reachReadyand Sessions start. A Codex ModelConfig withoutapiFormat: responsesis rejected. I haven't run a real model turn because I don't have keys. @Rachael-Graham, could you run one with your OpenAI key?UI