Skip to content

docs(api): add field descriptions for BYO agent spec#1969

Merged
EItanya merged 1 commit into
kagent-dev:mainfrom
giantswarm:docs/byo-field-descriptions
Jun 5, 2026
Merged

docs(api): add field descriptions for BYO agent spec#1969
EItanya merged 1 commit into
kagent-dev:mainfrom
giantswarm:docs/byo-field-descriptions

Conversation

@marians

@marians marians commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This PR adds doc comments in go/api/v1alpha2/agent_types.go and regenerates the CRD manifests (make controller-manifests):

  • AgentSpec.BYO / AgentSpec.Declarative — describe the two agent types; for BYO, state the convention that the image must serve the agent over A2A on port 8080 (verified in resolveByoDeployment, this was previously documented nowhere in the CRD)
  • BYOAgentSpec.Deployment — replace the "Trust relationship to the agent." comment, which didn't seemto belong there.
  • ByoDeploymentSpecimage, cmd, args
  • SharedDeploymentSpecreplicas, imagePullSecrets, volumes, volumeMounts, labels, annotations, env, tolerations, nodeSelector
  • ServiceAccountConfiglabels, annotations

Since SharedDeploymentSpec is embedded in DeclarativeDeploymentSpec as well, the same comments also fill the identical gaps under spec.declarative.deployment.*, and the SandboxAgent CRD picks them up too.

Signed-off-by: Marian Steinbach <marian@giantswarm.io>
Copilot AI review requested due to automatic review settings June 5, 2026 08:50
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 5, 2026

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds/improves CRD field documentation for agent specs (BYO and Declarative) across generated CRD manifests and the Go API types to make configuration intent clearer.

Changes:

  • Add descriptions for spec.byo / spec.declarative and multiple nested deployment fields (labels, annotations, env, volumes, etc.).
  • Clarify BYO deployment semantics (Kubernetes Deployment created for a BYO container image; expected A2A port 8080).
  • Propagate these doc changes across both Agents and SandboxAgents CRDs (Helm templates + CRD bases).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
helm/kagent-crds/templates/kagent.dev_sandboxagents.yaml Adds/updates OpenAPI schema description fields for SandboxAgents CRD.
helm/kagent-crds/templates/kagent.dev_agents.yaml Adds/updates OpenAPI schema description fields for Agents CRD.
go/api/v1alpha2/agent_types.go Updates Go type comments that drive CRD schema descriptions.
go/api/config/crd/bases/kagent.dev_sandboxagents.yaml Mirrors the updated schema descriptions in the generated CRD base.
go/api/config/crd/bases/kagent.dev_agents.yaml Mirrors the updated schema descriptions in the generated CRD base.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +60 to 70
// BYO configures a "bring your own" agent backed by a user-provided
// container image. Kagent deploys the image and expects it to serve the
// agent over the A2A protocol on port 8080.
// Required if type is BYO.
// +optional
BYO *BYOAgentSpec `json:"byo,omitempty"`
// Declarative configures an agent that is fully described by this resource
// (model, instructions, tools) and runs on one of kagent's built-in runtimes.
// Required if type is Declarative.
// +optional
Declarative *DeclarativeAgentSpec `json:"declarative,omitempty"`
Comment on lines +367 to 369
// Replicas is the number of desired agent pods. Defaults to 1.
// +optional
Replicas *int32 `json:"replicas,omitempty"`

@EItanya EItanya 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.

Thanks so much for the docs help :)

@marians

marians commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@EItanya Just scratching my own itch, I wanted to understand the CRD better. :)

@EItanya EItanya merged commit 92607e0 into kagent-dev:main Jun 5, 2026
24 checks passed
@marians marians deleted the docs/byo-field-descriptions branch June 5, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants