Skip to content

feature: Discover AgentCards for tool workloads with A2A protocol labels #190

@kevincogan

Description

@kevincogan

Feature Description

The AgentCard sync controller and main controller only watch workloads with kagenti.io/type=agent. Workloads labeled kagenti.io/type=tool are ignored even when they have protocol.kagenti.io/a2a set. This means tools that serve /.well-known/agent.json (e.g., MCP tools with an A2A bridge) are not discovered by the AgentCard system.

This was identified during the review of #187 (multiple protocol labels).

Scope:

  • Extend the sync controller and main controller to also watch workloads with kagenti.io/type=tool when they have protocol.kagenti.io/a2a
  • Do not attempt to fetch for MCP-only workloads (protocol.kagenti.io/mcp without protocol.kagenti.io/a2a) the fetcher only supports A2A today and MCP metadata discovery needs further design input from MCP agent builders
  • The affected code is in agentcard_controller.go (agentLabelPredicate, isAgentWorkload) and agentcardsync_controller.go (shouldSyncWorkload)

Proposed Solution

  1. Update agentLabelPredicate() and isAgentWorkload() in agentcard_controller.go to accept both kagenti.io/type=agent and kagenti.io/type=tool
  2. Update shouldSyncWorkload() in agentcardsync_controller.go to accept both types when a protocol.kagenti.io/a2a label is present
  3. Ensure the naming convention for auto-created cards still works (e.g., {tool-name}-deployment-card)
  4. Add integration test coverage for tool workloads with A2A labels

Want to contribute?

  • I would like to work on this issue.

Additional Context

  • Related PR: #187 (multiple protocol labels)
  • Related issue: #188 (MCP fetcher support which is separate, future work)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions