Skip to content

AgentDeploy

An AgentDeploy is the unit of deployment for a single agent. It owns the pods that run the user's agent code together with an injected broker sidecar that handles A2A transport, plus a ClusterIP Service that gives each AgentDeploy a stable DNS name.

AgentDeploys are normally generated by the AgentSet, they are not supposed to be created by the user directly.

Anatomy

apiVersion: kynomesh.kyno.sh/v1alpha1
kind: AgentDeploy
metadata:
  name: greeter-planner
spec:
  name: planner
  agentSetName: greeter
  replicas: 2
  scale:
    min: 1
    max: 5
  container:
    image: example/planner:latest
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%

Pod composition

Every AgentDeploy pod is composed of three controller-managed containers plus whatever the user adds:

  • init-runtime (init container) — writes /var/run/kynomesh/topology.json from the encoded AgentDeploy payload, resolving peer URLs.
  • agent (Kubernetes-native sidecar with restartPolicy: Always) — runs the user's code. Listens on a Unix Domain Socket the broker connects to.
  • broker (main container) — terminates A2A traffic and forwards it to the agent over the shared UDS.

Peer discovery

The agent discovers peers by reading the topology file:

{
  "pattern": "Supervisor",
  "isEntry": true,
  "peers": [
    {
      "name": "worker1",
      "url": "https://greeter-worker1.ns.svc.cluster.local:8490"
    },
    {
      "name": "worker2",
      "url": "https://greeter-worker2.ns.svc.cluster.local:8490"
    }
  ]
}
  • For Managed peers, the URL is derived from the sibling AgentDeploy's nomral ClusterIP Service and the broker port.
  • For External peers, the URL is taken verbatim from the spec.

Rolling updates

When the pod spec changes, the controller drives a rolling replacement honoring updateStrategy.rollingUpdate.maxUnavailable. Replica indices are stable across rollouts, so pod DNS names stay predictable.

Kubectl

To query AgentDeploy objects with kubectl:

kubectl get agentdeploy # or "ad" as a short name

See Also

  • AgentSet — group-level resource and patterns.
  • APIs — full CRD reference.