Repository navigation
Consolidate AgentCard into AgentRuntime status #371
Description
Summary
Move agent card data, identity verification, and discovery into AgentRuntime's status section. AgentRuntime becomes the single CR per agent workload. Deprecate AgentCard as a separate CRD.
Rationale
From ADR ODH-ADR-AgentOps-0002:
The AgentCard problem
The AgentCard CRD was introduced for agent discovery and signature verification. Two problems have emerged.
It conflates observation with policy. AgentCard is operator-created (via auto-discovery) and operator-written (the controller populates status). An administrator cannot express "this agent must offer streaming" or "only agent-b may call this agent" because the spec contains only targetRef, syncPeriod, and identityBinding. There are no admin-authored policy fields. The controller owns the entire resource, leaving no room for admin intent.
Its signature verification duplicates mTLS. The signing pipeline proves that a card was signed by a key whose certificate was issued by SPIRE for a given trust domain. The platform already provides mTLS between Pods through SPIRE-issued certificates. For in-cluster communication, card signing adds no assurance beyond what the transport layer guarantees. The one scenario where signing adds value (out-of-band card exchange across trust domains) is not implemented, and cross-cluster federation is not on the near-term roadmap. The signing pipeline also signs a skeleton card with empty skills and capabilities (#292), so the signed content and the live content are disconnected.
AgentCard is a pure read-only CR. Beyond targetRef and syncPeriod, it has no admin-authored spec fields. Its content (card metadata, verification status, binding state) is entirely controller-managed and fits naturally into AgentRuntime's status section.
The two-CRD problem
Both AgentRuntime and AgentCard reference the same workload via targetRef, share the same namespace, the same lifecycle, and the same owner. Two separate CRs for the same Deployment forces administrators to maintain consistency between resources that always move together, doubles the RBAC surface, and splits "how this agent participates in the platform" across two APIs.
AgentRuntime already configures identity (SPIFFE trust domain), observability (trace endpoints), and workload classification (agent vs tool). Adding policy and card metadata to the same resource follows the same pattern: one CR, everything the platform needs to know.
Design forces
- mTLS is mandatory. All controller-to-agent communication must use mutual TLS. This replaces card signing: both sides prove identity at the transport layer, on every connection.
- One CR per agent. An administrator creates exactly one resource to enroll an agent in the platform.
- Event-driven, not polling. Agent card content is static for the lifetime of a Pod. Verification triggers on workload rollouts, not on a timer.
- Opt-in enforcement. Policy fields are optional. Agents without policy run unrestricted.
- Admin owns spec, controller owns status. These must not share the same fields.
- A2A protocol compatibility. Agent discovery via
/.well-known/agent-card.jsonremains the standard endpoint. - Prior work is valuable. The AgentCard infrastructure (PRs ✨ A2A AgentCard Signature Verification #176, ✨ Feat: Add SPIRE x5c init-container signing, trust-domain binding, and ConfigMap trust bundle #185, 🌱 Testing: Add unit tests for NetworkPolicy controller, fetcher, webhook, proactive restart, and negative signature verification #191, ✨ Feat: AgentCard signing production readiness and Helm chart fixes #221, ✨ feat: Add mTLS runtime identity verification for AgentCards #284) represents significant engineering investment. The NetworkPolicy generation logic, trust domain validation, and OVN-Kubernetes workarounds carry forward.
Proposal
What moves into AgentRuntime
| Current location (AgentCard) | New location (AgentRuntime) |
|---|---|
status.card (cached card data) |
status.card (fetched on rollout events) |
status.attestedAgentSpiffeId |
status.identity.attestedSpiffeId |
status.conditions[Verified] |
status.conditions[Verified] |
status.bindingStatus |
status.identity.binding |
spec.identityBinding |
spec.identity (already partially exists) |
| Skills, capabilities, protocols | status.card.skills, status.card.capabilities |
Architectural changes
- Discovery: AgentRuntime CR selection (
spec.targetRef) + live A2A endpoint fetch. No separate discovery CRD. - Identity verification: The mTLS verified fetch from ✨ feat: Add mTLS runtime identity verification for AgentCards #284 moves from the AgentCard controller to the AgentRuntime controller. Same go-spiffe X509Source, same
fetchCardData/evaluateTrustpattern. mTLS becomes the sole identity verification mechanism, replacing JWS signing. - Sync model: Event-driven verification on workload rollouts (Pod template hash change) replaces the 30-second polling loop.
- Policy fields: Optional
spec.policysection on AgentRuntime for network access control (see ADR-0002 for the proposed schema).
What gets deprecated
AgentCardCRD and its three controllers (AgentCardReconciler,AgentCardNetworkPolicyReconciler,AgentCardSyncReconciler)agentcard-signerinit-container and the JWS signing pipeline (PRs ✨ Feat: Add SPIRE x5c init-container signing, trust-domain binding, and ConfigMap trust bundle #185, ✨ Feat: AgentCard signing production readiness and Helm chart fixes #221). mTLS verified fetch (✨ feat: Add mTLS runtime identity verification for AgentCards #284) proves identity at the transport layer on every connection, making deploy-time signing redundant for in-cluster communication.- JWS signature verification via
X5CProvider(PR ✨ A2A AgentCard Signature Verification #176), replaced by mTLS identity attestation. - CLI flags:
--require-a2a-signature,--signature-audit-mode
Reusable pieces from #284
PR #284 (just merged) added mTLS verified fetch to the AgentCard controller. These pieces port directly to the AgentRuntime controller:
internal/agentcard/fetcher.go: mTLS-capable HTTP client using go-spiffe X509Source, SPIFFE ID extraction from TLS peer certificates.internal/signature/shared library:SignCard,VerifyJWS,ZeroPrivateKey. Useful if JWS signing is retained for cross-cluster card exchange later.fetchCardData/evaluateTrustreconciler decomposition.ClusterSPIFFEIDHelm template for the operator's own SPIFFE identity.cmd/test-tls-agent/E2E test fixture.
NetworkPolicy generation, trust domain validation, and OVN-Kubernetes workarounds from #176, #185, and #221 also port to AgentRuntime's policy enforcement path.
Migration path
Incremental and non-breaking:
- Add
status.cardandstatus.identityfields to AgentRuntime CRD (backward-compatible) - Port mTLS fetch and verification logic from AgentCard controller to AgentRuntime controller
- Add event-driven card fetch triggered by Pod template hash changes
- Deploy ValidatingAdmissionPolicy restricting
kagenti.io/type=agentlabels to workloads with a corresponding AgentRuntime CR - Gate behind
--enable-agentruntime-discoveryflag (default: false) - Deprecate AgentCard CRD (stop creating new ones, document migration)
- Remove AgentCard CRD, its controllers, and the JWS signing pipeline in the following release
One full release cycle between deprecation announcement and removal.
Related
- Signed AgentCard always has empty skills/capabilities in automated deploy path #292: Skeleton-card problem (root cause addressed by this consolidation)
- discussion: [optionally] support multiple AgentCards per pod. #220: Multiple AgentCards per pod (resolved by 1:1 AgentRuntime model)
- ✨ feat: Add mTLS runtime identity verification for AgentCards #284: mTLS verified fetch (infrastructure reusable here)
- #862 (kagenti/kagenti): AgentRuntime epic
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Jul 21, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment or remove the stale label.
github-actions commentedon Aug 4, 2026
This issue was closed because it has been stale for 14 days with no activity. Feel free to reopen if this is still relevant.