Skip to content

Commit 4fb1f76

Browse files
authored
Merge pull request #353 from varshaprasad96/docs/dev-preview-readiness
docs: update README and docs for dev preview readiness
2 parents 498974d + 2cea057 commit 4fb1f76

4 files changed

Lines changed: 150 additions & 61 deletions

File tree

README.md

Lines changed: 143 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,80 +3,97 @@
33
[![License](https://img.shields.io/github/license/kagenti/kagenti-operator)](LICENSE)
44
![Contributors](https://img.shields.io/github/contributors/kagenti/kagenti-operator)
55

6-
**Kagenti Operator** is a Kubernetes operator that automates the deployment, discovery, and security of AI agents in Kubernetes clusters.
6+
**Kagenti Operator** is a Kubernetes operator that automates the deployment, discovery, and security of AI agents in Kubernetes clusters. It provides workload identity (SPIFFE), mutual authentication (OAuth2/Keycloak), agent-to-agent trust (A2A signature verification), and observability (MLflow tracing) — all declaratively managed through Custom Resources.
77

88
## Overview
99

1010
The Kagenti Operator manages the following Custom Resource Definitions (CRDs):
1111

1212
| Resource | Purpose |
1313
|----------|---------|
14+
| **[AgentRuntime](./kagenti-operator/docs/api-reference.md#agentruntime)** | Enrolls a workload into the Kagenti platform — applies labels, triggers sidecar injection, and configures identity and observability |
1415
| **[AgentCard](./kagenti-operator/docs/api-reference.md#agentcard)** | Discovers, indexes, and verifies agent metadata for Kubernetes-native agent discovery |
1516

16-
Agents are deployed as standard Kubernetes **Deployments** or **StatefulSets** with the `kagenti.io/type: agent` label. The operator automatically discovers labeled workloads and creates AgentCard resources for them.
17-
1817
### Key Features
1918

20-
- **Agent Deployment** — Deploy agents using standard Kubernetes Deployments or StatefulSets with the `kagenti.io/type: agent` label
21-
- **Dynamic Agent Discovery** — Automatic indexing of agent metadata via the A2A protocol
22-
- **Signature Verification** — JWS-based cryptographic verification of agent cards (RSA, ECDSA)
23-
- **Identity Binding** — SPIFFE-based workload identity binding with allowlist enforcement
19+
- **Declarative Agent Enrollment** — Create an `AgentRuntime` CR pointing to a clean Deployment; the operator applies labels, injects sidecars, and manages rolling updates automatically
20+
- **AuthBridge Sidecar Injection** — Mutating webhook injects envoy-proxy (mTLS + token exchange), SPIFFE helper (workload identity), and client registration (Keycloak OAuth2) sidecars
21+
- **Dynamic Agent Discovery** — Automatic indexing of agent metadata via the [A2A protocol](https://a2a-protocol.org/)
22+
- **Signature Verification** — JWS-based cryptographic verification of agent cards (RSA, ECDSA) using SPIRE X.509 trust bundles
23+
- **Identity Binding** — SPIFFE-based workload identity binding with trust domain validation
2424
- **Network Policy Enforcement** — Automatic NetworkPolicy creation based on signature verification status
25-
- **Flexible Configuration**Complete control over pod specifications, service ports, and environment variables
25+
- **MLflow Integration**Auto-discovers MLflow instances, creates per-agent experiments, and configures tracing
2626
- **Multi-Framework Support** — Works with LangGraph, CrewAI, AG2, and any A2A-compatible framework
2727

2828
## Architecture
2929

3030
```mermaid
31-
graph TD;
32-
subgraph Kubernetes
33-
direction TB
34-
style Kubernetes fill:#f0f4ff,stroke:#8faad7,stroke-width:2px
35-
36-
User[User/App]
37-
style User fill:#ffecb3,stroke:#ffa000
38-
39-
Workload["Deployment / StatefulSet\n(with kagenti labels)"]
40-
style Workload fill:#e1f5fe,stroke:#039be5
41-
42-
User -->|Creates| Workload
43-
44-
AgentCardSync[AgentCard Sync Controller]
45-
style AgentCardSync fill:#ffe0b2,stroke:#fb8c00
46-
47-
AgentCardController[AgentCard Controller]
48-
style AgentCardController fill:#ffe0b2,stroke:#fb8c00
49-
50-
NetworkPolicyController[NetworkPolicy Controller]
51-
style NetworkPolicyController fill:#ffe0b2,stroke:#fb8c00
31+
graph TB
32+
subgraph "User Interaction"
33+
User[User/Developer]
34+
User -->|Creates| Deployment[Deployment/StatefulSet]
35+
User -->|Creates| RuntimeCR[AgentRuntime CR]
36+
end
5237
53-
AgentPod[Agent Pod]
54-
style AgentPod fill:#c8e6c9,stroke:#66bb6a
38+
subgraph "Kagenti Operator"
39+
ValidationWebhook[Validating Webhooks]
40+
InjectionWebhook[AuthBridge Mutating Webhook]
41+
RuntimeController[AgentRuntime Controller]
42+
SyncController[AgentCard Sync Controller]
43+
CardController[AgentCard Controller]
44+
NPController[NetworkPolicy Controller]
45+
MLflowController[MLflow Controller]
5546
56-
AgentCardCRD["AgentCard CR"]
57-
style AgentCardCRD fill:#e1f5fe,stroke:#039be5
47+
RuntimeCR -->|Validates| ValidationWebhook
48+
end
5849
59-
NetworkPolicy["NetworkPolicy"]
60-
style NetworkPolicy fill:#ffcdd2,stroke:#e57373
50+
subgraph "Config Sources"
51+
ClusterCM[Cluster Defaults ConfigMaps]
52+
NsCM[Namespace Defaults ConfigMap]
53+
end
6154
62-
Workload -->|Deploys| AgentPod
63-
Workload -->|Watches| AgentCardSync
64-
AgentCardSync -->|Auto-creates| AgentCardCRD
65-
AgentCardCRD -->|Reconciles| AgentCardController
66-
AgentCardController -->|Fetches /.well-known/agent-card.json| AgentPod
67-
AgentCardController -->|Verifies signatures & identity| AgentCardCRD
68-
AgentCardCRD -->|Reconciles| NetworkPolicyController
69-
NetworkPolicyController -->|Creates| NetworkPolicy
55+
subgraph "Runtime"
56+
Pod[Agent Pods]
57+
Deployment -->|Creates| Pod
58+
InjectionWebhook -->|Injects sidecars at CREATE| Pod
59+
CardController -->|Fetches agent card from| Pod
7060
end
61+
62+
RuntimeController -->|Applies labels + config-hash| Deployment
63+
RuntimeController -->|Reads defaults| ClusterCM
64+
RuntimeController -->|Reads defaults| NsCM
65+
RuntimeController -->|Watches| RuntimeCR
66+
67+
SyncController -->|Watches| Deployment
68+
SyncController -->|Auto-creates| AgentCardCR[AgentCard CR]
69+
CardController -->|Reconciles| AgentCardCR
70+
NPController -->|Creates| NetworkPolicy[NetworkPolicy]
71+
MLflowController -->|Discovers MLflow, injects env vars| Deployment
72+
73+
style User fill:#ffecb3
74+
style RuntimeCR fill:#e1f5fe
75+
style AgentCardCR fill:#e1f5fe
76+
style ValidationWebhook fill:#fff3e0
77+
style InjectionWebhook fill:#fff3e0
78+
style RuntimeController fill:#ffe0b2
79+
style SyncController fill:#ffe0b2
80+
style CardController fill:#ffe0b2
81+
style NPController fill:#ffe0b2
82+
style MLflowController fill:#ffe0b2
83+
style Deployment fill:#d1c4e9
84+
style Pod fill:#c8e6c9
7185
```
7286

73-
The operator runs three controllers:
87+
The operator runs the following controllers and webhooks:
7488

75-
| Controller | Purpose |
76-
|------------|---------|
77-
| **AgentCard Sync Controller** | Watches Deployments/StatefulSets with agent labels and auto-creates AgentCard resources |
78-
| **AgentCard Controller** | Fetches agent card data from running agents, verifies signatures, evaluates identity binding |
89+
| Component | Purpose |
90+
|-----------|---------|
91+
| **AgentRuntime Controller** | Reconciles AgentRuntime CRs — applies labels, computes config hash, triggers rolling updates on config change |
92+
| **AuthBridge Webhook** | Mutating webhook that injects sidecar containers (envoy-proxy, SPIFFE helper, client registration) into agent/tool Pods |
93+
| **AgentCard Sync Controller** | Watches labeled Deployments/StatefulSets and auto-creates AgentCard resources |
94+
| **AgentCard Controller** | Fetches agent card data from running agents, verifies JWS signatures, evaluates identity binding |
7995
| **NetworkPolicy Controller** | Creates permissive or restrictive NetworkPolicies based on signature verification status |
96+
| **MLflow Controller** | Auto-discovers MLflow instances, creates experiments per agent, injects tracking env vars and RBAC |
8097

8198
## Quick Start
8299

@@ -108,16 +125,20 @@ By default the script installs the released operator version pinned as a chart d
108125
# Install the operator using OCI chart
109126
helm install kagenti-operator \
110127
oci://ghcr.io/kagenti/kagenti-operator/kagenti-operator-chart \
111-
--version 0.2.0-alpha.19 \
112128
--namespace kagenti-system \
113129
--create-namespace
114130
```
115131

116132
### Deploy Your First Agent
117133

118-
Deploy an agent as a standard Kubernetes Deployment with the required `kagenti.io/type: agent` label:
134+
There are two ways to deploy agents. The **AgentRuntime** approach is recommended — it keeps your workload manifests clean and provides identity, auth, and observability configuration.
135+
136+
#### Option 1: AgentRuntime (Recommended)
137+
138+
Deploy a clean Deployment and create an AgentRuntime CR:
119139

120140
```bash
141+
# Deploy the agent workload
121142
kubectl apply -f - <<EOF
122143
apiVersion: apps/v1
123144
kind: Deployment
@@ -126,7 +147,6 @@ metadata:
126147
namespace: default
127148
labels:
128149
app.kubernetes.io/name: weather-agent
129-
kagenti.io/type: agent
130150
protocol.kagenti.io/a2a: ""
131151
spec:
132152
replicas: 1
@@ -137,7 +157,6 @@ spec:
137157
metadata:
138158
labels:
139159
app.kubernetes.io/name: weather-agent
140-
kagenti.io/type: agent
141160
spec:
142161
containers:
143162
- name: agent
@@ -161,15 +180,74 @@ spec:
161180
port: 8000
162181
targetPort: 8000
163182
EOF
183+
184+
# Enroll it with an AgentRuntime CR
185+
kubectl apply -f - <<EOF
186+
apiVersion: agent.kagenti.dev/v1alpha1
187+
kind: AgentRuntime
188+
metadata:
189+
name: weather-agent-runtime
190+
namespace: default
191+
spec:
192+
type: agent
193+
targetRef:
194+
apiVersion: apps/v1
195+
kind: Deployment
196+
name: weather-agent
197+
EOF
164198
```
165199

166-
The operator will automatically create an AgentCard for the workload and begin syncing agent metadata.
200+
The operator will apply `kagenti.io/type: agent` labels and inject AuthBridge sidecars. The `protocol.kagenti.io/a2a` label on the Deployment triggers automatic AgentCard creation for agent discovery.
201+
202+
#### Option 2: Manual Labels
203+
204+
For quick tests, add labels directly to your Deployment:
205+
206+
```bash
207+
kubectl apply -f - <<EOF
208+
apiVersion: apps/v1
209+
kind: Deployment
210+
metadata:
211+
name: weather-agent
212+
namespace: default
213+
labels:
214+
app.kubernetes.io/name: weather-agent
215+
kagenti.io/type: agent
216+
protocol.kagenti.io/a2a: ""
217+
spec:
218+
replicas: 1
219+
selector:
220+
matchLabels:
221+
app.kubernetes.io/name: weather-agent
222+
template:
223+
metadata:
224+
labels:
225+
app.kubernetes.io/name: weather-agent
226+
kagenti.io/type: agent
227+
spec:
228+
containers:
229+
- name: agent
230+
image: "ghcr.io/kagenti/agent-examples/weather_service:v0.0.1-alpha.3"
231+
ports:
232+
- containerPort: 8000
233+
env:
234+
- name: PORT
235+
value: "8000"
236+
EOF
237+
```
167238

168239
### Verify Deployment
169240

170241
```bash
242+
# Check AgentRuntime status (if using AgentRuntime)
243+
kubectl get agentruntime
244+
# NAME TYPE TARGET PHASE AGE
245+
# weather-agent-runtime agent weather-agent Active 2m
246+
171247
# Check discovered agent cards
172248
kubectl get agentcards
249+
# NAME PROTOCOL KIND TARGET AGENT SYNCED AGE
250+
# weather-agent-deployment-card a2a Deployment weather-agent Weather Assistant True 5m
173251

174252
# View agent logs
175253
kubectl logs -l app.kubernetes.io/name=weather-agent
@@ -179,17 +257,25 @@ kubectl logs -l app.kubernetes.io/name=weather-agent
179257

180258
| Topic | Link |
181259
|-------|------|
260+
| **Getting Started** | [Tutorials & End-to-End Walkthrough](./kagenti-operator/GETTING_STARTED.md) |
182261
| **API Reference** | [CRD Specifications & Examples](./kagenti-operator/docs/api-reference.md) |
183262
| **Architecture** | [Operator Design & Components](./kagenti-operator/docs/architecture.md) |
263+
| **AuthBridge Webhook** | [Sidecar Injection & Configuration](./kagenti-operator/docs/authbridge-webhook.md) |
264+
| **Controller-Webhook Interaction** | [AgentRuntime Controller & Webhook Coordination](./kagenti-operator/docs/controller-webhook-interaction.md) |
184265
| **Dynamic Discovery** | [Agent Discovery with AgentCard](./kagenti-operator/docs/dynamic-agent-discovery.md) |
185-
| **Signature Verification** | [A2A AgentCard Signature Verification](./kagenti-operator/docs/a2a-signature-verification.md) |
186-
| **Identity Binding** | [Workload Identity Binding](./kagenti-operator/docs/identity-binding-quickstart.md) |
266+
| **Signature Verification** | [A2A AgentCard Signature Verification](./kagenti-operator/docs/agentcard-signature-verification.md) |
267+
| **Identity Binding** | [SPIFFE Workload Identity Binding](./kagenti-operator/docs/agentcard-identity-binding.md) |
268+
| **MLflow Integration** | [MLflow Tracing & Experiment Tracking](./kagenti-operator/docs/mlflow-integration.md) |
269+
| **Client Registration** | [Operator-Managed Keycloak Registration](./kagenti-operator/docs/operator-managed-client-registration.md) |
187270
| **Developer Guide** | [Contributing & Development](./kagenti-operator/docs/dev.md) |
188-
| **Getting Started** | [Detailed Tutorials](./kagenti-operator/GETTING_STARTED.md) |
189271

190272
## Examples
191273

192-
See the [config/samples](./kagenti-operator/config/samples) directory for complete examples.
274+
See the [config/samples](./kagenti-operator/config/samples) directory for AgentRuntime examples:
275+
276+
- [`agent_v1alpha1_agentruntime_basic.yaml`](./kagenti-operator/config/samples/agent_v1alpha1_agentruntime_basic.yaml) — Minimal AgentRuntime with type + targetRef
277+
- [`agent_v1alpha1_agentruntime_full.yaml`](./kagenti-operator/config/samples/agent_v1alpha1_agentruntime_full.yaml) — With SPIFFE trust domain and OTEL trace overrides
278+
- [`agent_v1alpha1_agentruntime_tool.yaml`](./kagenti-operator/config/samples/agent_v1alpha1_agentruntime_tool.yaml) — Tool-type workload (MCP server)
193279

194280
## Contributing
195281

kagenti-operator/GETTING_STARTED.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This scenario demonstrates the complete lifecycle of an AI agent deployment on t
4242
### Kagenti Operator
4343
The Kagenti Operator discovers, indexes, and secures AI agents deployed in Kubernetes. There are two ways to enroll workloads:
4444
45-
1. **AgentRuntime CR (Recommended)** — Create a clean Deployment and an `AgentRuntime` CR pointing to it. The controller applies labels and triggers sidecar injection automatically. Your workload manifests stay free of kagenti-specific labels.
45+
1. **AgentRuntime CR (Recommended)** — Create a Deployment with a `protocol.kagenti.io/a2a` label and an `AgentRuntime` CR pointing to it. The controller applies `kagenti.io/type` labels and triggers sidecar injection automatically. The protocol label enables automatic AgentCard creation for agent discovery.
4646
2. **Manual labels** — Add the `kagenti.io/type: agent` label directly to your Deployment or StatefulSet. This is simpler for quick tests but does not provide identity or observability configuration.
4747

4848
> **Note:** The `Agent` Custom Resource is deprecated and will be removed in a future release.
@@ -51,9 +51,9 @@ The Kagenti Operator discovers, indexes, and secures AI agents deployed in Kuber
5151

5252
## Deploy an Agent with AgentRuntime (Recommended)
5353

54-
The AgentRuntime approach keeps your workload manifests clean — no kagenti labels required. The controller applies labels, computes a config hash, and triggers the AuthBridge webhook to inject sidecars.
54+
The AgentRuntime approach requires only a `protocol.kagenti.io/a2a` label on your Deployment — the controller applies `kagenti.io/type`, computes a config hash, and triggers the AuthBridge webhook to inject sidecars. The protocol label tells the AgentCard sync controller which protocol the agent speaks, enabling automatic discovery.
5555

56-
### Step 1: Deploy a Clean Deployment
56+
### Step 1: Deploy a Deployment with Protocol Label
5757

5858
```yaml
5959
kubectl apply -f - <<EOF
@@ -64,6 +64,7 @@ metadata:
6464
namespace: team1
6565
labels:
6666
app.kubernetes.io/name: weather-agent
67+
protocol.kagenti.io/a2a: ""
6768
spec:
6869
replicas: 1
6970
selector:

kagenti-operator/config/samples/agent_v1alpha1_agentruntime_basic.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Basic AgentRuntime: enroll a Deployment as an agent with default configuration.
22
# The controller applies kagenti.io/type label and triggers sidecar injection.
33
# Identity and trace settings come from cluster and namespace defaults.
4+
# Note: The target Deployment should have a protocol.kagenti.io/a2a label
5+
# for automatic AgentCard creation and agent discovery.
46
apiVersion: agent.kagenti.dev/v1alpha1
57
kind: AgentRuntime
68
metadata:

kagenti-operator/docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The Kagenti Operator is a Kubernetes controller that implements the [Operator Pa
4444
- Configures identity (SPIFFE) and observability (OTEL traces) per workload via 3-layer defaults (cluster → namespace → CR)
4545
- Uses `targetRef` to reference backing workloads (Deployment, StatefulSet)
4646
- The `kagenti.io/type` label applied by the controller triggers the webhook's `objectSelector`
47-
- Developer workloads stay completely clean — no kagenti labels required in manifests
47+
- Developer workloads only need a `protocol.kagenti.io/a2a` label — the controller applies `kagenti.io/type` and `managed-by` labels automatically
4848

4949
### Controllers
5050

0 commit comments

Comments
 (0)