Repository navigation
openclaw substrate support - #1939
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Agent Substrate as a new runtime option for OpenClaw/NemoClaw AgentHarnesses, alongside the existing OpenShell flow. The PR introduces new CRD/API fields, controller/provisioning logic for Substrate WorkerPool/ActorTemplate/Actor lifecycle, a kagent gateway proxy for OpenClaw UI traffic, Helm wiring/RBAC, UI form/list updates, and example documentation.
Changes:
- Adds
spec.runtime=substrateandspec.substrateconfiguration/status support for AgentHarness resources. - Implements Substrate backend/provisioner logic, shared OpenClaw bootstrap generation, and HTTP/WebSocket gateway proxying to actor pods.
- Updates UI, Helm chart, CRDs, examples, and Go module dependencies to expose and deploy the new runtime.
Reviewed changes
Copilot reviewed 63 out of 67 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
ui/src/types/index.ts |
Adds Substrate harness response shape to UI types. |
ui/src/lib/openshellSandboxAgents.ts |
Adds helpers for identifying Substrate harness rows. |
ui/src/lib/openClawSandboxForm.ts |
Extends harness form draft generation with runtime and Substrate fields. |
ui/src/lib/agentHarness.ts |
Generalizes harness helpers across OpenShell/Substrate runtimes. |
ui/src/components/AgentListView.tsx |
Routes Substrate harness chat/action links to the gateway path. |
ui/src/components/AgentCard.tsx |
Shows runtime context and links Substrate harnesses to gateway UI. |
ui/src/components/agent-form/OpenClawSandboxFields.tsx |
Adds runtime selection and Substrate-specific form inputs. |
ui/src/app/openshell/OpenshellTerminalPage.tsx |
Refactors terminal reconnect/autoconnect handling and messaging. |
ui/next.config.ts |
Adds local-development /api rewrite to the controller. |
helm/kagent/values.yaml |
Adds Substrate controller values and oauth2-proxy gateway skip-auth regex. |
helm/kagent/templates/rbac/getter-role.yaml |
Grants controller RBAC for Substrate CRDs. |
helm/kagent/templates/controller-deployment.yaml |
Wires Substrate Helm values into controller environment variables. |
helm/kagent-crds/templates/kagent.dev_agentharnesses.yaml |
Regenerates Helm CRD with runtime/substrate fields. |
go/go.mod |
Adds Substrate module dependency and related version updates. |
go/go.sum |
Adds checksums for new/updated Go dependencies. |
go/core/pkg/sandboxbackend/substrate/* |
Adds Substrate backend, ate-api client, provisioning, deletion, gateway-token, startup template, and tests. |
go/core/pkg/sandboxbackend/openshell/* |
Updates OpenShell imports to use the shared OpenClaw package. |
go/core/pkg/sandboxbackend/openclaw/* |
Moves/refactors shared OpenClaw bootstrap, policy, channels, credentials, and model config logic. |
go/core/pkg/app/app.go |
Registers Substrate scheme, flags, backend/provisioner construction, and gateway config. |
go/core/internal/httpserver/server.go |
Adds AgentHarness gateway route and WebSocket auth-query handling. |
go/core/internal/httpserver/middleware.go |
Excludes gateway proxy paths from forced JSON content type. |
go/core/internal/httpserver/handlers/handlers.go |
Passes gateway configuration into handlers. |
go/core/internal/httpserver/handlers/agents.go |
Emits Substrate harness list entries in agent responses. |
go/core/internal/httpserver/handlers/agentharness_gateway.go |
Adds HTTP/WebSocket reverse proxy for Substrate OpenClaw gateway UI. |
go/core/internal/httpserver/handlers/agentharness_gateway*_test.go |
Adds gateway proxy/path behavior tests. |
go/core/internal/controller/agentharness_controller.go |
Dispatches AgentHarness reconciliation by runtime and integrates Substrate provisioning/deletion. |
go/api/v1alpha2/agentharness_types.go |
Adds runtime, substrate spec/status, and CRD printer column definitions. |
go/api/v1alpha2/zz_generated.deepcopy.go |
Regenerates deepcopy methods for new AgentHarness fields. |
go/api/httpapi/types.go |
Adds Substrate harness response DTOs. |
go/api/config/crd/bases/kagent.dev_agentharnesses.yaml |
Regenerates base CRD with runtime/substrate schema. |
examples/substrate-openclaw/README.md |
Documents local Substrate/OpenClaw setup and harness usage. |
Files not reviewed (1)
- go/api/v1alpha2/zz_generated.deepcopy.go: Language not supported
Comments suppressed due to low confidence (1)
go/core/pkg/sandboxbackend/openclaw/modelconfig.go:40
- This SecretKeyRef only contains the secret name, so it will be resolved in the ActorTemplate/actor namespace.
modelConfigRefcan point at a ModelConfig in another namespace, and the existing OpenShell path reads the API key Secret frommc.Namespace; in that case substrate actors will look for the secret in the wrong namespace. Either reject cross-namespace ModelConfigs for substrate with a clear error or copy/reference credentials in the harness namespace before creating the ActorTemplate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
…modelconfig/channels Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
|
Tip All tests passed and all changes approved!🟢 UI Tests: 10 visual and accessibility changes accepted as baselines |
| type AgentHarnessSubstrateSnapshotsConfig struct { | ||
| // Location is the GCS URI prefix for golden and incremental snapshots. | ||
| // Example: gs://ate-snapshots/kagent/my-namespace/my-harness/ | ||
| // +required | ||
| Location string `json:"location"` | ||
| } |
There was a problem hiding this comment.
substrate usually deploys with an instance of rustfs, how can the user specify that for snapshots?
There was a problem hiding this comment.
it comes down to the way substrate is installed. with the kind installation it automatically deploys rustfs and points atelet to it.
There was a problem hiding this comment.
Is this code only for substrate or also for openshell, I'm a little confused what the difference is
There was a problem hiding this comment.
this is substrate only. we don't have a way to ssh into the workload as we have in openshell; so, instead we're launching into the openclaw UI.
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
|
@copilot resolve the merge conflicts in this pull request |
Resolved and pushed in 59959395. |
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
…modelconfig/channels Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
…peterj/substrate * 'peterj/substrate' of github.com:kagent-dev/kagent: Fix AgentHarness CI failures Split AgentHarness controllers by runtime Simplify substrate actor cleanup wiring Refine substrate AgentHarness lifecycle fix failing helm unit tests commenting out the substrate section in values move write ops to writer-role make linter happy pr feedback move startup script to a template split substrate and openshell, use the secrets in substrate fork for modelconfig/channels clean up ui/gateway stuff (use base path from openclaw) fix up the optional/non-optional types in the crd/values file substrate wip fix(compaction): preserve namespaced tool names in LLM summarizer prompt (#1907) Fix/1945 fix for wrong validation being triggered (#1946) fix(security): replace shell-templated skills-init with Go binary (#1842) (#1928) Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
Signed-off-by: Peter Jausovec <[email protected]>
kagent 0.9.6 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre><!-- Release notes generated using configuration in .github/release.yml at v0.9.6 --> ## What's Changed ### Features * feat(mcp): expose agents as MCP resource with change notifications by @onematchfox in kagent-dev/kagent#1856 * feat(adk): propagate parent + root context_id headers on outbound A2A calls by @Prefix in kagent-dev/kagent#1927 ### Bug Fixes * fix(compaction): preserve namespaced tool names in LLM summarizer prompt by @yashrajshuklaaa in kagent-dev/kagent#1907 * fix: preserve Ollama streaming tool calls by @andreivince in kagent-dev/kagent#1948 * fix(bedrock): preserve thinking blocks in multi-turn tool use by @mesutoezdil in kagent-dev/kagent#1873 * fix(translator): forward Anthropic config fields to model config by @mesutoezdil in kagent-dev/kagent#1962 * fix(openai): apply ReasoningEffort in applyOpenAIConfig by @mesutoezdil in kagent-dev/kagent#1959 * fix(mcp): handle null tools field in MCP server configs by @mesutoezdil in kagent-dev/kagent#1960 ### Documentation * docs(api): add field descriptions for BYO agent spec by @marians in kagent-dev/kagent#1969 ### Other Changes * Fix/1945 fix for wrong validation being triggered by @gauravshinde1729 in kagent-dev/kagent#1946 * openclaw substrate support by @peterj in kagent-dev/kagent#1939 * chore(deps): bump the npm-minor-patch group in /ui with 14 updates by @dependabot[bot] in kagent-dev/kagent#1951 * Link fixes by @kristin-kronstain-brown in kagent-dev/kagent#1950 * RemoteMCPServer TLS + companion-Secret API + plaintext egress rewrite by @iplay88keys in kagent-dev/kagent#1905 ## New Contributors * @yashrajshuklaaa made their first contribution in kagent-dev/kagent#1907 * @andreivince made their first contribution in kagent-dev/kagent#1948 * @kristin-kronstain-brown made their first contribution in kagent-dev/kagent#1950 * @Prefix made their first contribution in kagent-dev/kagent#1927 * @marians made their first contribution in kagent-dev/kagent#1969 **Full Changelog**: https://github.com/kagent-dev/kagent/compare/v0.9.5...v0.9.6</pre> <p>View the full release notes at <a href="https://github.com/kagent-dev/kagent/releases/tag/v0.9.6">https://github.com/kagent-dev/kagent/releases/tag/v0.9.6</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!10637
support running openclaw on substrate.