Skip to content

feat: extend the AgentInstance A2A gateway - #2478

Merged
EItanya merged 2 commits into
mainfrom
api-v2-k10-agent-card
Aug 18, 2026
Merged

EItanya merged 2 commits into
mainfrom
api-v2-k10-agent-card

Conversation

@EItanya

@EItanya EItanya commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • persist the immutable compiled Agent Card on each runtime revision
  • serve authenticated extended Agent Cards from the AgentInstance pinned revision
  • advertise the gateway gRPC endpoint through Helm configuration
  • persist cancellation results before returning them
  • serve terminal subscriptions from PostgreSQL and commit live subscription updates before publishing

The public .well-known/agent-card.json routing contract, authorization coverage, and new lifecycle tests remain deferred.

Validation

  • go test ./core/v2/a2agateway
  • make -C go lint
  • focused Go race tests for gateway, database, controller, and controller-v2 before the follow-up
  • Helm controller tests (58 passed)
  • git diff --check

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Copilot AI lite review requested due to automatic review settings August 18, 2026 15:50
@EItanya
EItanya requested a review from a team as a code owner August 18, 2026 15:50
@github-actions github-actions Bot added the enhancement New feature or request label Aug 18, 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

This PR adds persisted, revision-pinned Agent Cards for AgentInstances by storing the compiled Agent Card JSON on each runtime_revision, exposing an authenticated “extended” Agent Card from the gateway based on the AgentInstance’s pinned revision, and making the gateway’s public gRPC URL configurable via Helm.

Changes:

  • Add a new runtime_revision.agent_card JSONB column and plumb it through SQLC-generated queries/models and the Postgres client.
  • Persist the compiled Agent Card JSON during v2 controller reconciliation and serve the authenticated extended Agent Card from the gateway using the AgentInstance’s PreparedRevision.
  • Add controller.a2aGatewayUrl Helm value + templating and tests to advertise the gateway gRPC endpoint via A2A_GATEWAY_URL.

Reviewed changes

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

Show a summary per file
File Description
helm/kagent/values.yaml Adds controller.a2aGatewayUrl Helm value for the advertised public gateway URL.
helm/kagent/tests/controller-deployment_test.yaml Adds Helm unit tests asserting A2A_GATEWAY_URL defaulting and overrides.
helm/kagent/templates/controller-configmap.yaml Injects A2A_GATEWAY_URL into the controller ConfigMap.
helm/kagent/templates/_helpers.tpl Adds kagent.a2aGatewayUrl helper to compute the advertised gateway URL.
go/core/v2/controller/reconciler.go Persists compiled AgentCardJSON into RuntimeRevision during reconciliation.
go/core/v2/a2agateway/gateway.go Implements GetExtendedAgentCard by loading the pinned runtime_revision.agent_card and overlaying gateway-owned fields.
go/core/v2/a2agateway/gateway_test.go Adds coverage ensuring the gateway serves template metadata from the pinned revision and uses the public gateway URL.
go/core/pkg/migrations/core/000013_runtime_revision_agent_card.up.sql Adds agent_card JSONB column to runtime_revision.
go/core/pkg/migrations/core/000013_runtime_revision_agent_card.down.sql Drops the agent_card column.
go/core/internal/database/queries/runtime_revisions.sql Extends runtime revision upsert to include agent_card.
go/core/internal/database/gen/runtime_revisions.sql.go Regenerates SQLC code to read/write agent_card.
go/core/internal/database/gen/models.go Adds AgentCard []byte to SQLC RuntimeRevision model.
go/core/internal/database/gen/agent_instances.sql.go Includes agent_card when selecting latest runtime revision for an instance.
go/core/internal/database/client_postgres.go Maps AgentCard between API model and SQLC params/rows.
go/core/internal/database/client_agent_instance_test.go Verifies AgentCard is persisted and retrievable from GetRuntimeRevision.
go/core/cmd/controller-v2/main.go Wires A2A_GATEWAY_URL env var into the gateway constructor.
go/api/database/models.go Adds AgentCard to the shared RuntimeRevision API model.
Files not reviewed (3)
  • go/core/internal/database/gen/agent_instances.sql.go: Generated file
  • go/core/internal/database/gen/models.go: Generated file
  • go/core/internal/database/gen/runtime_revisions.sql.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +295 to +304
revision, err := g.store.GetRuntimeRevision(ctx, instance.GetPreparedRevision())
if err != nil {
ctrllog.FromContext(ctx).Error(err, "failed to load AgentInstance runtime revision", "revision", instance.GetPreparedRevision())
return nil, a2atype.NewError(a2atype.ErrInternalError, "failed to load Agent Card")
}
card := &a2atype.AgentCard{}
if err := json.Unmarshal(revision.AgentCard, card); err != nil {
ctrllog.FromContext(ctx).Error(err, "failed to decode AgentInstance Agent Card", "revision", revision.Revision)
return nil, a2atype.NewError(a2atype.ErrInternalError, "failed to load Agent Card")
}
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@EItanya EItanya changed the title feat: generate AgentInstance Agent Cards feat: extend the AgentInstance A2A gateway Aug 18, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 18, 2026
@EItanya
EItanya merged commit f9d76bd into main Aug 18, 2026
32 of 36 checks passed
@EItanya
EItanya deleted the api-v2-k10-agent-card branch August 18, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址