fix(helm): use A2A /.well-known/agent.json for agent readiness probe#1311
fix(helm): use A2A /.well-known/agent.json for agent readiness probe#1311opspawn wants to merge 1 commit intokagent-dev:mainfrom
Conversation
There was a problem hiding this comment.
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
/healthto/.well-known/agent.jsonin 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.
| func InitCmd(cfg *InitCfg) error { | ||
| // Validate agent name | ||
| if err := validateAgentName(cfg.AgentName); err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
The PR description mentions only changing the readiness probe path and updating 25 golden test files, but the actual changes include:
- The readiness probe change (as described)
- New CLI agent name validation logic in
init.goandinit_test.go(not mentioned in description) - Addition of
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCEenvironment 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.
b03cc28 to
bad5e97
Compare
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>
bad5e97 to
db9f91a
Compare
Summary
Changes the agent deployment readiness probe from
/healthto/.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/healthendpoint is not universally implemented across agent SDKs (e.g., Google ADK, CrewAI, LangGraph), making it an unreliable readiness signal. Using/.well-known/agent.jsonstandardizes on a protocol-required endpoint that is guaranteed to be present.What changed:
go/internal/controller/translator/agent/adk_api_translator.go: Changed readiness probehttpGet.pathfrom/healthto/.well-known/agent.jsonRisk / 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