Skip to content

Comments

fix(helm): use A2A /.well-known/agent.json for agent readiness probe#1311

Open
opspawn wants to merge 1 commit intokagent-dev:mainfrom
opspawn:fix/1092-a2a-readiness-probe
Open

fix(helm): use A2A /.well-known/agent.json for agent readiness probe#1311
opspawn wants to merge 1 commit intokagent-dev:mainfrom
opspawn:fix/1092-a2a-readiness-probe

Conversation

@opspawn
Copy link
Contributor

@opspawn opspawn commented Feb 15, 2026

Summary

Changes the agent deployment readiness probe from /health to /.well-known/agent.json.

Why: kagent's frontend-to-agent communication is built on the A2A protocol. The A2A spec requires agents to serve /.well-known/agent.json, making it a protocol-mandated endpoint that all compliant agents must implement. The current /health endpoint is not universally implemented across agent SDKs (e.g., Google ADK, CrewAI, LangGraph), making it an unreliable readiness signal. Using /.well-known/agent.json standardizes on a protocol-required endpoint that is guaranteed to be present.

What changed:

  • go/internal/controller/translator/agent/adk_api_translator.go: Changed readiness probe httpGet.path from /health to /.well-known/agent.json
  • Updated all 25 golden test output files to match

Risk / Follow-up consideration:
Not all agents may be A2A-compliant. A follow-up could make the readiness probe path configurable via the Agent CRD spec (e.g., spec.readinessProbe.path) so operators can override it for non-A2A agents. For now, since kagent explicitly targets A2A agents, this is the correct default.

Related: #1291 (A2A skills UI)

Closes #1092

Signed-off-by: opspawn opspawn@users.noreply.github.com

@opspawn opspawn requested a review from EItanya as a code owner February 15, 2026 14:51
Copilot AI review requested due to automatic review settings February 15, 2026 14:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the agent deployment readiness probe to use the A2A protocol-mandated /.well-known/agent.json endpoint instead of /health, making the readiness check more reliable across different agent SDKs. The PR also includes CLI validation for agent names and updates to golden test files reflecting an OTEL environment variable change.

Changes:

  • Changed readiness probe path from /health to /.well-known/agent.json in agent deployments
  • Added Python identifier validation for agent names in the CLI
  • Updated 25 golden test files with the readiness probe change and OTEL metrics configuration

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

File Description
go/internal/controller/translator/agent/adk_api_translator.go Updated readiness probe path to use A2A-compliant endpoint
go/cli/internal/cli/agent/init.go Added agent name validation enforcing Python identifier rules
go/cli/internal/cli/agent/init_test.go Added comprehensive tests for agent name validation
go/internal/controller/translator/agent/testdata/outputs/*.json (25 files) Updated golden test outputs reflecting readiness probe and OTEL environment changes

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

Comment on lines 27 to 31
func InitCmd(cfg *InitCfg) error {
// Validate agent name
if err := validateAgentName(cfg.AgentName); err != nil {
return err
}
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

The PR description mentions only changing the readiness probe path and updating 25 golden test files, but the actual changes include:

  1. The readiness probe change (as described)
  2. New CLI agent name validation logic in init.go and init_test.go (not mentioned in description)
  3. Addition of OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE environment variable in all golden test files (not mentioned in description)

The CLI validation changes appear to be an unrelated feature that validates Python identifier rules for agent names. The OTEL environment variable appears because the test environment now has this variable set, which is collected via collectOtelEnvFromProcess().

Please update the PR description to accurately reflect all changes included in this PR, or consider splitting the CLI validation feature into a separate PR if it's unrelated to the readiness probe change.

Copilot uses AI. Check for mistakes.
@opspawn opspawn force-pushed the fix/1092-a2a-readiness-probe branch 3 times, most recently from b03cc28 to bad5e97 Compare February 16, 2026 17:49
Change the agent readiness probe from /health to /.well-known/agent.json,
which is the standard A2A endpoint. Regenerate golden files without
environment-specific OTEL variables.

Closes kagent-dev#1188

Signed-off-by: OpSpawn Agent <agent@opspawn.com>
@opspawn opspawn force-pushed the fix/1092-a2a-readiness-probe branch from bad5e97 to db9f91a Compare February 16, 2026 17:50
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.

[FEATURE] change Agent deploy readiness probe to use A2A /.well-known endpoint

1 participant