Skip to content

docs: cover the BYO harness path in the UI (#539) - #723

Merged
Rachael-Graham merged 3 commits into
kagent-dev:mainfrom
boxcee-interview:fix/issue-539
Dec 1, 2026
Merged

Rachael-Graham merged 3 commits into
kagent-dev:mainfrom
boxcee-interview:fix/issue-539

Conversation

@boxcee-interview

Copy link
Copy Markdown
Contributor

Closes #539

agents/bring-your-own-agent.md documented only the CLI and YAML path. Since kagent#2935 the UI authors a byo Harness directly, so a reader working in the UI had no route through the feature.

Adds a Create a BYO Harness in the UI section to the page, written as another route to the same A2A contract rather than a separate feature, as the issue asks:

  • New Harness → byo under Runtime adapter; the form asks for Workload image (digest-pinned) and Command, mirroring the fields the contract table already names.
  • Create harness stays disabled while the form reports a problem, so the same workload.command rule the API enforces at apply time is enforced at authoring time. Verified against harnessDraftProblems in kagent's ui/src/components/harness-form/harnessDraft.ts.
  • The Harnesses tab reports the runtime as byo (runtime column in HarnessesTab.tsx).
  • The model is optional on a byo agent; the Agent form asks for a model configuration only for non-byo harnesses (AgentFormPage.tsx).

Applied to both main and latest, which currently carry identical copies of this page. No matching line was needed in agent-harness.md: its workload.command row already states the requirement.

Screenshots omitted — no capture environment available here; happy to add them if you can point me at the fixture workflow.

How to Test

make build-docs (Hugo v0.160.1, the version CI pins) → HUGO_EXIT=0, 956 pages, no ERROR lines. The new section renders on both version copies with the internal ui/launch-ui link resolving.

@boxcee-interview

Copy link
Copy Markdown
Contributor Author

CI note: all code checks pass (Static + content checks, linkChecker, DCO). The only red check is the Preview deploy — it fails at the external "Upload preview version" step (cloudflare/wrangler-action, Worker version upload) after the Hugo build succeeds, so it looks like a transient Cloudflare-side issue rather than a docs problem. A re-run of the deploy job should clear it if maintainers have the access to trigger one.

@boxcee-interview

Copy link
Copy Markdown
Contributor Author

Heads up: the deploy check fails before any content is involved — the Preview step errors with 'In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work.' All content checks (Static + content checks, linkChecker, DCO, Framework tests, Links) pass. I can't fix a missing workflow secret from a fork; once CLOUDFLARE_API_TOKEN is available to the workflow this PR should go green.

@boxcee-interview

Copy link
Copy Markdown
Contributor Author

The deploy check fails before it reaches the PR's content: the GitHub Actions runner has no CLOUDFLARE_API_TOKEN, so wrangler aborts with "it's necessary to set a CLOUDFLARE_API_TOKEN environment variable". Every other check on this PR passes (Static + content checks, linkChecker, DCO). This looks like a repo secret the maintainers would need to (re)attach to the Actions environment — happy to close and reopen if a new push is needed once it's in place.

@boxcee-interview

Copy link
Copy Markdown
Contributor Author

Update on the new head (08e269e): the deploy check re-ran and still fails at the same step — "Upload preview version" (cloudflare/wrangler-action) aborts with 'In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable'. All other checks pass (Static + content checks, linkChecker, DCO, Framework tests). This confirms it is the missing CLOUDFLARE_API_TOKEN secret on the Actions side, not anything in the docs change.

@Rachael-Graham Rachael-Graham left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boxcee-interview hey sorry, was out for 3 weeks but reviewed now!
Thanks for adding the UI route. A few changes, mostly style, plus one that's specific to the main copy.


## Create a BYO Harness in the UI

The [kagent UI]({{< link path="ui/launch-ui" >}}) is another route to the same contract, not a separate feature. On the **Agents** page, **New Harness** opens the Harness form; pick `byo` under **Runtime adapter**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In main, the Agents page no longer has a New Harness button; kagent#3633 replaced the create buttons with one Create button that opens a picker, and the Harness form now submits with Create rather than Create harness. Update the main copy to Create > Harness and Create, and keep the current wording in latest, which matches v1.0.1.


## Create a BYO Harness in the UI

The [kagent UI]({{< link path="ui/launch-ui" >}}) is another route to the same contract, not a separate feature. On the **Agents** page, **New Harness** opens the Harness form; pick `byo` under **Runtime adapter**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not a separate feature" restates the clause before it, and the semicolon joins two sentences. Suggest: "The kagent UI is another route to the same contract. On the Agents page, select New Harness, and then select byo under Runtime adapter." (Applies to the main copy too.)


The [kagent UI]({{< link path="ui/launch-ui" >}}) is another route to the same contract, not a separate feature. On the **Agents** page, **New Harness** opens the Harness form; pick `byo` under **Runtime adapter**.

The form asks for the two fields [The A2A contract](#the-a2a-contract) says a `byo` Harness must satisfy: **Workload image**, pinned by `sha256` digest, and **Command**, which overrides the image entrypoint. Enter each part of the command and press Enter. **Arguments** is optional. **Create harness** stays disabled while the form reports a problem, so a `byo` Harness with no command cannot be submitted from the UI either. The rule is the same as the API's `BYO harnesses must specify workload.command` rejection; only the moment it is enforced differs — authoring instead of apply.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A link can't be the subject of a verb in these docs, so "the two fields The A2A contract says a byo Harness must satisfy" should become "the two fields that a byo Harness must set, as described in The A2A contract". The closing "; only the moment it is enforced differs — authoring instead of apply" also needs splitting, because the style guide avoids semicolons and dashes between clauses, for example "The UI enforces the rule when you author the Harness, and the API enforces it when you apply it." (Applies to the main copy too.)

Signed-off-by: Moritz Schmitz von Hülst <mschmitzvonhuelst@gmail.com>
The deploy check on this branch ran under the pre-guard preview.yaml and
failed with a missing CLOUDFLARE_API_TOKEN (fork PRs cannot read repo
secrets). The guard that skips the deploy job for fork PRs is already on
main (2856a4a); this empty commit re-triggers the suite so it picks up
the updated workflow. No code change.

Signed-off-by: Moritz Schmitz von Hülst <mschmitzvonhuelst@gmail.com>
Address the three review points on the added section:
- main copy: kagent#3633 replaced the create buttons with one Create
  button opening a picker; use Create > Harness and Create there,
  keep the v1.0.1 wording in latest.
- Split the New Harness sentence per the style suggestion.
- Reword the link-as-subject clause and drop the semicolon/dash
  ending per the style guide.

Signed-off-by: Moritz Schmitz von Hülst <mschmitzvonhuelst@gmail.com>
@boxcee-interview

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Addressed all three points in 4c4b633:

  • main copy now uses Create > Harness and Create (kagent#3633), latest keeps the v1.0.1 wording.
  • Split the New Harness sentence as suggested.
  • Reworded the link-as-subject clause and replaced the semicolon/dash ending with "The UI enforces the rule when you author the Harness, and the API enforces it when you apply it."

Also rebased onto the current main; the Hugo build passes in-container.

@Rachael-Graham Rachael-Graham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! :)

@Rachael-Graham
Rachael-Graham merged commit 5c711cf into kagent-dev:main Dec 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: cover creating a BYO Harness in the UI for kagent 1.x

2 participants