Skip to content

Commit fe4862a

Browse files
committed
Merge branch 'main' into feature/chat-mcp-ui-widgets
Resolve send-guard conflict in ui/src/components/chat/ChatInterface.tsx by adopting upstream's localMessages/comparable-message approach (#2034) over the branch's earlier high-water-mark implementation. Also picks up configurable stream timeout (#1973), go default declarative runtime (#2083), and controller service annotations (#2088).
2 parents 6d41a5a + 729bba9 commit fe4862a

41 files changed

Lines changed: 664 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

go/api/config/crd/bases/kagent.dev_agents.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13111,11 +13111,11 @@ spec:
1311113111
type: array
1311213112
type: object
1311313113
runtime:
13114-
default: python
13114+
default: go
1311513115
description: |-
1311613116
Runtime specifies which ADK implementation to use for this agent.
13117-
- "python": Uses the Python ADK (default, slower startup, full feature set)
13118-
- "go": Uses the Go ADK (faster startup, most features supported)
13117+
- "go": Uses the Go ADK (default, faster startup, most features supported)
13118+
- "python": Uses the Python ADK (slower startup, full feature set)
1311913119
The runtime determines both the container image and readiness probe configuration.
1312013120
enum:
1312113121
- python

go/api/config/crd/bases/kagent.dev_sandboxagents.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10768,11 +10768,11 @@ spec:
1076810768
type: array
1076910769
type: object
1077010770
runtime:
10771-
default: python
10771+
default: go
1077210772
description: |-
1077310773
Runtime specifies which ADK implementation to use for this agent.
10774-
- "python": Uses the Python ADK (default, slower startup, full feature set)
10775-
- "go": Uses the Go ADK (faster startup, most features supported)
10774+
- "go": Uses the Go ADK (default, faster startup, most features supported)
10775+
- "python": Uses the Python ADK (slower startup, full feature set)
1077610776
The runtime determines both the container image and readiness probe configuration.
1077710777
enum:
1077810778
- python

go/api/v1alpha2/agent_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ type GitRepo struct {
168168
// +kubebuilder:validation:XValidation:rule="!has(self.systemMessage) || !has(self.systemMessageFrom)",message="systemMessage and systemMessageFrom are mutually exclusive"
169169
type DeclarativeAgentSpec struct {
170170
// Runtime specifies which ADK implementation to use for this agent.
171-
// - "python": Uses the Python ADK (default, slower startup, full feature set)
172-
// - "go": Uses the Go ADK (faster startup, most features supported)
171+
// - "go": Uses the Go ADK (default, faster startup, most features supported)
172+
// - "python": Uses the Python ADK (slower startup, full feature set)
173173
// The runtime determines both the container image and readiness probe configuration.
174174
// +optional
175-
// +kubebuilder:default=python
175+
// +kubebuilder:default=go
176176
Runtime DeclarativeRuntime `json:"runtime,omitempty"`
177177
// SystemMessage is a string specifying the system message for the agent.
178178
// When PromptTemplate is set, this field is treated as a Go text/template
@@ -269,7 +269,7 @@ func AgentSandboxPlatform(agent AgentObject) SandboxPlatform {
269269
return sa.Spec.Platform
270270
}
271271

272-
// EffectiveDeclarativeRuntime returns the ADK runtime from spec fields (defaults to Python).
272+
// EffectiveDeclarativeRuntime returns the ADK runtime from spec fields (defaults to Python when not set).
273273
func EffectiveDeclarativeRuntime(spec *AgentSpec) DeclarativeRuntime {
274274
if spec == nil {
275275
return DeclarativeRuntime_Python

go/core/test/e2e/invoke_api_test.go

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,18 @@ type AgentOptions struct {
170170
PromptTemplate *v1alpha2.PromptTemplateSpec
171171
}
172172

173+
func pythonRuntime() *v1alpha2.DeclarativeRuntime {
174+
r := v1alpha2.DeclarativeRuntime_Python
175+
return &r
176+
}
177+
178+
func requireAgentRuntime(t *testing.T, cli client.Client, agent *v1alpha2.Agent, want v1alpha2.DeclarativeRuntime) {
179+
t.Helper()
180+
got := &v1alpha2.Agent{}
181+
require.NoError(t, cli.Get(t.Context(), client.ObjectKeyFromObject(agent), got))
182+
require.Equal(t, want, got.Spec.Declarative.Runtime)
183+
}
184+
173185
// setupAgentWithOptions creates and returns an agent resource with custom options
174186
func setupAgentWithOptions(t *testing.T, cli client.Client, modelConfigName string, tools []*v1alpha2.Tool, opts AgentOptions) *v1alpha2.Agent {
175187
agent := generateAgent(modelConfigName, tools, opts)
@@ -1079,12 +1091,11 @@ func TestE2EInvokeCrewAIAgent(t *testing.T) {
10791091
}
10801092

10811093
func TestE2EInvokeSTSIntegration(t *testing.T) {
1082-
runE2EInvokeSTSIntegration(t, "python", nil)
1094+
runE2EInvokeSTSIntegration(t, "go", nil)
10831095
}
10841096

1085-
func TestE2EGoInvokeSTSIntegration(t *testing.T) {
1086-
goRuntime := v1alpha2.DeclarativeRuntime_Go
1087-
runE2EInvokeSTSIntegration(t, "go", &goRuntime)
1097+
func TestE2EPythonInvokeSTSIntegration(t *testing.T) {
1098+
runE2EInvokeSTSIntegration(t, "python", pythonRuntime())
10881099
}
10891100

10901101
func runE2EInvokeSTSIntegration(t *testing.T, runtimeName string, runtimeOverride *v1alpha2.DeclarativeRuntime) {
@@ -1133,6 +1144,9 @@ func runE2EInvokeSTSIntegration(t *testing.T, runtimeName string, runtimeOverrid
11331144
},
11341145
},
11351146
})
1147+
if runtimeOverride == nil {
1148+
requireAgentRuntime(t, cli, agent, v1alpha2.DeclarativeRuntime_Go)
1149+
}
11361150

11371151
// access token for test user with the may act claim allowing system:serviceaccount:kagent:test-sts to
11381152
// perform operations on behalf of the test user
@@ -1273,12 +1287,11 @@ func TestE2ESkillImagePullSecrets(t *testing.T) {
12731287
}
12741288

12751289
func TestE2EDeclarativeAgentNetworkAllowlistWithSkills(t *testing.T) {
1276-
runDeclarativeAgentNetworkAllowlistWithSkills(t, "python", nil)
1290+
runDeclarativeAgentNetworkAllowlistWithSkills(t, "default", nil)
12771291
}
12781292

1279-
func TestE2EGoDeclarativeAgentNetworkAllowlistWithSkills(t *testing.T) {
1280-
goRuntime := v1alpha2.DeclarativeRuntime_Go
1281-
runDeclarativeAgentNetworkAllowlistWithSkills(t, "go", &goRuntime)
1293+
func TestE2EPythonDeclarativeAgentNetworkAllowlistWithSkills(t *testing.T) {
1294+
runDeclarativeAgentNetworkAllowlistWithSkills(t, "python", pythonRuntime())
12821295
}
12831296

12841297
func runDeclarativeAgentNetworkAllowlistWithSkills(t *testing.T, runtimeName string, runtimeOverride *v1alpha2.DeclarativeRuntime) {
@@ -1377,29 +1390,21 @@ func TestE2EInvokePassthroughAgent(t *testing.T) {
13771390
})
13781391
}
13791392

1380-
func TestE2EInvokeGolangADKAgent(t *testing.T) {
1381-
// Setup mock server
1393+
func TestE2EAgentDefaultRuntimeIsGo(t *testing.T) {
13821394
baseURL, stopServer := setupMockServer(t, "mocks/invoke_golang_adk_agent.json")
13831395
defer stopServer()
13841396

1385-
// Setup Kubernetes client
13861397
cli := setupK8sClient(t, false)
1387-
1388-
// Setup model config pointing at mock server
13891398
modelCfg := setupModelConfig(t, cli, baseURL)
13901399

1391-
// Create a declarative agent that uses the Go ADK runtime
1392-
goRuntime := v1alpha2.DeclarativeRuntime_Go
13931400
agent := setupAgentWithOptions(t, cli, modelCfg.Name, nil, AgentOptions{
1394-
Name: "golang-adk-test",
1401+
Name: "default-runtime-test",
13951402
SystemMessage: "You are a helpful test agent. Answer concisely.",
1396-
Runtime: &goRuntime,
13971403
})
1404+
requireAgentRuntime(t, cli, agent, v1alpha2.DeclarativeRuntime_Go)
13981405

1399-
// Setup A2A client
14001406
a2aClient := setupA2AClient(t, agent)
14011407

1402-
// Run tests
14031408
t.Run("sync_invocation", func(t *testing.T) {
14041409
runSyncTest(t, a2aClient, "What is 2+2?", "4", nil)
14051410
})
@@ -1450,19 +1455,16 @@ func runMemoryAgentTest(t *testing.T, extraOpts AgentOptions) {
14501455
}
14511456

14521457
// TestE2EMemoryWithAgent runs the agent with memory enabled against the mock
1453-
// (invoke_memory_agent.json). Two ModelConfigs are used: one for chat (gpt-4.1-mini)
1454-
// and one for embeddings (text-embedding-3-small) so LiteLLM calls the correct APIs.
1458+
// (invoke_memory_agent.json) using the default (Go) ADK runtime.
14551459
func TestE2EMemoryWithAgent(t *testing.T) {
14561460
runMemoryAgentTest(t, AgentOptions{Name: "memory-test-agent"})
14571461
}
14581462

1459-
// TestE2EMemoryWithGoADKAgent is the same as TestE2EMemoryWithAgent but uses
1460-
// the Go ADK runtime to verify memory works end-to-end with the Go runtime.
1461-
func TestE2EMemoryWithGoADKAgent(t *testing.T) {
1462-
goRuntime := v1alpha2.DeclarativeRuntime_Go
1463+
// TestE2EMemoryWithPythonAgent verifies memory with the Python ADK runtime.
1464+
func TestE2EMemoryWithPythonAgent(t *testing.T) {
14631465
runMemoryAgentTest(t, AgentOptions{
1464-
Name: "memory-go-adk-test",
1465-
Runtime: &goRuntime,
1466+
Name: "memory-python-test",
1467+
Runtime: pythonRuntime(),
14661468
})
14671469
}
14681470

@@ -1583,6 +1585,7 @@ func TestE2EIAgentRunsCode(t *testing.T) {
15831585
modelCfg := setupModelConfig(t, cli, baseURL)
15841586
agent := setupAgentWithOptions(t, cli, modelCfg.Name, nil, AgentOptions{
15851587
ExecuteCode: new(true),
1588+
Runtime: pythonRuntime(),
15861589
})
15871590

15881591
// Setup A2A client
@@ -1603,6 +1606,7 @@ func TestE2ESandboxAgentNetworkAllowlistWithExecuteCode(t *testing.T) {
16031606
t.Run("deny_by_default", func(t *testing.T) {
16041607
agent := setupSandboxAgentWithOptions(t, cli, modelCfg.Name, nil, AgentOptions{
16051608
ExecuteCode: new(true),
1609+
Runtime: pythonRuntime(),
16061610
})
16071611

16081612
a2aClient := setupSandboxA2AClient(t, agent)
@@ -1612,6 +1616,7 @@ func TestE2ESandboxAgentNetworkAllowlistWithExecuteCode(t *testing.T) {
16121616
t.Run("allowlist_enables_access", func(t *testing.T) {
16131617
agent := setupSandboxAgentWithOptions(t, cli, modelCfg.Name, nil, AgentOptions{
16141618
ExecuteCode: new(true),
1619+
Runtime: pythonRuntime(),
16151620
Sandbox: &v1alpha2.SandboxConfig{
16161621
Network: &v1alpha2.NetworkConfig{
16171622
AllowedDomains: []string{controllerHost},

helm/agents/argo-rollouts/templates/agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
description: The Argo Rollouts Converter AI Agent specializes in converting Kubernetes Deployments to Argo Rollouts.
1010
type: Declarative
1111
declarative:
12-
runtime: {{ .Values.runtime | default "python" }}
12+
runtime: {{ .Values.runtime | default "go" }}
1313
systemMessage: |
1414
You are an Argo Rollouts specialist focused on progressive delivery and deployment automation. You
1515
are only responsible for defining the YAML for the Argo Rollout resource and simple kubectl argo rollouts commands.

helm/agents/argo-rollouts/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ memory:
77
# Optional reference to a ModelConfig resource for the agent's memory.
88
modelConfigRef: ""
99

10-
# -- Optional runtime specification for the agent. If not specified, it will default to "python". Supported runtimes include "python" and "go".
10+
# -- Optional runtime specification for the agent. If not specified, it will default to "go". Supported runtimes include "python" and "go".
1111
runtime: ""
1212

1313
imagePullSecrets: []

helm/agents/cilium-debug/templates/agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
description: Cilium debug agent can help with debugging, troubleshooting, and advanced diagnostics of Cilium installations in Kubernetes clusters.
1010
type: Declarative
1111
declarative:
12-
runtime: {{ .Values.runtime | default "python" }}
12+
runtime: {{ .Values.runtime | default "go" }}
1313
modelConfig: {{ .Values.modelConfigRef | default (printf "%s" (include "kagent.defaultModelConfigName" .)) }}
1414
{{- with .Values.memory }}
1515
{{- if .enabled }}

helm/agents/cilium-debug/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ memory:
77
# Optional reference to a ModelConfig resource for the agent's memory.
88
modelConfigRef: ""
99

10-
# -- Optional runtime specification for the agent. If not specified, it will default to "python". Supported runtimes include "python" and "go".
10+
# -- Optional runtime specification for the agent. If not specified, it will default to "go". Supported runtimes include "python" and "go".
1111
runtime: ""
1212

1313
imagePullSecrets: []

helm/agents/cilium-manager/templates/agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
description: Cilium manager agent knows how to install, configure, monitor, and troubleshoot Cilium in Kubernetes environments
1010
type: Declarative
1111
declarative:
12-
runtime: {{ .Values.runtime | default "python" }}
12+
runtime: {{ .Values.runtime | default "go" }}
1313
modelConfig: {{ .Values.modelConfigRef | default (printf "%s" (include "kagent.defaultModelConfigName" .)) }}
1414
{{- with .Values.memory }}
1515
{{- if .enabled }}

helm/agents/cilium-manager/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ memory:
77
# Optional reference to a ModelConfig resource for the agent's memory.
88
modelConfigRef: ""
99

10-
# -- Optional runtime specification for the agent. If not specified, it will default to "python". Supported runtimes include "python" and "go".
10+
# -- Optional runtime specification for the agent. If not specified, it will default to "go". Supported runtimes include "python" and "go".
1111
runtime: ""
1212

1313
imagePullSecrets: []

0 commit comments

Comments
 (0)